From 7e811026d1c5f26cca68bd95b6d76afb299f0a1c Mon Sep 17 00:00:00 2001 From: Dimitrios Eftaxiopoulos Date: Sat, 28 Aug 2010 18:55:13 +0300 Subject: [PATCH] Delete obsolete debian-changes --- debian/patches/debian-changes-1.10.2.1-1 | 36638 --------------------- 1 file changed, 36638 deletions(-) delete mode 100644 debian/patches/debian-changes-1.10.2.1-1 diff --git a/debian/patches/debian-changes-1.10.2.1-1 b/debian/patches/debian-changes-1.10.2.1-1 deleted file mode 100644 index 4e6d5f2..0000000 --- a/debian/patches/debian-changes-1.10.2.1-1 +++ /dev/null @@ -1,36638 +0,0 @@ -Description: Upstream changes introduced in version 1.10.2.1-1 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - mathgl (1.10.2.1-1) UNRELEASED; urgency=low - . - [ D Eftaxiopoulos ] - * Update to Debian Policy 3.9.1.0. - * Put myself and D. Haley to the maintainers list. - * Comment out parallel-build-png.patch in the debian/patches/series file - since it seems to apply to a texinfo/Makefile.am file that is not - included in the source tree. - * Append package quilt to the build-depends list for the source in the - debian/control file, in order to fix a lintian error. - * Reinstate debian/source/format file with content '3.0 (quilt)'. - * Fix Lintian warnings related to manpages. - . - [ D Haley ] - * New upstream release 1.10.2.1 (Closes: #562743). - . - [ Salvatore Bonaccorso ] - * New Maintainer (Closes: #564422). Set Maintainer to Debian Science - Maintainers . - * Convert to '3.0 (quilt)' package source format. Drop quilt framework for - packaging. - * debian/control: - - Change Vcs-Browser and Vcs-Git to the debian-science git repository. - - Change Section for source package to 'science' as per debian-science - group policy. - - Set DM-Upload-Allowed field to yes. - * Add myself to Uploaders. - . - The person named in the Author field signed this changelog entry. -Author: D Haley -Bug-Debian: http://bugs.debian.org/562743 -Bug-Debian: http://bugs.debian.org/564422 - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- mathgl-1.10.2.1.orig/Makefile.in -+++ mathgl-1.10.2.1/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -46,7 +46,11 @@ DIST_COMMON = README $(am__configure_dep - config/texinfo.tex - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ -@@ -353,7 +357,7 @@ distclean-libtool: - # (which will cause the Makefiles to be regenerated when you run `make'); - # (2) otherwise, pass the desired values on the `make' command line. - $(RECURSIVE_TARGETS): -- @failcom='exit 1'; \ -+ @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -378,7 +382,7 @@ $(RECURSIVE_TARGETS): - fi; test -z "$$fail" - - $(RECURSIVE_CLEAN_TARGETS): -- @failcom='exit 1'; \ -+ @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -542,7 +546,8 @@ distdir: $(DISTFILES) - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ -- || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -+ || 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 {} {} \; \ -@@ -586,17 +591,17 @@ dist dist-all: distdir - distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ -- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ -+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ -- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ -+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ -- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ -+ lzma -dc $(distdir).tar.lzma | $(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) gunzip -c $(distdir).shar.gz | unshar ;;\ -+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac ---- mathgl-1.10.2.1.orig/aclocal.m4 -+++ mathgl-1.10.2.1/aclocal.m4 -@@ -1,4 +1,4 @@ --# generated automatically by aclocal 1.11 -*- Autoconf -*- -+# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -@@ -13,7977 +13,12 @@ - - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl --m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, --[m4_warning([this file was generated for autoconf 2.64. -+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -+[m4_warning([this file was generated for autoconf 2.67. - 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'.])]) - --# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- --# --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008 Free Software Foundation, Inc. --# Written by Gordon Matzigkeit, 1996 --# --# 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. -- --m4_define([_LT_COPYING], [dnl --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008 Free Software Foundation, Inc. --# Written by Gordon Matzigkeit, 1996 --# --# This file is part of GNU Libtool. --# --# GNU Libtool 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. --# --# As a special exception to the GNU General Public License, --# if you distribute this file as part of a program or library that --# is built using GNU Libtool, you may include this file under the --# same distribution terms that you use for the rest of that program. --# --# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy --# can be downloaded from http://www.gnu.org/licenses/gpl.html, or --# obtained by writing to the Free Software Foundation, Inc., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --]) -- --# serial 56 LT_INIT -- -- --# LT_PREREQ(VERSION) --# ------------------ --# Complain and exit if this libtool version is less that VERSION. --m4_defun([LT_PREREQ], --[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, -- [m4_default([$3], -- [m4_fatal([Libtool version $1 or higher is required], -- 63)])], -- [$2])]) -- -- --# _LT_CHECK_BUILDDIR --# ------------------ --# Complain if the absolute build directory name contains unusual characters --m4_defun([_LT_CHECK_BUILDDIR], --[case `pwd` in -- *\ * | *\ *) -- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; --esac --]) -- -- --# LT_INIT([OPTIONS]) --# ------------------ --AC_DEFUN([LT_INIT], --[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT --AC_BEFORE([$0], [LT_LANG])dnl --AC_BEFORE([$0], [LT_OUTPUT])dnl --AC_BEFORE([$0], [LTDL_INIT])dnl --m4_require([_LT_CHECK_BUILDDIR])dnl -- --dnl Autoconf doesn't catch unexpanded LT_ macros by default: --m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl --m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl --dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 --dnl unless we require an AC_DEFUNed macro: --AC_REQUIRE([LTOPTIONS_VERSION])dnl --AC_REQUIRE([LTSUGAR_VERSION])dnl --AC_REQUIRE([LTVERSION_VERSION])dnl --AC_REQUIRE([LTOBSOLETE_VERSION])dnl --m4_require([_LT_PROG_LTMAIN])dnl -- --dnl Parse OPTIONS --_LT_SET_OPTIONS([$0], [$1]) -- --# This can be used to rebuild libtool when needed --LIBTOOL_DEPS="$ltmain" -- --# Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' --AC_SUBST(LIBTOOL)dnl -- --_LT_SETUP -- --# Only expand once: --m4_define([LT_INIT]) --])# LT_INIT -- --# Old names: --AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) --AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_PROG_LIBTOOL], []) --dnl AC_DEFUN([AM_PROG_LIBTOOL], []) -- -- --# _LT_CC_BASENAME(CC) --# ------------------- --# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. --m4_defun([_LT_CC_BASENAME], --[for cc_temp in $1""; do -- case $cc_temp in -- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; -- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` --]) -- -- --# _LT_FILEUTILS_DEFAULTS --# ---------------------- --# It is okay to use these file commands and assume they have been set --# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. --m4_defun([_LT_FILEUTILS_DEFAULTS], --[: ${CP="cp -f"} --: ${MV="mv -f"} --: ${RM="rm -f"} --])# _LT_FILEUTILS_DEFAULTS -- -- --# _LT_SETUP --# --------- --m4_defun([_LT_SETUP], --[AC_REQUIRE([AC_CANONICAL_HOST])dnl --AC_REQUIRE([AC_CANONICAL_BUILD])dnl --_LT_DECL([], [host_alias], [0], [The host system])dnl --_LT_DECL([], [host], [0])dnl --_LT_DECL([], [host_os], [0])dnl --dnl --_LT_DECL([], [build_alias], [0], [The build system])dnl --_LT_DECL([], [build], [0])dnl --_LT_DECL([], [build_os], [0])dnl --dnl --AC_REQUIRE([AC_PROG_CC])dnl --AC_REQUIRE([LT_PATH_LD])dnl --AC_REQUIRE([LT_PATH_NM])dnl --dnl --AC_REQUIRE([AC_PROG_LN_S])dnl --test -z "$LN_S" && LN_S="ln -s" --_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl --dnl --AC_REQUIRE([LT_CMD_MAX_LEN])dnl --_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl --_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl --dnl --m4_require([_LT_FILEUTILS_DEFAULTS])dnl --m4_require([_LT_CHECK_SHELL_FEATURES])dnl --m4_require([_LT_CMD_RELOAD])dnl --m4_require([_LT_CHECK_MAGIC_METHOD])dnl --m4_require([_LT_CMD_OLD_ARCHIVE])dnl --m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -- --_LT_CONFIG_LIBTOOL_INIT([ --# See if we are running on zsh, and set the options which allow our --# commands through without removal of \ escapes INIT. --if test -n "\${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST --fi --]) --if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST --fi -- --_LT_CHECK_OBJDIR -- --m4_require([_LT_TAG_COMPILER])dnl --_LT_PROG_ECHO_BACKSLASH -- --case $host_os in --aix3*) -- # AIX sometimes has problems with the GCC collect2 program. For some -- # reason, if we set the COLLECT_NAMES environment variable, the problems -- # vanish in a puff of smoke. -- if test "X${COLLECT_NAMES+set}" != Xset; then -- COLLECT_NAMES= -- export COLLECT_NAMES -- fi -- ;; --esac -- --# Sed substitution that helps us do robust quoting. It backslashifies --# metacharacters that are still active within double-quoted strings. --sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' -- --# Same as above, but do not quote variable references. --double_quote_subst='s/\([["`\\]]\)/\\\1/g' -- --# Sed substitution to delay expansion of an escaped shell variable in a --# double_quote_subst'ed string. --delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -- --# Sed substitution to delay expansion of an escaped single quote. --delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' -- --# Sed substitution to avoid accidental globbing in evaled expressions --no_glob_subst='s/\*/\\\*/g' -- --# Global variables: --ofile=libtool --can_build_shared=yes -- --# All known linkers require a `.a' archive for static linking (except MSVC, --# which needs '.lib'). --libext=a -- --with_gnu_ld="$lt_cv_prog_gnu_ld" -- --old_CC="$CC" --old_CFLAGS="$CFLAGS" -- --# Set sane defaults for various variables --test -z "$CC" && CC=cc --test -z "$LTCC" && LTCC=$CC --test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS --test -z "$LD" && LD=ld --test -z "$ac_objext" && ac_objext=o -- --_LT_CC_BASENAME([$compiler]) -- --# Only perform the check for file, if the check method requires it --test -z "$MAGIC_CMD" && MAGIC_CMD=file --case $deplibs_check_method in --file_magic*) -- if test "$file_magic_cmd" = '$MAGIC_CMD'; then -- _LT_PATH_MAGIC -- fi -- ;; --esac -- --# Use C for the default configuration in the libtool script --LT_SUPPORTED_TAG([CC]) --_LT_LANG_C_CONFIG --_LT_LANG_DEFAULT_CONFIG --_LT_CONFIG_COMMANDS --])# _LT_SETUP -- -- --# _LT_PROG_LTMAIN --# --------------- --# Note that this code is called both from `configure', and `config.status' --# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, --# `config.status' has no value for ac_aux_dir unless we are using Automake, --# so we pass a copy along to make sure it has a sensible value anyway. --m4_defun([_LT_PROG_LTMAIN], --[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl --_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) --ltmain="$ac_aux_dir/ltmain.sh" --])# _LT_PROG_LTMAIN -- -- -- --# So that we can recreate a full libtool script including additional --# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS --# in macros and then make a single call at the end using the `libtool' --# label. -- -- --# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) --# ---------------------------------------- --# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. --m4_define([_LT_CONFIG_LIBTOOL_INIT], --[m4_ifval([$1], -- [m4_append([_LT_OUTPUT_LIBTOOL_INIT], -- [$1 --])])]) -- --# Initialize. --m4_define([_LT_OUTPUT_LIBTOOL_INIT]) -- -- --# _LT_CONFIG_LIBTOOL([COMMANDS]) --# ------------------------------ --# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. --m4_define([_LT_CONFIG_LIBTOOL], --[m4_ifval([$1], -- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], -- [$1 --])])]) -- --# Initialize. --m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) -- -- --# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) --# ----------------------------------------------------- --m4_defun([_LT_CONFIG_SAVE_COMMANDS], --[_LT_CONFIG_LIBTOOL([$1]) --_LT_CONFIG_LIBTOOL_INIT([$2]) --]) -- -- --# _LT_FORMAT_COMMENT([COMMENT]) --# ----------------------------- --# Add leading comment marks to the start of each line, and a trailing --# full-stop to the whole comment if one is not present already. --m4_define([_LT_FORMAT_COMMENT], --[m4_ifval([$1], [ --m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], -- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) --)]) -- -- -- -- -- --# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) --# ------------------------------------------------------------------- --# CONFIGNAME is the name given to the value in the libtool script. --# VARNAME is the (base) name used in the configure script. --# VALUE may be 0, 1 or 2 for a computed quote escaped value based on --# VARNAME. Any other value will be used directly. --m4_define([_LT_DECL], --[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], -- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], -- [m4_ifval([$1], [$1], [$2])]) -- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) -- m4_ifval([$4], -- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) -- lt_dict_add_subkey([lt_decl_dict], [$2], -- [tagged?], [m4_ifval([$5], [yes], [no])])]) --]) -- -- --# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) --# -------------------------------------------------------- --m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) -- -- --# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) --# ------------------------------------------------ --m4_define([lt_decl_tag_varnames], --[_lt_decl_filter([tagged?], [yes], $@)]) -- -- --# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) --# --------------------------------------------------------- --m4_define([_lt_decl_filter], --[m4_case([$#], -- [0], [m4_fatal([$0: too few arguments: $#])], -- [1], [m4_fatal([$0: too few arguments: $#: $1])], -- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], -- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], -- [lt_dict_filter([lt_decl_dict], $@)])[]dnl --]) -- -- --# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) --# -------------------------------------------------- --m4_define([lt_decl_quote_varnames], --[_lt_decl_filter([value], [1], $@)]) -- -- --# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) --# --------------------------------------------------- --m4_define([lt_decl_dquote_varnames], --[_lt_decl_filter([value], [2], $@)]) -- -- --# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) --# --------------------------------------------------- --m4_define([lt_decl_varnames_tagged], --[m4_assert([$# <= 2])dnl --_$0(m4_quote(m4_default([$1], [[, ]])), -- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), -- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) --m4_define([_lt_decl_varnames_tagged], --[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) -- -- --# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) --# ------------------------------------------------ --m4_define([lt_decl_all_varnames], --[_$0(m4_quote(m4_default([$1], [[, ]])), -- m4_if([$2], [], -- m4_quote(lt_decl_varnames), -- m4_quote(m4_shift($@))))[]dnl --]) --m4_define([_lt_decl_all_varnames], --[lt_join($@, lt_decl_varnames_tagged([$1], -- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl --]) -- -- --# _LT_CONFIG_STATUS_DECLARE([VARNAME]) --# ------------------------------------ --# Quote a variable value, and forward it to `config.status' so that its --# declaration there will have the same value as in `configure'. VARNAME --# must have a single quote delimited value for this to work. --m4_define([_LT_CONFIG_STATUS_DECLARE], --[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) -- -- --# _LT_CONFIG_STATUS_DECLARATIONS --# ------------------------------ --# We delimit libtool config variables with single quotes, so when --# we write them to config.status, we have to be sure to quote all --# embedded single quotes properly. In configure, this macro expands --# each variable declared with _LT_DECL (and _LT_TAGDECL) into: --# --# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' --m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], --[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), -- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) -- -- --# _LT_LIBTOOL_TAGS --# ---------------- --# Output comment and list of tags supported by the script --m4_defun([_LT_LIBTOOL_TAGS], --[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl --available_tags="_LT_TAGS"dnl --]) -- -- --# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) --# ----------------------------------- --# Extract the dictionary values for VARNAME (optionally with TAG) and --# expand to a commented shell variable setting: --# --# # Some comment about what VAR is for. --# visible_name=$lt_internal_name --m4_define([_LT_LIBTOOL_DECLARE], --[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], -- [description])))[]dnl --m4_pushdef([_libtool_name], -- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl --m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), -- [0], [_libtool_name=[$]$1], -- [1], [_libtool_name=$lt_[]$1], -- [2], [_libtool_name=$lt_[]$1], -- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl --m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl --]) -- -- --# _LT_LIBTOOL_CONFIG_VARS --# ----------------------- --# Produce commented declarations of non-tagged libtool config variables --# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' --# script. Tagged libtool config variables (even for the LIBTOOL CONFIG --# section) are produced by _LT_LIBTOOL_TAG_VARS. --m4_defun([_LT_LIBTOOL_CONFIG_VARS], --[m4_foreach([_lt_var], -- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), -- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) -- -- --# _LT_LIBTOOL_TAG_VARS(TAG) --# ------------------------- --m4_define([_LT_LIBTOOL_TAG_VARS], --[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), -- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) -- -- --# _LT_TAGVAR(VARNAME, [TAGNAME]) --# ------------------------------ --m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) -- -- --# _LT_CONFIG_COMMANDS --# ------------------- --# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of --# variables for single and double quote escaping we saved from calls --# to _LT_DECL, we can put quote escaped variables declarations --# into `config.status', and then the shell code to quote escape them in --# for loops in `config.status'. Finally, any additional code accumulated --# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. --m4_defun([_LT_CONFIG_COMMANDS], --[AC_PROVIDE_IFELSE([LT_OUTPUT], -- dnl If the libtool generation code has been placed in $CONFIG_LT, -- dnl instead of duplicating it all over again into config.status, -- dnl then we will have config.status run $CONFIG_LT later, so it -- dnl needs to know what name is stored there: -- [AC_CONFIG_COMMANDS([libtool], -- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], -- dnl If the libtool generation code is destined for config.status, -- dnl expand the accumulated commands and init code now: -- [AC_CONFIG_COMMANDS([libtool], -- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) --])#_LT_CONFIG_COMMANDS -- -- --# Initialize. --m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], --[ -- --# The HP-UX ksh and POSIX shell print the target directory to stdout --# if CDPATH is set. --(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -- --sed_quote_subst='$sed_quote_subst' --double_quote_subst='$double_quote_subst' --delay_variable_subst='$delay_variable_subst' --_LT_CONFIG_STATUS_DECLARATIONS --LTCC='$LTCC' --LTCFLAGS='$LTCFLAGS' --compiler='$compiler_DEFAULT' -- --# Quote evaled strings. --for var in lt_decl_all_varnames([[ \ --]], lt_decl_quote_varnames); do -- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in -- *[[\\\\\\\`\\"\\\$]]*) -- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" -- ;; -- *) -- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" -- ;; -- esac --done -- --# Double-quote double-evaled strings. --for var in lt_decl_all_varnames([[ \ --]], lt_decl_dquote_varnames); do -- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in -- *[[\\\\\\\`\\"\\\$]]*) -- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" -- ;; -- *) -- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" -- ;; -- esac --done -- --# Fix-up fallback echo if it was mangled by the above quoting rules. --case \$lt_ECHO in --*'\\\[$]0 --fallback-echo"')dnl " -- lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` -- ;; --esac -- --_LT_OUTPUT_LIBTOOL_INIT --]) -- -- --# LT_OUTPUT --# --------- --# This macro allows early generation of the libtool script (before --# AC_OUTPUT is called), incase it is used in configure for compilation --# tests. --AC_DEFUN([LT_OUTPUT], --[: ${CONFIG_LT=./config.lt} --AC_MSG_NOTICE([creating $CONFIG_LT]) --cat >"$CONFIG_LT" <<_LTEOF --#! $SHELL --# Generated by $as_me. --# Run this file to recreate a libtool stub with the current configuration. -- --lt_cl_silent=false --SHELL=\${CONFIG_SHELL-$SHELL} --_LTEOF -- --cat >>"$CONFIG_LT" <<\_LTEOF --AS_SHELL_SANITIZE --_AS_PREPARE -- --exec AS_MESSAGE_FD>&1 --exec AS_MESSAGE_LOG_FD>>config.log --{ -- echo -- AS_BOX([Running $as_me.]) --} >&AS_MESSAGE_LOG_FD -- --lt_cl_help="\ --\`$as_me' creates a local libtool stub from the current configuration, --for use in further configure time tests before the real libtool is --generated. -- --Usage: $[0] [[OPTIONS]] -- -- -h, --help print this help, then exit -- -V, --version print version number, then exit -- -q, --quiet do not print progress messages -- -d, --debug don't remove temporary files -- --Report bugs to ." -- --lt_cl_version="\ --m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl --m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) --configured by $[0], generated by m4_PACKAGE_STRING. -- --Copyright (C) 2008 Free Software Foundation, Inc. --This config.lt script is free software; the Free Software Foundation --gives unlimited permision to copy, distribute and modify it." -- --while test $[#] != 0 --do -- case $[1] in -- --version | --v* | -V ) -- echo "$lt_cl_version"; exit 0 ;; -- --help | --h* | -h ) -- echo "$lt_cl_help"; exit 0 ;; -- --debug | --d* | -d ) -- debug=: ;; -- --quiet | --q* | --silent | --s* | -q ) -- lt_cl_silent=: ;; -- -- -*) AC_MSG_ERROR([unrecognized option: $[1] --Try \`$[0] --help' for more information.]) ;; -- -- *) AC_MSG_ERROR([unrecognized argument: $[1] --Try \`$[0] --help' for more information.]) ;; -- esac -- shift --done -- --if $lt_cl_silent; then -- exec AS_MESSAGE_FD>/dev/null --fi --_LTEOF -- --cat >>"$CONFIG_LT" <<_LTEOF --_LT_OUTPUT_LIBTOOL_COMMANDS_INIT --_LTEOF -- --cat >>"$CONFIG_LT" <<\_LTEOF --AC_MSG_NOTICE([creating $ofile]) --_LT_OUTPUT_LIBTOOL_COMMANDS --AS_EXIT(0) --_LTEOF --chmod +x "$CONFIG_LT" -- --# configure is writing to config.log, but config.lt does its own redirection, --# appending to config.log, which fails on DOS, as config.log is still kept --# open by configure. Here we exec the FD to /dev/null, effectively closing --# config.log, so it can be properly (re)opened and appended to by config.lt. --if test "$no_create" != yes; then -- lt_cl_success=: -- test "$silent" = yes && -- lt_config_lt_args="$lt_config_lt_args --quiet" -- exec AS_MESSAGE_LOG_FD>/dev/null -- $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -- exec AS_MESSAGE_LOG_FD>>config.log -- $lt_cl_success || AS_EXIT(1) --fi --])# LT_OUTPUT -- -- --# _LT_CONFIG(TAG) --# --------------- --# If TAG is the built-in tag, create an initial libtool script with a --# default configuration from the untagged config vars. Otherwise add code --# to config.status for appending the configuration named by TAG from the --# matching tagged config vars. --m4_defun([_LT_CONFIG], --[m4_require([_LT_FILEUTILS_DEFAULTS])dnl --_LT_CONFIG_SAVE_COMMANDS([ -- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl -- m4_if(_LT_TAG, [C], [ -- # See if we are running on zsh, and set the options which allow our -- # commands through without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -- setopt NO_GLOB_SUBST -- fi -- -- cfgfile="${ofile}T" -- trap "$RM \"$cfgfile\"; exit 1" 1 2 15 -- $RM "$cfgfile" -- -- cat <<_LT_EOF >> "$cfgfile" --#! $SHELL -- --# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. --# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: --# NOTE: Changes made to this file will be lost: look at ltmain.sh. --# --_LT_COPYING --_LT_LIBTOOL_TAGS -- --# ### BEGIN LIBTOOL CONFIG --_LT_LIBTOOL_CONFIG_VARS --_LT_LIBTOOL_TAG_VARS --# ### END LIBTOOL CONFIG -- --_LT_EOF -- -- case $host_os in -- aix3*) -- cat <<\_LT_EOF >> "$cfgfile" --# AIX sometimes has problems with the GCC collect2 program. For some --# reason, if we set the COLLECT_NAMES environment variable, the problems --# vanish in a puff of smoke. --if test "X${COLLECT_NAMES+set}" != Xset; then -- COLLECT_NAMES= -- export COLLECT_NAMES --fi --_LT_EOF -- ;; -- esac -- -- _LT_PROG_LTMAIN -- -- # We use sed instead of cat because bash on DJGPP gets confused if -- # if finds mixed CR/LF and LF-only lines. Since sed operates in -- # text mode, it properly converts lines to CR/LF. This bash problem -- # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- _LT_PROG_XSI_SHELLFNS -- -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") -- chmod +x "$ofile" --], --[cat <<_LT_EOF >> "$ofile" -- --dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded --dnl in a comment (ie after a #). --# ### BEGIN LIBTOOL TAG CONFIG: $1 --_LT_LIBTOOL_TAG_VARS(_LT_TAG) --# ### END LIBTOOL TAG CONFIG: $1 --_LT_EOF --])dnl /m4_if --], --[m4_if([$1], [], [ -- PACKAGE='$PACKAGE' -- VERSION='$VERSION' -- TIMESTAMP='$TIMESTAMP' -- RM='$RM' -- ofile='$ofile'], []) --])dnl /_LT_CONFIG_SAVE_COMMANDS --])# _LT_CONFIG -- -- --# LT_SUPPORTED_TAG(TAG) --# --------------------- --# Trace this macro to discover what tags are supported by the libtool --# --tag option, using: --# autoconf --trace 'LT_SUPPORTED_TAG:$1' --AC_DEFUN([LT_SUPPORTED_TAG], []) -- -- --# C support is built-in for now --m4_define([_LT_LANG_C_enabled], []) --m4_define([_LT_TAGS], []) -- -- --# LT_LANG(LANG) --# ------------- --# Enable libtool support for the given language if not already enabled. --AC_DEFUN([LT_LANG], --[AC_BEFORE([$0], [LT_OUTPUT])dnl --m4_case([$1], -- [C], [_LT_LANG(C)], -- [C++], [_LT_LANG(CXX)], -- [Java], [_LT_LANG(GCJ)], -- [Fortran 77], [_LT_LANG(F77)], -- [Fortran], [_LT_LANG(FC)], -- [Windows Resource], [_LT_LANG(RC)], -- [m4_ifdef([_LT_LANG_]$1[_CONFIG], -- [_LT_LANG($1)], -- [m4_fatal([$0: unsupported language: "$1"])])])dnl --])# LT_LANG -- -- --# _LT_LANG(LANGNAME) --# ------------------ --m4_defun([_LT_LANG], --[m4_ifdef([_LT_LANG_]$1[_enabled], [], -- [LT_SUPPORTED_TAG([$1])dnl -- m4_append([_LT_TAGS], [$1 ])dnl -- m4_define([_LT_LANG_]$1[_enabled], [])dnl -- _LT_LANG_$1_CONFIG($1)])dnl --])# _LT_LANG -- -- --# _LT_LANG_DEFAULT_CONFIG --# ----------------------- --m4_defun([_LT_LANG_DEFAULT_CONFIG], --[AC_PROVIDE_IFELSE([AC_PROG_CXX], -- [LT_LANG(CXX)], -- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) -- --AC_PROVIDE_IFELSE([AC_PROG_F77], -- [LT_LANG(F77)], -- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) -- --AC_PROVIDE_IFELSE([AC_PROG_FC], -- [LT_LANG(FC)], -- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) -- --dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal --dnl pulling things in needlessly. --AC_PROVIDE_IFELSE([AC_PROG_GCJ], -- [LT_LANG(GCJ)], -- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], -- [LT_LANG(GCJ)], -- [AC_PROVIDE_IFELSE([LT_PROG_GCJ], -- [LT_LANG(GCJ)], -- [m4_ifdef([AC_PROG_GCJ], -- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) -- m4_ifdef([A][M_PROG_GCJ], -- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) -- m4_ifdef([LT_PROG_GCJ], -- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) -- --AC_PROVIDE_IFELSE([LT_PROG_RC], -- [LT_LANG(RC)], -- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) --])# _LT_LANG_DEFAULT_CONFIG -- --# Obsolete macros: --AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) --AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) --AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) --AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_CXX], []) --dnl AC_DEFUN([AC_LIBTOOL_F77], []) --dnl AC_DEFUN([AC_LIBTOOL_FC], []) --dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -- -- --# _LT_TAG_COMPILER --# ---------------- --m4_defun([_LT_TAG_COMPILER], --[AC_REQUIRE([AC_PROG_CC])dnl -- --_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl --_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl --_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl --_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl -- --# If no C compiler was specified, use CC. --LTCC=${LTCC-"$CC"} -- --# If no C compiler flags were specified, use CFLAGS. --LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -- --# Allow CC to be a program name with arguments. --compiler=$CC --])# _LT_TAG_COMPILER -- -- --# _LT_COMPILER_BOILERPLATE --# ------------------------ --# Check for compiler boilerplate output or warnings with --# the simple compiler test code. --m4_defun([_LT_COMPILER_BOILERPLATE], --[m4_require([_LT_DECL_SED])dnl --ac_outfile=conftest.$ac_objext --echo "$lt_simple_compile_test_code" >conftest.$ac_ext --eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err --_lt_compiler_boilerplate=`cat conftest.err` --$RM conftest* --])# _LT_COMPILER_BOILERPLATE -- -- --# _LT_LINKER_BOILERPLATE --# ---------------------- --# Check for linker boilerplate output or warnings with --# the simple link test code. --m4_defun([_LT_LINKER_BOILERPLATE], --[m4_require([_LT_DECL_SED])dnl --ac_outfile=conftest.$ac_objext --echo "$lt_simple_link_test_code" >conftest.$ac_ext --eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err --_lt_linker_boilerplate=`cat conftest.err` --$RM -r conftest* --])# _LT_LINKER_BOILERPLATE -- --# _LT_REQUIRED_DARWIN_CHECKS --# ------------------------- --m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ -- case $host_os in -- rhapsody* | darwin*) -- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) -- AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) -- AC_CHECK_TOOL([LIPO], [lipo], [:]) -- AC_CHECK_TOOL([OTOOL], [otool], [:]) -- AC_CHECK_TOOL([OTOOL64], [otool64], [:]) -- _LT_DECL([], [DSYMUTIL], [1], -- [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) -- _LT_DECL([], [NMEDIT], [1], -- [Tool to change global to local symbols on Mac OS X]) -- _LT_DECL([], [LIPO], [1], -- [Tool to manipulate fat objects and archives on Mac OS X]) -- _LT_DECL([], [OTOOL], [1], -- [ldd/readelf like tool for Mach-O binaries on Mac OS X]) -- _LT_DECL([], [OTOOL64], [1], -- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) -- -- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], -- [lt_cv_apple_cc_single_mod=no -- if test -z "${LT_MULTI_MODULE}"; then -- # By default we will add the -single_module flag. You can override -- # by either setting the environment variable LT_MULTI_MODULE -- # non-empty at configure time, or by adding -multi_module to the -- # link flags. -- rm -rf libconftest.dylib* -- echo "int foo(void){return 1;}" > conftest.c -- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ ---dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD -- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err -- _lt_result=$? -- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then -- lt_cv_apple_cc_single_mod=yes -- else -- cat conftest.err >&AS_MESSAGE_LOG_FD -- fi -- rm -rf libconftest.dylib* -- rm -f conftest.* -- fi]) -- AC_CACHE_CHECK([for -exported_symbols_list linker flag], -- [lt_cv_ld_exported_symbols_list], -- [lt_cv_ld_exported_symbols_list=no -- save_LDFLAGS=$LDFLAGS -- echo "_main" > conftest.sym -- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" -- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], -- [lt_cv_ld_exported_symbols_list=yes], -- [lt_cv_ld_exported_symbols_list=no]) -- LDFLAGS="$save_LDFLAGS" -- ]) -- case $host_os in -- rhapsody* | darwin1.[[012]]) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; -- darwin1.*) -- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -- darwin*) # darwin 5.x on -- # if running on 10.5 or later, the deployment target defaults -- # to the OS version, if on x86, and 10.4, the deployment -- # target defaults to 10.4. Don't you love it? -- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in -- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -- 10.[[012]]*) -- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -- 10.*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -- esac -- ;; -- esac -- if test "$lt_cv_apple_cc_single_mod" = "yes"; then -- _lt_dar_single_mod='$single_module' -- fi -- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then -- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' -- else -- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' -- fi -- if test "$DSYMUTIL" != ":"; then -- _lt_dsymutil='~$DSYMUTIL $lib || :' -- else -- _lt_dsymutil= -- fi -- ;; -- esac --]) -- -- --# _LT_DARWIN_LINKER_FEATURES --# -------------------------- --# Checks for linker and compiler features on darwin --m4_defun([_LT_DARWIN_LINKER_FEATURES], --[ -- m4_require([_LT_REQUIRED_DARWIN_CHECKS]) -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_TAGVAR(hardcode_direct, $1)=no -- _LT_TAGVAR(hardcode_automatic, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -- _LT_TAGVAR(whole_archive_flag_spec, $1)='' -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" -- case $cc_basename in -- ifort*) _lt_dar_can_shared=yes ;; -- *) _lt_dar_can_shared=$GCC ;; -- esac -- if test "$_lt_dar_can_shared" = "yes"; then -- output_verbose_link_cmd=echo -- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" -- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" -- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" -- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" -- m4_if([$1], [CXX], --[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then -- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" -- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" -- fi --],[]) -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi --]) -- --# _LT_SYS_MODULE_PATH_AIX --# ----------------------- --# Links a minimal program and checks the executable --# for the system default hardcoded library path. In most cases, --# this is /usr/lib:/lib, but when the MPI compilers are used --# the location of the communication and MPI libs are included too. --# If we don't find anything, use the default library path according --# to the aix ld manual. --m4_defun([_LT_SYS_MODULE_PATH_AIX], --[m4_require([_LT_DECL_SED])dnl --AC_LINK_IFELSE(AC_LANG_PROGRAM,[ --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi],[]) --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi --])# _LT_SYS_MODULE_PATH_AIX -- -- --# _LT_SHELL_INIT(ARG) --# ------------------- --m4_define([_LT_SHELL_INIT], --[ifdef([AC_DIVERSION_NOTICE], -- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], -- [AC_DIVERT_PUSH(NOTICE)]) --$1 --AC_DIVERT_POP --])# _LT_SHELL_INIT -- -- --# _LT_PROG_ECHO_BACKSLASH --# ----------------------- --# Add some code to the start of the generated configure script which --# will find an echo command which doesn't interpret backslashes. --m4_defun([_LT_PROG_ECHO_BACKSLASH], --[_LT_SHELL_INIT([ --# Check that we are running under the correct shell. --SHELL=${CONFIG_SHELL-/bin/sh} -- --case X$lt_ECHO in --X*--fallback-echo) -- # Remove one level of quotation (which was required for Make). -- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` -- ;; --esac -- --ECHO=${lt_ECHO-echo} --if test "X[$]1" = X--no-reexec; then -- # Discard the --no-reexec flag, and continue. -- shift --elif test "X[$]1" = X--fallback-echo; then -- # Avoid inline document here, it may be left over -- : --elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then -- # Yippee, $ECHO works! -- : --else -- # Restart under the correct shell. -- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} --fi -- --if test "X[$]1" = X--fallback-echo; then -- # used as fallback echo -- shift -- cat <<_LT_EOF --[$]* --_LT_EOF -- exit 0 --fi -- --# The HP-UX ksh and POSIX shell print the target directory to stdout --# if CDPATH is set. --(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -- --if test -z "$lt_ECHO"; then -- if test "X${echo_test_string+set}" != Xset; then -- # find a string as large as possible, as long as the shell can cope with it -- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do -- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... -- if { echo_test_string=`eval $cmd`; } 2>/dev/null && -- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null -- then -- break -- fi -- done -- fi -- -- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && -- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && -- test "X$echo_testing_string" = "X$echo_test_string"; then -- : -- else -- # The Solaris, AIX, and Digital Unix default echo programs unquote -- # backslashes. This makes it impossible to quote backslashes using -- # echo "$something" | sed 's/\\/\\\\/g' -- # -- # So, first we look for a working echo in the user's PATH. -- -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for dir in $PATH /usr/ucb; do -- IFS="$lt_save_ifs" -- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && -- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && -- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && -- test "X$echo_testing_string" = "X$echo_test_string"; then -- ECHO="$dir/echo" -- break -- fi -- done -- IFS="$lt_save_ifs" -- -- if test "X$ECHO" = Xecho; then -- # We didn't find a better echo, so look for alternatives. -- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && -- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && -- test "X$echo_testing_string" = "X$echo_test_string"; then -- # This shell has a builtin print -r that does the trick. -- ECHO='print -r' -- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && -- test "X$CONFIG_SHELL" != X/bin/ksh; then -- # If we have ksh, try running configure again with it. -- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} -- export ORIGINAL_CONFIG_SHELL -- CONFIG_SHELL=/bin/ksh -- export CONFIG_SHELL -- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} -- else -- # Try using printf. -- ECHO='printf %s\n' -- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && -- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && -- test "X$echo_testing_string" = "X$echo_test_string"; then -- # Cool, printf works -- : -- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && -- test "X$echo_testing_string" = 'X\t' && -- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && -- test "X$echo_testing_string" = "X$echo_test_string"; then -- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL -- export CONFIG_SHELL -- SHELL="$CONFIG_SHELL" -- export SHELL -- ECHO="$CONFIG_SHELL [$]0 --fallback-echo" -- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && -- test "X$echo_testing_string" = 'X\t' && -- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && -- test "X$echo_testing_string" = "X$echo_test_string"; then -- ECHO="$CONFIG_SHELL [$]0 --fallback-echo" -- else -- # maybe with a smaller string... -- prev=: -- -- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do -- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null -- then -- break -- fi -- prev="$cmd" -- done -- -- if test "$prev" != 'sed 50q "[$]0"'; then -- echo_test_string=`eval $prev` -- export echo_test_string -- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} -- else -- # Oops. We lost completely, so just stick with echo. -- ECHO=echo -- fi -- fi -- fi -- fi -- fi --fi -- --# Copy echo and quote the copy suitably for passing to libtool from --# the Makefile, instead of quoting the original, which is used later. --lt_ECHO=$ECHO --if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then -- lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" --fi -- --AC_SUBST(lt_ECHO) --]) --_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) --_LT_DECL([], [ECHO], [1], -- [An echo program that does not interpret backslashes]) --])# _LT_PROG_ECHO_BACKSLASH -- -- --# _LT_ENABLE_LOCK --# --------------- --m4_defun([_LT_ENABLE_LOCK], --[AC_ARG_ENABLE([libtool-lock], -- [AS_HELP_STRING([--disable-libtool-lock], -- [avoid locking (might break parallel builds)])]) --test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -- --# Some flags need to be propagated to the compiler or linker for good --# libtool support. --case $host in --ia64-*-hpux*) -- # Find out which ABI we are using. -- echo 'int i;' > conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- case `/usr/bin/file conftest.$ac_objext` in -- *ELF-32*) -- HPUX_IA64_MODE="32" -- ;; -- *ELF-64*) -- HPUX_IA64_MODE="64" -- ;; -- esac -- fi -- rm -rf conftest* -- ;; --*-*-irix6*) -- # Find out which ABI we are using. -- echo '[#]line __oline__ "configure"' > conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- if test "$lt_cv_prog_gnu_ld" = yes; then -- case `/usr/bin/file conftest.$ac_objext` in -- *32-bit*) -- LD="${LD-ld} -melf32bsmip" -- ;; -- *N32*) -- LD="${LD-ld} -melf32bmipn32" -- ;; -- *64-bit*) -- LD="${LD-ld} -melf64bmip" -- ;; -- esac -- else -- case `/usr/bin/file conftest.$ac_objext` in -- *32-bit*) -- LD="${LD-ld} -32" -- ;; -- *N32*) -- LD="${LD-ld} -n32" -- ;; -- *64-bit*) -- LD="${LD-ld} -64" -- ;; -- esac -- fi -- fi -- rm -rf conftest* -- ;; -- --x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ --s390*-*linux*|s390*-*tpf*|sparc*-*linux*) -- # Find out which ABI we are using. -- echo 'int i;' > conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- case `/usr/bin/file conftest.o` in -- *32-bit*) -- case $host in -- x86_64-*kfreebsd*-gnu) -- LD="${LD-ld} -m elf_i386_fbsd" -- ;; -- x86_64-*linux*) -- LD="${LD-ld} -m elf_i386" -- ;; -- ppc64-*linux*|powerpc64-*linux*) -- LD="${LD-ld} -m elf32ppclinux" -- ;; -- s390x-*linux*) -- LD="${LD-ld} -m elf_s390" -- ;; -- sparc64-*linux*) -- LD="${LD-ld} -m elf32_sparc" -- ;; -- esac -- ;; -- *64-bit*) -- case $host in -- x86_64-*kfreebsd*-gnu) -- LD="${LD-ld} -m elf_x86_64_fbsd" -- ;; -- x86_64-*linux*) -- LD="${LD-ld} -m elf_x86_64" -- ;; -- ppc*-*linux*|powerpc*-*linux*) -- LD="${LD-ld} -m elf64ppc" -- ;; -- s390*-*linux*|s390*-*tpf*) -- LD="${LD-ld} -m elf64_s390" -- ;; -- sparc*-*linux*) -- LD="${LD-ld} -m elf64_sparc" -- ;; -- esac -- ;; -- esac -- fi -- rm -rf conftest* -- ;; -- --*-*-sco3.2v5*) -- # On SCO OpenServer 5, we need -belf to get full-featured binaries. -- SAVE_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -belf" -- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, -- [AC_LANG_PUSH(C) -- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) -- AC_LANG_POP]) -- if test x"$lt_cv_cc_needs_belf" != x"yes"; then -- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -- CFLAGS="$SAVE_CFLAGS" -- fi -- ;; --sparc*-*solaris*) -- # Find out which ABI we are using. -- echo 'int i;' > conftest.$ac_ext -- if AC_TRY_EVAL(ac_compile); then -- case `/usr/bin/file conftest.o` in -- *64-bit*) -- case $lt_cv_prog_gnu_ld in -- yes*) LD="${LD-ld} -m elf64_sparc" ;; -- *) -- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then -- LD="${LD-ld} -64" -- fi -- ;; -- esac -- ;; -- esac -- fi -- rm -rf conftest* -- ;; --esac -- --need_locks="$enable_libtool_lock" --])# _LT_ENABLE_LOCK -- -- --# _LT_CMD_OLD_ARCHIVE --# ------------------- --m4_defun([_LT_CMD_OLD_ARCHIVE], --[AC_CHECK_TOOL(AR, ar, false) --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru --_LT_DECL([], [AR], [1], [The archiver]) --_LT_DECL([], [AR_FLAGS], [1]) -- --AC_CHECK_TOOL(STRIP, strip, :) --test -z "$STRIP" && STRIP=: --_LT_DECL([], [STRIP], [1], [A symbol stripping program]) -- --AC_CHECK_TOOL(RANLIB, ranlib, :) --test -z "$RANLIB" && RANLIB=: --_LT_DECL([], [RANLIB], [1], -- [Commands used to install an old-style archive]) -- --# Determine commands to create old-style static archives. --old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' --old_postinstall_cmds='chmod 644 $oldlib' --old_postuninstall_cmds= -- --if test -n "$RANLIB"; then -- case $host_os in -- openbsd*) -- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" -- ;; -- *) -- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" -- ;; -- esac -- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" --fi --_LT_DECL([], [old_postinstall_cmds], [2]) --_LT_DECL([], [old_postuninstall_cmds], [2]) --_LT_TAGDECL([], [old_archive_cmds], [2], -- [Commands used to build an old-style archive]) --])# _LT_CMD_OLD_ARCHIVE -- -- --# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, --# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) --# ---------------------------------------------------------------- --# Check whether the given compiler option works --AC_DEFUN([_LT_COMPILER_OPTION], --[m4_require([_LT_FILEUTILS_DEFAULTS])dnl --m4_require([_LT_DECL_SED])dnl --AC_CACHE_CHECK([$1], [$2], -- [$2=no -- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) -- echo "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$3" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- # The option is referenced via a variable to avoid confusing sed. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) -- (eval "$lt_compile" 2>conftest.err) -- ac_status=$? -- cat conftest.err >&AS_MESSAGE_LOG_FD -- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD -- if (exit $ac_status) && test -s "$ac_outfile"; then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings other than the usual output. -- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp -- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 -- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then -- $2=yes -- fi -- fi -- $RM conftest* --]) -- --if test x"[$]$2" = xyes; then -- m4_if([$5], , :, [$5]) --else -- m4_if([$6], , :, [$6]) --fi --])# _LT_COMPILER_OPTION -- --# Old name: --AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) -- -- --# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, --# [ACTION-SUCCESS], [ACTION-FAILURE]) --# ---------------------------------------------------- --# Check whether the given linker option works --AC_DEFUN([_LT_LINKER_OPTION], --[m4_require([_LT_FILEUTILS_DEFAULTS])dnl --m4_require([_LT_DECL_SED])dnl --AC_CACHE_CHECK([$1], [$2], -- [$2=no -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS $3" -- echo "$lt_simple_link_test_code" > conftest.$ac_ext -- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then -- # The linker can only warn and ignore the option if not recognized -- # So say no if there are warnings -- if test -s conftest.err; then -- # Append any errors to the config.log. -- cat conftest.err 1>&AS_MESSAGE_LOG_FD -- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp -- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 -- if diff conftest.exp conftest.er2 >/dev/null; then -- $2=yes -- fi -- else -- $2=yes -- fi -- fi -- $RM -r conftest* -- LDFLAGS="$save_LDFLAGS" --]) -- --if test x"[$]$2" = xyes; then -- m4_if([$4], , :, [$4]) --else -- m4_if([$5], , :, [$5]) --fi --])# _LT_LINKER_OPTION -- --# Old name: --AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) -- -- --# LT_CMD_MAX_LEN --#--------------- --AC_DEFUN([LT_CMD_MAX_LEN], --[AC_REQUIRE([AC_CANONICAL_HOST])dnl --# find the maximum length of command line arguments --AC_MSG_CHECKING([the maximum length of command line arguments]) --AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl -- i=0 -- teststring="ABCD" -- -- case $build_os in -- msdosdjgpp*) -- # On DJGPP, this test can blow up pretty badly due to problems in libc -- # (any single argument exceeding 2000 bytes causes a buffer overrun -- # during glob expansion). Even if it were fixed, the result of this -- # check would be larger than it should be. -- lt_cv_sys_max_cmd_len=12288; # 12K is about right -- ;; -- -- gnu*) -- # Under GNU Hurd, this test is not required because there is -- # no limit to the length of command line arguments. -- # Libtool will interpret -1 as no limit whatsoever -- lt_cv_sys_max_cmd_len=-1; -- ;; -- -- cygwin* | mingw* | cegcc*) -- # On Win9x/ME, this test blows up -- it succeeds, but takes -- # about 5 minutes as the teststring grows exponentially. -- # Worse, since 9x/ME are not pre-emptively multitasking, -- # you end up with a "frozen" computer, even though with patience -- # the test eventually succeeds (with a max line length of 256k). -- # Instead, let's just punt: use the minimum linelength reported by -- # all of the supported platforms: 8192 (on NT/2K/XP). -- lt_cv_sys_max_cmd_len=8192; -- ;; -- -- amigaos*) -- # On AmigaOS with pdksh, this test takes hours, literally. -- # So we just punt and use a minimum line length of 8192. -- lt_cv_sys_max_cmd_len=8192; -- ;; -- -- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) -- # This has been around since 386BSD, at least. Likely further. -- if test -x /sbin/sysctl; then -- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` -- elif test -x /usr/sbin/sysctl; then -- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` -- else -- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs -- fi -- # And add a safety zone -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` -- ;; -- -- interix*) -- # We know the value 262144 and hardcode it with a safety zone (like BSD) -- lt_cv_sys_max_cmd_len=196608 -- ;; -- -- osf*) -- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure -- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not -- # nice to cause kernel panics so lets avoid the loop below. -- # First set a reasonable default. -- lt_cv_sys_max_cmd_len=16384 -- # -- if test -x /sbin/sysconfig; then -- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in -- *1*) lt_cv_sys_max_cmd_len=-1 ;; -- esac -- fi -- ;; -- sco3.2v5*) -- lt_cv_sys_max_cmd_len=102400 -- ;; -- sysv5* | sco5v6* | sysv4.2uw2*) -- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` -- if test -n "$kargmax"; then -- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` -- else -- lt_cv_sys_max_cmd_len=32768 -- fi -- ;; -- *) -- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` -- if test -n "$lt_cv_sys_max_cmd_len"; then -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` -- else -- # Make teststring a little bigger before we do anything with it. -- # a 1K string should be a reasonable start. -- for i in 1 2 3 4 5 6 7 8 ; do -- teststring=$teststring$teststring -- done -- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} -- # If test is not a shell built-in, we'll probably end up computing a -- # maximum length that is only half of the actual maximum length, but -- # we can't tell. -- while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ -- = "XX$teststring$teststring"; } >/dev/null 2>&1 && -- test $i != 17 # 1/2 MB should be enough -- do -- i=`expr $i + 1` -- teststring=$teststring$teststring -- done -- # Only check the string length outside the loop. -- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` -- teststring= -- # Add a significant safety factor because C++ compilers can tack on -- # massive amounts of additional arguments before passing them to the -- # linker. It appears as though 1/2 is a usable value. -- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` -- fi -- ;; -- esac --]) --if test -n $lt_cv_sys_max_cmd_len ; then -- AC_MSG_RESULT($lt_cv_sys_max_cmd_len) --else -- AC_MSG_RESULT(none) --fi --max_cmd_len=$lt_cv_sys_max_cmd_len --_LT_DECL([], [max_cmd_len], [0], -- [What is the maximum length of a command?]) --])# LT_CMD_MAX_LEN -- --# Old name: --AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) -- -- --# _LT_HEADER_DLFCN --# ---------------- --m4_defun([_LT_HEADER_DLFCN], --[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl --])# _LT_HEADER_DLFCN -- -- --# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, --# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) --# ---------------------------------------------------------------- --m4_defun([_LT_TRY_DLOPEN_SELF], --[m4_require([_LT_HEADER_DLFCN])dnl --if test "$cross_compiling" = yes; then : -- [$4] --else -- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -- lt_status=$lt_dlunknown -- cat > conftest.$ac_ext <<_LT_EOF --[#line __oline__ "configure" --#include "confdefs.h" -- --#if HAVE_DLFCN_H --#include --#endif -- --#include -- --#ifdef RTLD_GLOBAL --# define LT_DLGLOBAL RTLD_GLOBAL --#else --# ifdef DL_GLOBAL --# define LT_DLGLOBAL DL_GLOBAL --# else --# define LT_DLGLOBAL 0 --# endif --#endif -- --/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -- find out it does not work in some platform. */ --#ifndef LT_DLLAZY_OR_NOW --# ifdef RTLD_LAZY --# define LT_DLLAZY_OR_NOW RTLD_LAZY --# else --# ifdef DL_LAZY --# define LT_DLLAZY_OR_NOW DL_LAZY --# else --# ifdef RTLD_NOW --# define LT_DLLAZY_OR_NOW RTLD_NOW --# else --# ifdef DL_NOW --# define LT_DLLAZY_OR_NOW DL_NOW --# else --# define LT_DLLAZY_OR_NOW 0 --# endif --# endif --# endif --# endif --#endif -- --void fnord() { int i=42;} --int main () --{ -- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -- int status = $lt_dlunknown; -- -- if (self) -- { -- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -- /* dlclose (self); */ -- } -- else -- puts (dlerror ()); -- -- return status; --}] --_LT_EOF -- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then -- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null -- lt_status=$? -- case x$lt_status in -- x$lt_dlno_uscore) $1 ;; -- x$lt_dlneed_uscore) $2 ;; -- x$lt_dlunknown|x*) $3 ;; -- esac -- else : -- # compilation failed -- $3 -- fi --fi --rm -fr conftest* --])# _LT_TRY_DLOPEN_SELF -- -- --# LT_SYS_DLOPEN_SELF --# ------------------ --AC_DEFUN([LT_SYS_DLOPEN_SELF], --[m4_require([_LT_HEADER_DLFCN])dnl --if test "x$enable_dlopen" != xyes; then -- enable_dlopen=unknown -- enable_dlopen_self=unknown -- enable_dlopen_self_static=unknown --else -- lt_cv_dlopen=no -- lt_cv_dlopen_libs= -- -- case $host_os in -- beos*) -- lt_cv_dlopen="load_add_on" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- ;; -- -- mingw* | pw32* | cegcc*) -- lt_cv_dlopen="LoadLibrary" -- lt_cv_dlopen_libs= -- ;; -- -- cygwin*) -- lt_cv_dlopen="dlopen" -- lt_cv_dlopen_libs= -- ;; -- -- darwin*) -- # if libdl is installed we need to link against it -- AC_CHECK_LIB([dl], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ -- lt_cv_dlopen="dyld" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- ]) -- ;; -- -- *) -- AC_CHECK_FUNC([shl_load], -- [lt_cv_dlopen="shl_load"], -- [AC_CHECK_LIB([dld], [shl_load], -- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], -- [AC_CHECK_FUNC([dlopen], -- [lt_cv_dlopen="dlopen"], -- [AC_CHECK_LIB([dl], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], -- [AC_CHECK_LIB([svld], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], -- [AC_CHECK_LIB([dld], [dld_link], -- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) -- ]) -- ]) -- ]) -- ]) -- ]) -- ;; -- esac -- -- if test "x$lt_cv_dlopen" != xno; then -- enable_dlopen=yes -- else -- enable_dlopen=no -- fi -- -- case $lt_cv_dlopen in -- dlopen) -- save_CPPFLAGS="$CPPFLAGS" -- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -- -- save_LDFLAGS="$LDFLAGS" -- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -- -- save_LIBS="$LIBS" -- LIBS="$lt_cv_dlopen_libs $LIBS" -- -- AC_CACHE_CHECK([whether a program can dlopen itself], -- lt_cv_dlopen_self, [dnl -- _LT_TRY_DLOPEN_SELF( -- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, -- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) -- ]) -- -- if test "x$lt_cv_dlopen_self" = xyes; then -- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" -- AC_CACHE_CHECK([whether a statically linked program can dlopen itself], -- lt_cv_dlopen_self_static, [dnl -- _LT_TRY_DLOPEN_SELF( -- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, -- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) -- ]) -- fi -- -- CPPFLAGS="$save_CPPFLAGS" -- LDFLAGS="$save_LDFLAGS" -- LIBS="$save_LIBS" -- ;; -- esac -- -- case $lt_cv_dlopen_self in -- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; -- *) enable_dlopen_self=unknown ;; -- esac -- -- case $lt_cv_dlopen_self_static in -- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; -- *) enable_dlopen_self_static=unknown ;; -- esac --fi --_LT_DECL([dlopen_support], [enable_dlopen], [0], -- [Whether dlopen is supported]) --_LT_DECL([dlopen_self], [enable_dlopen_self], [0], -- [Whether dlopen of programs is supported]) --_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], -- [Whether dlopen of statically linked programs is supported]) --])# LT_SYS_DLOPEN_SELF -- --# Old name: --AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) -- -- --# _LT_COMPILER_C_O([TAGNAME]) --# --------------------------- --# Check to see if options -c and -o are simultaneously supported by compiler. --# This macro does not hard code the compiler like AC_PROG_CC_C_O. --m4_defun([_LT_COMPILER_C_O], --[m4_require([_LT_DECL_SED])dnl --m4_require([_LT_FILEUTILS_DEFAULTS])dnl --m4_require([_LT_TAG_COMPILER])dnl --AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], -- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], -- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no -- $RM -r conftest 2>/dev/null -- mkdir conftest -- cd conftest -- mkdir out -- echo "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- lt_compiler_flag="-o out/conftest2.$ac_objext" -- # Insert the option either (1) after the last *FLAGS variable, or -- # (2) before a word containing "conftest.", or (3) at the end. -- # Note that $ac_compile itself does not contain backslashes and begins -- # with a dollar sign (not a hyphen), so the echo should work correctly. -- lt_compile=`echo "$ac_compile" | $SED \ -- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -- -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) -- (eval "$lt_compile" 2>out/conftest.err) -- ac_status=$? -- cat out/conftest.err >&AS_MESSAGE_LOG_FD -- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD -- if (exit $ac_status) && test -s out/conftest2.$ac_objext -- then -- # The compiler can only warn and ignore the option if not recognized -- # So say no if there are warnings -- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp -- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 -- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then -- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes -- fi -- fi -- chmod u+w . 2>&AS_MESSAGE_LOG_FD -- $RM conftest* -- # SGI C++ compiler will create directory out/ii_files/ for -- # template instantiation -- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files -- $RM out/* && rmdir out -- cd .. -- $RM -r conftest -- $RM conftest* --]) --_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], -- [Does compiler simultaneously support -c and -o options?]) --])# _LT_COMPILER_C_O -- -- --# _LT_COMPILER_FILE_LOCKS([TAGNAME]) --# ---------------------------------- --# Check to see if we can do hard links to lock some files if needed --m4_defun([_LT_COMPILER_FILE_LOCKS], --[m4_require([_LT_ENABLE_LOCK])dnl --m4_require([_LT_FILEUTILS_DEFAULTS])dnl --_LT_COMPILER_C_O([$1]) -- --hard_links="nottested" --if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then -- # do not overwrite the value of need_locks provided by the user -- AC_MSG_CHECKING([if we can lock with hard links]) -- hard_links=yes -- $RM conftest* -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- touch conftest.a -- ln conftest.a conftest.b 2>&5 || hard_links=no -- ln conftest.a conftest.b 2>/dev/null && hard_links=no -- AC_MSG_RESULT([$hard_links]) -- if test "$hard_links" = no; then -- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) -- need_locks=warn -- fi --else -- need_locks=no --fi --_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) --])# _LT_COMPILER_FILE_LOCKS -- -- --# _LT_CHECK_OBJDIR --# ---------------- --m4_defun([_LT_CHECK_OBJDIR], --[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], --[rm -f .libs 2>/dev/null --mkdir .libs 2>/dev/null --if test -d .libs; then -- lt_cv_objdir=.libs --else -- # MS-DOS does not allow filenames that begin with a dot. -- lt_cv_objdir=_libs --fi --rmdir .libs 2>/dev/null]) --objdir=$lt_cv_objdir --_LT_DECL([], [objdir], [0], -- [The name of the directory that contains temporary libtool files])dnl --m4_pattern_allow([LT_OBJDIR])dnl --AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", -- [Define to the sub-directory in which libtool stores uninstalled libraries.]) --])# _LT_CHECK_OBJDIR -- -- --# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) --# -------------------------------------- --# Check hardcoding attributes. --m4_defun([_LT_LINKER_HARDCODE_LIBPATH], --[AC_MSG_CHECKING([how to hardcode library paths into programs]) --_LT_TAGVAR(hardcode_action, $1)= --if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || -- test -n "$_LT_TAGVAR(runpath_var, $1)" || -- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then -- -- # We can hardcode non-existent directories. -- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && -- # If the only mechanism to avoid hardcoding is shlibpath_var, we -- # have to relink, otherwise we might link with an installed library -- # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && -- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then -- # Linking always hardcodes the temporary library directory. -- _LT_TAGVAR(hardcode_action, $1)=relink -- else -- # We can link without hardcoding, and we can hardcode nonexisting dirs. -- _LT_TAGVAR(hardcode_action, $1)=immediate -- fi --else -- # We cannot hardcode anything, or else we can only hardcode existing -- # directories. -- _LT_TAGVAR(hardcode_action, $1)=unsupported --fi --AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -- --if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || -- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then -- # Fast installation is not supported -- enable_fast_install=no --elif test "$shlibpath_overrides_runpath" = yes || -- test "$enable_shared" = no; then -- # Fast installation is not necessary -- enable_fast_install=needless --fi --_LT_TAGDECL([], [hardcode_action], [0], -- [How to hardcode a shared library path into an executable]) --])# _LT_LINKER_HARDCODE_LIBPATH -- -- --# _LT_CMD_STRIPLIB --# ---------------- --m4_defun([_LT_CMD_STRIPLIB], --[m4_require([_LT_DECL_EGREP]) --striplib= --old_striplib= --AC_MSG_CHECKING([whether stripping libraries is possible]) --if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then -- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" -- test -z "$striplib" && striplib="$STRIP --strip-unneeded" -- AC_MSG_RESULT([yes]) --else --# FIXME - insert some real tests, host_os isn't really good enough -- case $host_os in -- darwin*) -- if test -n "$STRIP" ; then -- striplib="$STRIP -x" -- old_striplib="$STRIP -S" -- AC_MSG_RESULT([yes]) -- else -- AC_MSG_RESULT([no]) -- fi -- ;; -- *) -- AC_MSG_RESULT([no]) -- ;; -- esac --fi --_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) --_LT_DECL([], [striplib], [1]) --])# _LT_CMD_STRIPLIB -- -- --# _LT_SYS_DYNAMIC_LINKER([TAG]) --# ----------------------------- --# PORTME Fill in your ld.so characteristics --m4_defun([_LT_SYS_DYNAMIC_LINKER], --[AC_REQUIRE([AC_CANONICAL_HOST])dnl --m4_require([_LT_DECL_EGREP])dnl --m4_require([_LT_FILEUTILS_DEFAULTS])dnl --m4_require([_LT_DECL_OBJDUMP])dnl --m4_require([_LT_DECL_SED])dnl --AC_MSG_CHECKING([dynamic linker characteristics]) --m4_if([$1], -- [], [ --if test "$GCC" = yes; then -- case $host_os in -- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; -- *) lt_awk_arg="/^libraries:/" ;; -- esac -- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then -- # if the path contains ";" then we assume it to be the separator -- # otherwise default to the standard path separator (i.e. ":") - it is -- # assumed that no part of a normal pathname contains ";" but that should -- # okay in the real world where ";" in dirpaths is itself problematic. -- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` -- else -- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi -- # Ok, now we have the path, separated by spaces, we can step through it -- # and add multilib dir if necessary. -- lt_tmp_lt_search_path_spec= -- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` -- for lt_sys_path in $lt_search_path_spec; do -- if test -d "$lt_sys_path/$lt_multi_os_dir"; then -- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" -- else -- test -d "$lt_sys_path" && \ -- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" -- fi -- done -- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' --BEGIN {RS=" "; FS="/|\n";} { -- lt_foo=""; -- lt_count=0; -- for (lt_i = NF; lt_i > 0; lt_i--) { -- if ($lt_i != "" && $lt_i != ".") { -- if ($lt_i == "..") { -- lt_count++; -- } else { -- if (lt_count == 0) { -- lt_foo="/" $lt_i lt_foo; -- } else { -- lt_count--; -- } -- } -- } -- } -- if (lt_foo != "") { lt_freq[[lt_foo]]++; } -- if (lt_freq[[lt_foo]] == 1) { print lt_foo; } --}'` -- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` --else -- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" --fi]) --library_names_spec= --libname_spec='lib$name' --soname_spec= --shrext_cmds=".so" --postinstall_cmds= --postuninstall_cmds= --finish_cmds= --finish_eval= --shlibpath_var= --shlibpath_overrides_runpath=unknown --version_type=none --dynamic_linker="$host_os ld.so" --sys_lib_dlsearch_path_spec="/lib /usr/lib" --need_lib_prefix=unknown --hardcode_into_libs=no -- --# when you set need_version to no, make sure it does not cause -set_version --# flags to be left without arguments --need_version=unknown -- --case $host_os in --aix3*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -- shlibpath_var=LIBPATH -- -- # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- --aix[[4-9]]*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- hardcode_into_libs=yes -- if test "$host_cpu" = ia64; then -- # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- else -- # With GCC up to 2.95.x, collect2 would create an import file -- # for dependence libraries. The import file would start with -- # the line `#! .'. This would cause the generated library to -- # depend on `.', always an invalid library. This was fixed in -- # development snapshots of GCC prior to 3.0. -- case $host_os in -- aix4 | aix4.[[01]] | aix4.[[01]].*) -- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' -- echo ' yes ' -- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then -- : -- else -- can_build_shared=no -- fi -- ;; -- esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -- # soname into executable. Probably we can add versioning support to -- # collect2, so additional links can be useful in future. -- if test "$aix_use_runtimelinking" = yes; then -- # If using run time linking (on AIX 4.2 or later) use lib.so -- # instead of lib.a to let people know that these are not -- # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- else -- # We preserve .a as extension for shared libraries through AIX4.2 -- # and later when we are not doing run time linking. -- library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -- fi -- shlibpath_var=LIBPATH -- fi -- ;; -- --amigaos*) -- case $host_cpu in -- powerpc) -- # Since July 2007 AmigaOS4 officially supports .so libraries. -- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- ;; -- m68k) -- library_names_spec='$libname.ixlibrary $libname.a' -- # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -- ;; -- esac -- ;; -- --beos*) -- library_names_spec='${libname}${shared_ext}' -- dynamic_linker="$host_os ld.so" -- shlibpath_var=LIBRARY_PATH -- ;; -- --bsdi[[45]]*) -- version_type=linux -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" -- # the default ld.so.conf also contains /usr/contrib/lib and -- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow -- # libtool to hard-code these into programs -- ;; -- --cygwin* | mingw* | pw32* | cegcc*) -- version_type=windows -- shrext_cmds=".dll" -- need_version=no -- need_lib_prefix=no -- -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -- library_names_spec='$libname.dll.a' -- # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -- dldir=$destdir/`dirname \$dlpath`~ -- test -d \$dldir || mkdir -p \$dldir~ -- $install_prog $dir/$dlname \$dldir/$dlname~ -- chmod a+x \$dldir/$dlname~ -- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then -- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; -- fi' -- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -- dlpath=$dir/\$dldll~ -- $RM \$dlpath' -- shlibpath_overrides_runpath=yes -- -- case $host_os in -- cygwin*) -- # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" -- ;; -- mingw* | cegcc*) -- # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` -- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then -- # It is most probably a Windows format PATH printed by -- # mingw gcc, but we are running on Cygwin. Gcc prints its search -- # path with ; separators, and with drive letters. We can handle the -- # drive letters (cygwin fileutils understands them), so leave them, -- # especially as we might pass files found there to a mingw objdump, -- # which wouldn't understand a cygwinified path. Ahh. -- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -- else -- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -- fi -- ;; -- pw32*) -- # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -- ;; -- esac -- ;; -- -- *) -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' -- ;; -- esac -- dynamic_linker='Win32 ld.exe' -- # FIXME: first we should search . and the directory the executable is in -- shlibpath_var=PATH -- ;; -- --darwin* | rhapsody*) -- dynamic_linker="$host_os dyld" -- version_type=darwin -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -- shlibpath_overrides_runpath=yes -- shlibpath_var=DYLD_LIBRARY_PATH -- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' --m4_if([$1], [],[ -- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) -- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' -- ;; -- --dgux*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --freebsd1*) -- dynamic_linker=no -- ;; -- --freebsd* | dragonfly*) -- # DragonFly does not have aout. When/if they implement a new -- # versioning mechanism, adjust this. -- if test -x /usr/bin/objformat; then -- objformat=`/usr/bin/objformat` -- else -- case $host_os in -- freebsd[[123]]*) objformat=aout ;; -- *) objformat=elf ;; -- esac -- fi -- version_type=freebsd-$objformat -- case $version_type in -- freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- need_version=no -- need_lib_prefix=no -- ;; -- freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -- need_version=yes -- ;; -- esac -- shlibpath_var=LD_LIBRARY_PATH -- case $host_os in -- freebsd2*) -- shlibpath_overrides_runpath=yes -- ;; -- freebsd3.[[01]]* | freebsdelf3.[[01]]*) -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ -- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- *) # from 4.6 on, and DragonFly -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- esac -- ;; -- --gnu*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- hardcode_into_libs=yes -- ;; -- --hpux9* | hpux10* | hpux11*) -- # Give a soname corresponding to the major version so that dld.sl refuses to -- # link against other versions. -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- case $host_cpu in -- ia64*) -- shrext_cmds='.so' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.so" -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -- else -- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -- fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- hppa*64*) -- shrext_cmds='.sl' -- hardcode_into_libs=yes -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH -- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -- ;; -- *) -- shrext_cmds='.sl' -- dynamic_linker="$host_os dld.sl" -- shlibpath_var=SHLIB_PATH -- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- ;; -- esac -- # HP-UX runs *really* slowly unless shared libraries are mode 555. -- postinstall_cmds='chmod 555 $lib' -- ;; -- --interix[[3-9]]*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- --irix5* | irix6* | nonstopux*) -- case $host_os in -- nonstopux*) version_type=nonstopux ;; -- *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -- version_type=linux -- else -- version_type=irix -- fi ;; -- esac -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -- case $host_os in -- irix5* | nonstopux*) -- libsuff= shlibsuff= -- ;; -- *) -- case $LD in # libtool.m4 will add one of these switches to LD -- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") -- libsuff= shlibsuff= libmagic=32-bit;; -- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") -- libsuff=32 shlibsuff=N32 libmagic=N32;; -- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") -- libsuff=64 shlibsuff=64 libmagic=64-bit;; -- *) libsuff= shlibsuff= libmagic=never-match;; -- esac -- ;; -- esac -- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -- hardcode_into_libs=yes -- ;; -- --# No shared lib support for Linux oldld, aout, or coff. --linux*oldld* | linux*aout* | linux*coff*) -- dynamic_linker=no -- ;; -- --# This must be Linux ELF. --linux* | k*bsd*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- # Some binutils ld are patched to set DT_RUNPATH -- save_LDFLAGS=$LDFLAGS -- save_libdir=$libdir -- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ -- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" -- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], -- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], -- [shlibpath_overrides_runpath=yes])]) -- LDFLAGS=$save_LDFLAGS -- libdir=$save_libdir -- -- # This implies no fast_install, which is unacceptable. -- # Some rework will be needed to allow for fast_install -- # before this can be enabled. -- hardcode_into_libs=yes -- -- # Append ld.so.conf contents to the search path -- if test -f /etc/ld.so.conf; then -- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -- fi -- -- # We used to test for /lib/ld.so.1 and disable shared libraries on -- # powerpc, because MkLinux only supported shared libraries with the -- # GNU dynamic linker. Since this was broken with cross compilers, -- # most powerpc-linux boxes support dynamic linking these days and -- # people can always --disable-shared, the test was removed, and we -- # assume the GNU/Linux dynamic linker is in use. -- dynamic_linker='GNU/Linux ld.so' -- ;; -- --netbsdelf*-gnu) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='NetBSD ld.elf_so' -- ;; -- --netbsd*) -- version_type=sunos -- need_lib_prefix=no -- need_version=no -- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- dynamic_linker='NetBSD (a.out) ld.so' -- else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- dynamic_linker='NetBSD ld.elf_so' -- fi -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- ;; -- --newsos6) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- ;; -- --*nto* | *qnx*) -- version_type=qnx -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- dynamic_linker='ldqnx.so' -- ;; -- --openbsd*) -- version_type=sunos -- sys_lib_dlsearch_path_spec="/usr/lib" -- need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[[89]] | openbsd2.[[89]].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -- else -- shlibpath_overrides_runpath=yes -- fi -- ;; -- --os2*) -- libname_spec='$name' -- shrext_cmds=".dll" -- need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -- dynamic_linker='OS/2 ld.exe' -- shlibpath_var=LIBPATH -- ;; -- --osf3* | osf4* | osf5*) -- version_type=osf -- need_lib_prefix=no -- need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -- ;; -- --rdos*) -- dynamic_linker=no -- ;; -- --solaris*) -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- # ldd complains unless libraries are executable -- postinstall_cmds='chmod +x $lib' -- ;; -- --sunos4*) -- version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- if test "$with_gnu_ld" = yes; then -- need_lib_prefix=no -- fi -- need_version=yes -- ;; -- --sysv4 | sysv4.3*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- case $host_vendor in -- sni) -- shlibpath_overrides_runpath=no -- need_lib_prefix=no -- runpath_var=LD_RUN_PATH -- ;; -- siemens) -- need_lib_prefix=no -- ;; -- motorola) -- need_lib_prefix=no -- need_version=no -- shlibpath_overrides_runpath=no -- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' -- ;; -- esac -- ;; -- --sysv4*MP*) -- if test -d /usr/nec ;then -- version_type=linux -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -- shlibpath_var=LD_LIBRARY_PATH -- fi -- ;; -- --sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) -- version_type=freebsd-elf -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=yes -- hardcode_into_libs=yes -- if test "$with_gnu_ld" = yes; then -- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' -- else -- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' -- case $host_os in -- sco3.2v5*) -- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" -- ;; -- esac -- fi -- sys_lib_dlsearch_path_spec='/usr/lib' -- ;; -- --tpf*) -- # TPF is a cross-target only. Preferred cross-host = GNU/Linux. -- version_type=linux -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- --uts4*) -- version_type=linux -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- ;; -- --*) -- dynamic_linker=no -- ;; --esac --AC_MSG_RESULT([$dynamic_linker]) --test "$dynamic_linker" = no && can_build_shared=no -- --variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" --fi -- --if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then -- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" --fi --if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then -- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" --fi -- --_LT_DECL([], [variables_saved_for_relink], [1], -- [Variables whose values should be saved in libtool wrapper scripts and -- restored at link time]) --_LT_DECL([], [need_lib_prefix], [0], -- [Do we need the "lib" prefix for modules?]) --_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) --_LT_DECL([], [version_type], [0], [Library versioning type]) --_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) --_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) --_LT_DECL([], [shlibpath_overrides_runpath], [0], -- [Is shlibpath searched before the hard-coded library search path?]) --_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) --_LT_DECL([], [library_names_spec], [1], -- [[List of archive names. First name is the real one, the rest are links. -- The last name is the one that the linker finds with -lNAME]]) --_LT_DECL([], [soname_spec], [1], -- [[The coded name of the library, if different from the real name]]) --_LT_DECL([], [postinstall_cmds], [2], -- [Command to use after installation of a shared archive]) --_LT_DECL([], [postuninstall_cmds], [2], -- [Command to use after uninstallation of a shared archive]) --_LT_DECL([], [finish_cmds], [2], -- [Commands used to finish a libtool library installation in a directory]) --_LT_DECL([], [finish_eval], [1], -- [[As "finish_cmds", except a single script fragment to be evaled but -- not shown]]) --_LT_DECL([], [hardcode_into_libs], [0], -- [Whether we should hardcode library paths into libraries]) --_LT_DECL([], [sys_lib_search_path_spec], [2], -- [Compile-time system search path for libraries]) --_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], -- [Run-time system search path for libraries]) --])# _LT_SYS_DYNAMIC_LINKER -- -- --# _LT_PATH_TOOL_PREFIX(TOOL) --# -------------------------- --# find a file program which can recognize shared library --AC_DEFUN([_LT_PATH_TOOL_PREFIX], --[m4_require([_LT_DECL_EGREP])dnl --AC_MSG_CHECKING([for $1]) --AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, --[case $MAGIC_CMD in --[[\\/*] | ?:[\\/]*]) -- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -- ;; --*) -- lt_save_MAGIC_CMD="$MAGIC_CMD" -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR --dnl $ac_dummy forces splitting on constant user-supplied paths. --dnl POSIX.2 word splitting is done only on the output of word expansions, --dnl not every word. This closes a longstanding sh security hole. -- ac_dummy="m4_if([$2], , $PATH, [$2])" -- for ac_dir in $ac_dummy; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$1; then -- lt_cv_path_MAGIC_CMD="$ac_dir/$1" -- if test -n "$file_magic_test_file"; then -- case $deplibs_check_method in -- "file_magic "*) -- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` -- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | -- $EGREP "$file_magic_regex" > /dev/null; then -- : -- else -- cat <<_LT_EOF 1>&2 -- --*** Warning: the command libtool uses to detect shared libraries, --*** $file_magic_cmd, produces output that libtool cannot recognize. --*** The result is that libtool may fail to recognize shared libraries --*** as such. This will affect the creation of libtool libraries that --*** depend on shared libraries, but programs linked with such libtool --*** libraries will work regardless of this problem. Nevertheless, you --*** may want to report the problem to your system manager and/or to --*** bug-libtool@gnu.org -- --_LT_EOF -- fi ;; -- esac -- fi -- break -- fi -- done -- IFS="$lt_save_ifs" -- MAGIC_CMD="$lt_save_MAGIC_CMD" -- ;; --esac]) --MAGIC_CMD="$lt_cv_path_MAGIC_CMD" --if test -n "$MAGIC_CMD"; then -- AC_MSG_RESULT($MAGIC_CMD) --else -- AC_MSG_RESULT(no) --fi --_LT_DECL([], [MAGIC_CMD], [0], -- [Used to examine libraries when file_magic_cmd begins with "file"])dnl --])# _LT_PATH_TOOL_PREFIX -- --# Old name: --AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) -- -- --# _LT_PATH_MAGIC --# -------------- --# find a file program which can recognize a shared library --m4_defun([_LT_PATH_MAGIC], --[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) --if test -z "$lt_cv_path_MAGIC_CMD"; then -- if test -n "$ac_tool_prefix"; then -- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) -- else -- MAGIC_CMD=: -- fi --fi --])# _LT_PATH_MAGIC -- -- --# LT_PATH_LD --# ---------- --# find the pathname to the GNU or non-GNU linker --AC_DEFUN([LT_PATH_LD], --[AC_REQUIRE([AC_PROG_CC])dnl --AC_REQUIRE([AC_CANONICAL_HOST])dnl --AC_REQUIRE([AC_CANONICAL_BUILD])dnl --m4_require([_LT_DECL_SED])dnl --m4_require([_LT_DECL_EGREP])dnl -- --AC_ARG_WITH([gnu-ld], -- [AS_HELP_STRING([--with-gnu-ld], -- [assume the C compiler uses GNU ld @<:@default=no@:>@])], -- [test "$withval" = no || with_gnu_ld=yes], -- [with_gnu_ld=no])dnl -- --ac_prog=ld --if test "$GCC" = yes; then -- # Check if gcc -print-prog-name=ld gives a path. -- AC_MSG_CHECKING([for ld used by $CC]) -- case $host in -- *-*-mingw*) -- # gcc leaves a trailing carriage return which upsets mingw -- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -- *) -- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -- esac -- case $ac_prog in -- # Accept absolute paths. -- [[\\/]]* | ?:[[\\/]]*) -- re_direlt='/[[^/]][[^/]]*/\.\./' -- # Canonicalize the pathname of ld -- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` -- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do -- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` -- done -- test -z "$LD" && LD="$ac_prog" -- ;; -- "") -- # If it fails, then pretend we aren't using GCC. -- ac_prog=ld -- ;; -- *) -- # If it is relative, then search for the first ld in PATH. -- with_gnu_ld=unknown -- ;; -- esac --elif test "$with_gnu_ld" = yes; then -- AC_MSG_CHECKING([for GNU ld]) --else -- AC_MSG_CHECKING([for non-GNU ld]) --fi --AC_CACHE_VAL(lt_cv_path_LD, --[if test -z "$LD"; then -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in $PATH; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- lt_cv_path_LD="$ac_dir/$ac_prog" -- # Check to see if the program is GNU ld. I'd rather use --version, -- # but apparently some variants of GNU ld only accept -v. -- # Break only if it was the GNU/non-GNU ld that we prefer. -- case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then -- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' -- lt_cv_file_magic_cmd='func_win32_libid' -- else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -- lt_cv_file_magic_cmd='$OBJDUMP -f' -- fi -- ;; -- --cegcc) -- # use the weaker test based on 'objdump'. See mingw*. -- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' -- lt_cv_file_magic_cmd='$OBJDUMP -f' -- ;; -- --darwin* | rhapsody*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --freebsd* | dragonfly*) -- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then -- case $host_cpu in -- i*86 ) -- # Not sure whether the presence of OpenBSD here was a mistake. -- # Let's accept both of them until this is cleared up. -- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' -- lt_cv_file_magic_cmd=/usr/bin/file -- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` -- ;; -- esac -- else -- lt_cv_deplibs_check_method=pass_all -- fi -- ;; -- --gnu*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --hpux10.20* | hpux11*) -- lt_cv_file_magic_cmd=/usr/bin/file -- case $host_cpu in -- ia64*) -- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' -- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so -- ;; -- hppa*64*) -- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] -- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl -- ;; -- *) -- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' -- lt_cv_file_magic_test_file=/usr/lib/libc.sl -- ;; -- esac -- ;; -- --interix[[3-9]]*) -- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' -- ;; -- --irix5* | irix6* | nonstopux*) -- case $LD in -- *-32|*"-32 ") libmagic=32-bit;; -- *-n32|*"-n32 ") libmagic=N32;; -- *-64|*"-64 ") libmagic=64-bit;; -- *) libmagic=never-match;; -- esac -- lt_cv_deplibs_check_method=pass_all -- ;; -- --# This must be Linux ELF. --linux* | k*bsd*-gnu) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --netbsd* | netbsdelf*-gnu) -- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' -- else -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' -- fi -- ;; -- --newos6*) -- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' -- lt_cv_file_magic_cmd=/usr/bin/file -- lt_cv_file_magic_test_file=/usr/lib/libnls.so -- ;; -- --*nto* | *qnx*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --openbsd*) -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' -- else -- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' -- fi -- ;; -- --osf3* | osf4* | osf5*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --rdos*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --solaris*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- --sysv4 | sysv4.3*) -- case $host_vendor in -- motorola) -- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' -- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` -- ;; -- ncr) -- lt_cv_deplibs_check_method=pass_all -- ;; -- sequent) -- lt_cv_file_magic_cmd='/bin/file' -- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' -- ;; -- sni) -- lt_cv_file_magic_cmd='/bin/file' -- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" -- lt_cv_file_magic_test_file=/lib/libc.so -- ;; -- siemens) -- lt_cv_deplibs_check_method=pass_all -- ;; -- pc) -- lt_cv_deplibs_check_method=pass_all -- ;; -- esac -- ;; -- --tpf*) -- lt_cv_deplibs_check_method=pass_all -- ;; --esac --]) --file_magic_cmd=$lt_cv_file_magic_cmd --deplibs_check_method=$lt_cv_deplibs_check_method --test -z "$deplibs_check_method" && deplibs_check_method=unknown -- --_LT_DECL([], [deplibs_check_method], [1], -- [Method to check whether dependent libraries are shared objects]) --_LT_DECL([], [file_magic_cmd], [1], -- [Command to use when deplibs_check_method == "file_magic"]) --])# _LT_CHECK_MAGIC_METHOD -- -- --# LT_PATH_NM --# ---------- --# find the pathname to a BSD- or MS-compatible name lister --AC_DEFUN([LT_PATH_NM], --[AC_REQUIRE([AC_PROG_CC])dnl --AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, --[if test -n "$NM"; then -- # Let the user override the test. -- lt_cv_path_NM="$NM" --else -- lt_nm_to_check="${ac_tool_prefix}nm" -- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then -- lt_nm_to_check="$lt_nm_to_check nm" -- fi -- for lt_tmp_nm in $lt_nm_to_check; do -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do -- IFS="$lt_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- tmp_nm="$ac_dir/$lt_tmp_nm" -- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then -- # Check to see if the nm accepts a BSD-compat flag. -- # Adding the `sed 1q' prevents false positives on HP-UX, which says: -- # nm: unknown option "B" ignored -- # Tru64's nm complains that /dev/null is an invalid object file -- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in -- */dev/null* | *'Invalid file or object type'*) -- lt_cv_path_NM="$tmp_nm -B" -- break -- ;; -- *) -- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in -- */dev/null*) -- lt_cv_path_NM="$tmp_nm -p" -- break -- ;; -- *) -- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -- continue # so that we can try to find one that supports BSD flags -- ;; -- esac -- ;; -- esac -- fi -- done -- IFS="$lt_save_ifs" -- done -- : ${lt_cv_path_NM=no} --fi]) --if test "$lt_cv_path_NM" != "no"; then -- NM="$lt_cv_path_NM" --else -- # Didn't find any BSD compatible name lister, look for dumpbin. -- AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) -- AC_SUBST([DUMPBIN]) -- if test "$DUMPBIN" != ":"; then -- NM="$DUMPBIN" -- fi --fi --test -z "$NM" && NM=nm --AC_SUBST([NM]) --_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl -- --AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], -- [lt_cv_nm_interface="BSD nm" -- echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) -- (eval "$ac_compile" 2>conftest.err) -- cat conftest.err >&AS_MESSAGE_LOG_FD -- (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) -- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) -- cat conftest.err >&AS_MESSAGE_LOG_FD -- (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) -- cat conftest.out >&AS_MESSAGE_LOG_FD -- if $GREP 'External.*some_variable' conftest.out > /dev/null; then -- lt_cv_nm_interface="MS dumpbin" -- fi -- rm -f conftest*]) --])# LT_PATH_NM -- --# Old names: --AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) --AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AM_PROG_NM], []) --dnl AC_DEFUN([AC_PROG_NM], []) -- -- --# LT_LIB_M --# -------- --# check for math library --AC_DEFUN([LT_LIB_M], --[AC_REQUIRE([AC_CANONICAL_HOST])dnl --LIBM= --case $host in --*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) -- # These system don't have libm, or don't need it -- ;; --*-ncr-sysv4.3*) -- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") -- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") -- ;; --*) -- AC_CHECK_LIB(m, cos, LIBM="-lm") -- ;; --esac --AC_SUBST([LIBM]) --])# LT_LIB_M -- --# Old name: --AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_CHECK_LIBM], []) -- -- --# _LT_COMPILER_NO_RTTI([TAGNAME]) --# ------------------------------- --m4_defun([_LT_COMPILER_NO_RTTI], --[m4_require([_LT_TAG_COMPILER])dnl -- --_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -- --if test "$GCC" = yes; then -- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -- -- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], -- lt_cv_prog_compiler_rtti_exceptions, -- [-fno-rtti -fno-exceptions], [], -- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) --fi --_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], -- [Compiler flag to turn off builtin functions]) --])# _LT_COMPILER_NO_RTTI -- -- --# _LT_CMD_GLOBAL_SYMBOLS --# ---------------------- --m4_defun([_LT_CMD_GLOBAL_SYMBOLS], --[AC_REQUIRE([AC_CANONICAL_HOST])dnl --AC_REQUIRE([AC_PROG_CC])dnl --AC_REQUIRE([LT_PATH_NM])dnl --AC_REQUIRE([LT_PATH_LD])dnl --m4_require([_LT_DECL_SED])dnl --m4_require([_LT_DECL_EGREP])dnl --m4_require([_LT_TAG_COMPILER])dnl -- --# Check for command to grab the raw symbol name followed by C symbol from nm. --AC_MSG_CHECKING([command to parse $NM output from $compiler object]) --AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], --[ --# These are sane defaults that work on at least a few old systems. --# [They come from Ultrix. What could be older than Ultrix?!! ;)] -- --# Character class describing NM global symbol codes. --symcode='[[BCDEGRST]]' -- --# Regexp to match symbols that can be accessed directly from C. --sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -- --# Define system-specific variables. --case $host_os in --aix*) -- symcode='[[BCDT]]' -- ;; --cygwin* | mingw* | pw32* | cegcc*) -- symcode='[[ABCDGISTW]]' -- ;; --hpux*) -- if test "$host_cpu" = ia64; then -- symcode='[[ABCDEGRST]]' -- fi -- ;; --irix* | nonstopux*) -- symcode='[[BCDEGRST]]' -- ;; --osf*) -- symcode='[[BCDEGQRST]]' -- ;; --solaris*) -- symcode='[[BDRT]]' -- ;; --sco3.2v5*) -- symcode='[[DT]]' -- ;; --sysv4.2uw2*) -- symcode='[[DT]]' -- ;; --sysv5* | sco5v6* | unixware* | OpenUNIX*) -- symcode='[[ABDT]]' -- ;; --sysv4) -- symcode='[[DFNSTU]]' -- ;; --esac -- --# If we're using GNU nm, then use its standard symbol codes. --case `$NM -V 2>&1` in --*GNU* | *'with BFD'*) -- symcode='[[ABCDGIRSTW]]' ;; --esac -- --# Transform an extracted symbol line into a proper C declaration. --# Some systems (esp. on ia64) link data and code symbols differently, --# so use this general approach. --lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -- --# Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -- --# Handle CRLF in mingw tool chain --opt_cr= --case $build_os in --mingw*) -- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp -- ;; --esac -- --# Try without a prefix underscore, then with it. --for ac_symprfx in "" "_"; do -- -- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. -- symxfrm="\\1 $ac_symprfx\\2 \\2" -- -- # Write the raw and C identifiers. -- if test "$lt_cv_nm_interface" = "MS dumpbin"; then -- # Fake it for dumpbin and say T for any non-static function -- # and D for any global variable. -- # Also find C++ and __fastcall symbols from MSVC++, -- # which start with @ or ?. -- lt_cv_sys_global_symbol_pipe="$AWK ['"\ --" {last_section=section; section=\$ 3};"\ --" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ --" \$ 0!~/External *\|/{next};"\ --" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ --" {if(hide[section]) next};"\ --" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ --" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ --" s[1]~/^[@?]/{print s[1], s[1]; next};"\ --" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ --" ' prfx=^$ac_symprfx]" -- else -- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" -- fi -- -- # Check to see that the pipe works correctly. -- pipe_works=no -- -- rm -f conftest* -- cat > conftest.$ac_ext <<_LT_EOF --#ifdef __cplusplus --extern "C" { --#endif --char nm_test_var; --void nm_test_func(void); --void nm_test_func(void){} --#ifdef __cplusplus --} --#endif --int main(){nm_test_var='a';nm_test_func();return(0);} --_LT_EOF -- -- if AC_TRY_EVAL(ac_compile); then -- # Now try to grab the symbols. -- nlist=conftest.nm -- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then -- # Try sorting and uniquifying the output. -- if sort "$nlist" | uniq > "$nlist"T; then -- mv -f "$nlist"T "$nlist" -- else -- rm -f "$nlist"T -- fi -- -- # Make sure that we snagged all the symbols we need. -- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then -- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then -- cat <<_LT_EOF > conftest.$ac_ext --#ifdef __cplusplus --extern "C" { --#endif -- --_LT_EOF -- # Now generate the symbol file. -- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' -- -- cat <<_LT_EOF >> conftest.$ac_ext -- --/* The mapping between symbol names and symbols. */ --const struct { -- const char *name; -- void *address; --} --lt__PROGRAM__LTX_preloaded_symbols[[]] = --{ -- { "@PROGRAM@", (void *) 0 }, --_LT_EOF -- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext -- cat <<\_LT_EOF >> conftest.$ac_ext -- {0, (void *) 0} --}; -- --/* This works around a problem in FreeBSD linker */ --#ifdef FREEBSD_WORKAROUND --static const void *lt_preloaded_setup() { -- return lt__PROGRAM__LTX_preloaded_symbols; --} --#endif -- --#ifdef __cplusplus --} --#endif --_LT_EOF -- # Now try linking the two files. -- mv conftest.$ac_objext conftstm.$ac_objext -- lt_save_LIBS="$LIBS" -- lt_save_CFLAGS="$CFLAGS" -- LIBS="conftstm.$ac_objext" -- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" -- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then -- pipe_works=yes -- fi -- LIBS="$lt_save_LIBS" -- CFLAGS="$lt_save_CFLAGS" -- else -- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD -- fi -- else -- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD -- fi -- else -- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD -- fi -- else -- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD -- cat conftest.$ac_ext >&5 -- fi -- rm -rf conftest* conftst* -- -- # Do not use the global_symbol_pipe unless it works. -- if test "$pipe_works" = yes; then -- break -- else -- lt_cv_sys_global_symbol_pipe= -- fi --done --]) --if test -z "$lt_cv_sys_global_symbol_pipe"; then -- lt_cv_sys_global_symbol_to_cdecl= --fi --if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then -- AC_MSG_RESULT(failed) --else -- AC_MSG_RESULT(ok) --fi -- --_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], -- [Take the output of nm and produce a listing of raw symbols and C names]) --_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], -- [Transform the output of nm in a proper C declaration]) --_LT_DECL([global_symbol_to_c_name_address], -- [lt_cv_sys_global_symbol_to_c_name_address], [1], -- [Transform the output of nm in a C name address pair]) --_LT_DECL([global_symbol_to_c_name_address_lib_prefix], -- [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], -- [Transform the output of nm in a C name address pair when lib prefix is needed]) --]) # _LT_CMD_GLOBAL_SYMBOLS -- -- --# _LT_COMPILER_PIC([TAGNAME]) --# --------------------------- --m4_defun([_LT_COMPILER_PIC], --[m4_require([_LT_TAG_COMPILER])dnl --_LT_TAGVAR(lt_prog_compiler_wl, $1)= --_LT_TAGVAR(lt_prog_compiler_pic, $1)= --_LT_TAGVAR(lt_prog_compiler_static, $1)= -- --AC_MSG_CHECKING([for $compiler option to produce PIC]) --m4_if([$1], [CXX], [ -- # C++ specific cases for pic, static, wl, etc. -- if test "$GXX" = yes; then -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -- -- case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- fi -- ;; -- -- amigaos*) -- case $host_cpu in -- powerpc) -- # see comment about AmigaOS4 .so support -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- m68k) -- # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' -- ;; -- esac -- ;; -- -- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -- # PIC is the default for these OSes. -- ;; -- mingw* | cygwin* | os2* | pw32* | cegcc*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- # Although the cygwin gcc ignores -fPIC, still need this for old-style -- # (--disable-auto-import) libraries -- m4_if([$1], [GCJ], [], -- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -- ;; -- darwin* | rhapsody*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' -- ;; -- *djgpp*) -- # DJGPP does not support shared libraries at all -- _LT_TAGVAR(lt_prog_compiler_pic, $1)= -- ;; -- interix[[3-9]]*) -- # Interix 3.x gcc -fpic/-fPIC options generate broken code. -- # Instead, we relocate shared libraries at runtime. -- ;; -- sysv4*MP*) -- if test -d /usr/nec; then -- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic -- fi -- ;; -- hpux*) -- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit -- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag -- # sets the default TLS model and affects inlining. -- case $host_cpu in -- hppa*64*) -- ;; -- *) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- ;; -- *qnx* | *nto*) -- # QNX uses GNU C++, but need to define -shared option too, otherwise -- # it will coredump. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' -- ;; -- *) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- else -- case $host_os in -- aix[[4-9]]*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- else -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' -- fi -- ;; -- chorus*) -- case $cc_basename in -- cxch68*) -- # Green Hills C++ Compiler -- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" -- ;; -- esac -- ;; -- dgux*) -- case $cc_basename in -- ec++*) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- ;; -- ghcx*) -- # Green Hills C++ Compiler -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- ;; -- *) -- ;; -- esac -- ;; -- freebsd* | dragonfly*) -- # FreeBSD uses GNU C++ -- ;; -- hpux9* | hpux10* | hpux11*) -- case $cc_basename in -- CC*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' -- if test "$host_cpu" != ia64; then -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' -- fi -- ;; -- aCC*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' -- ;; -- esac -- ;; -- *) -- ;; -- esac -- ;; -- interix*) -- # This is c89, which is MS Visual C++ (no shared libs) -- # Anyone wants to do a port? -- ;; -- irix5* | irix6* | nonstopux*) -- case $cc_basename in -- CC*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- # CC pic flag -KPIC is the default. -- ;; -- *) -- ;; -- esac -- ;; -- linux* | k*bsd*-gnu) -- case $cc_basename in -- KCC*) -- # KAI C++ Compiler -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- ecpc* ) -- # old Intel C++ for x86_64 which still supported -KPIC. -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -- ;; -- icpc* ) -- # Intel C++, used to be incompatible with GCC. -- # ICC 10 doesn't accept -KPIC any more. -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -- ;; -- pgCC* | pgcpp*) -- # Portland Group C++ compiler -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- cxx*) -- # Compaq C++ -- # Make sure the PIC flag is empty. It appears that all Alpha -- # Linux and Compaq Tru64 Unix objects are PIC. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)= -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- xlc* | xlC*) -- # IBM XL 8.0 on PPC -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' -- ;; -- *) -- case `$CC -V 2>&1 | sed 5q` in -- *Sun\ C*) -- # Sun C++ 5.9 -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' -- ;; -- esac -- ;; -- esac -- ;; -- lynxos*) -- ;; -- m88k*) -- ;; -- mvs*) -- case $cc_basename in -- cxx*) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' -- ;; -- *) -- ;; -- esac -- ;; -- netbsd* | netbsdelf*-gnu) -- ;; -- *qnx* | *nto*) -- # QNX uses GNU C++, but need to define -shared option too, otherwise -- # it will coredump. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' -- ;; -- osf3* | osf4* | osf5*) -- case $cc_basename in -- KCC*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- ;; -- cxx*) -- # Digital/Compaq C++ -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # Make sure the PIC flag is empty. It appears that all Alpha -- # Linux and Compaq Tru64 Unix objects are PIC. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)= -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- *) -- ;; -- esac -- ;; -- psos*) -- ;; -- solaris*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.2, 5.x and Centerline C++ -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' -- ;; -- gcx*) -- # Green Hills C++ Compiler -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -- ;; -- *) -- ;; -- esac -- ;; -- sunos4*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.x -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- lcc*) -- # Lucid -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- ;; -- *) -- ;; -- esac -- ;; -- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) -- case $cc_basename in -- CC*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- esac -- ;; -- tandem*) -- case $cc_basename in -- NCC*) -- # NonStop-UX NCC 3.20 -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- ;; -- *) -- ;; -- esac -- ;; -- vxworks*) -- ;; -- *) -- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- ;; -- esac -- fi --], --[ -- if test "$GCC" = yes; then -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -- -- case $host_os in -- aix*) -- # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- fi -- ;; -- -- amigaos*) -- case $host_cpu in -- powerpc) -- # see comment about AmigaOS4 .so support -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- m68k) -- # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' -- ;; -- esac -- ;; -- -- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) -- # PIC is the default for these OSes. -- ;; -- -- mingw* | cygwin* | pw32* | os2* | cegcc*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- # Although the cygwin gcc ignores -fPIC, still need this for old-style -- # (--disable-auto-import) libraries -- m4_if([$1], [GCJ], [], -- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -- ;; -- -- darwin* | rhapsody*) -- # PIC is the default on this platform -- # Common symbols not allowed in MH_DYLIB files -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' -- ;; -- -- hpux*) -- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit -- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag -- # sets the default TLS model and affects inlining. -- case $host_cpu in -- hppa*64*) -- # +Z the default -- ;; -- *) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- ;; -- -- interix[[3-9]]*) -- # Interix 3.x gcc -fpic/-fPIC options generate broken code. -- # Instead, we relocate shared libraries at runtime. -- ;; -- -- msdosdjgpp*) -- # Just because we use GCC doesn't mean we suddenly get shared libraries -- # on systems that don't support them. -- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- enable_shared=no -- ;; -- -- *nto* | *qnx*) -- # QNX uses GNU C++, but need to define -shared option too, otherwise -- # it will coredump. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec; then -- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic -- fi -- ;; -- -- *) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- ;; -- esac -- else -- # PORTME Check for flag to pass linker flags through the system compiler. -- case $host_os in -- aix*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- if test "$host_cpu" = ia64; then -- # AIX 5 now supports IA64 processor -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- else -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' -- fi -- ;; -- -- mingw* | cygwin* | pw32* | os2* | cegcc*) -- # This hack is so that the source file can tell whether it is being -- # built for inclusion in a dll (and should export symbols for example). -- m4_if([$1], [GCJ], [], -- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -- ;; -- -- hpux9* | hpux10* | hpux11*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but -- # not for PA HP-UX. -- case $host_cpu in -- hppa*64*|ia64*) -- # +Z the default -- ;; -- *) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' -- ;; -- esac -- # Is there a better lt_prog_compiler_static that works with the bundled CC? -- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' -- ;; -- -- irix5* | irix6* | nonstopux*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # PIC (with -KPIC) is the default. -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- -- linux* | k*bsd*-gnu) -- case $cc_basename in -- # old Intel for x86_64 which still supported -KPIC. -- ecc*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -- ;; -- # icc used to be incompatible with GCC. -- # ICC 10 doesn't accept -KPIC any more. -- icc* | ifort*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -- ;; -- # Lahey Fortran 8.1. -- lf95*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' -- ;; -- pgcc* | pgf77* | pgf90* | pgf95*) -- # Portland Group compilers (*not* the Pentium gcc compiler, -- # which looks to be a dead project) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- ccc*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # All Alpha code is PIC. -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- xl*) -- # IBM XL C 8.0/Fortran 10.1 on PPC -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' -- ;; -- *) -- case `$CC -V 2>&1 | sed 5q` in -- *Sun\ C*) -- # Sun C 5.9 -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- ;; -- *Sun\ F*) -- # Sun Fortran 8.3 passes all unrecognized flags to the linker -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='' -- ;; -- esac -- ;; -- esac -- ;; -- -- newsos6) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- -- *nto* | *qnx*) -- # QNX uses GNU C++, but need to define -shared option too, otherwise -- # it will coredump. -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' -- ;; -- -- osf3* | osf4* | osf5*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- # All OSF/1 code is PIC. -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- -- rdos*) -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' -- ;; -- -- solaris*) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- case $cc_basename in -- f77* | f90* | f95*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; -- *) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; -- esac -- ;; -- -- sunos4*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- -- sysv4 | sysv4.2uw2* | sysv4.3*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec ;then -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- fi -- ;; -- -- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- -- unicos*) -- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- ;; -- -- uts4*) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -- ;; -- -- *) -- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no -- ;; -- esac -- fi --]) --case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -- *djgpp*) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)= -- ;; -- *) -- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" -- ;; --esac --AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) --_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], -- [How to pass a linker flag through the compiler]) -- --# --# Check to make sure the PIC flag actually works. --# --if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then -- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], -- [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], -- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], -- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in -- "" | " "*) ;; -- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; -- esac], -- [_LT_TAGVAR(lt_prog_compiler_pic, $1)= -- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) --fi --_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], -- [Additional compiler flags for building library objects]) -- --# --# Check to make sure the static flag actually works. --# --wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" --_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], -- _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), -- $lt_tmp_static_flag, -- [], -- [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) --_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], -- [Compiler flag to prevent dynamic linking]) --])# _LT_COMPILER_PIC -- -- --# _LT_LINKER_SHLIBS([TAGNAME]) --# ---------------------------- --# See if the linker supports building shared libraries. --m4_defun([_LT_LINKER_SHLIBS], --[AC_REQUIRE([LT_PATH_LD])dnl --AC_REQUIRE([LT_PATH_NM])dnl --m4_require([_LT_FILEUTILS_DEFAULTS])dnl --m4_require([_LT_DECL_EGREP])dnl --m4_require([_LT_DECL_SED])dnl --m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl --m4_require([_LT_TAG_COMPILER])dnl --AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) --m4_if([$1], [CXX], [ -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- case $host_os in -- aix[[4-9]]*) -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -- else -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -- fi -- ;; -- pw32*) -- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" -- ;; -- cygwin* | mingw* | cegcc*) -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -- linux* | k*bsd*-gnu) -- _LT_TAGVAR(link_all_deplibs, $1)=no -- ;; -- *) -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -- esac -- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] --], [ -- runpath_var= -- _LT_TAGVAR(allow_undefined_flag, $1)= -- _LT_TAGVAR(always_export_symbols, $1)=no -- _LT_TAGVAR(archive_cmds, $1)= -- _LT_TAGVAR(archive_expsym_cmds, $1)= -- _LT_TAGVAR(compiler_needs_object, $1)=no -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no -- _LT_TAGVAR(export_dynamic_flag_spec, $1)= -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- _LT_TAGVAR(hardcode_automatic, $1)=no -- _LT_TAGVAR(hardcode_direct, $1)=no -- _LT_TAGVAR(hardcode_direct_absolute, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -- _LT_TAGVAR(hardcode_libdir_separator, $1)= -- _LT_TAGVAR(hardcode_minus_L, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -- _LT_TAGVAR(inherit_rpath, $1)=no -- _LT_TAGVAR(link_all_deplibs, $1)=unknown -- _LT_TAGVAR(module_cmds, $1)= -- _LT_TAGVAR(module_expsym_cmds, $1)= -- _LT_TAGVAR(old_archive_from_new_cmds, $1)= -- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= -- _LT_TAGVAR(thread_safe_flag_spec, $1)= -- _LT_TAGVAR(whole_archive_flag_spec, $1)= -- # include_expsyms should be a list of space-separated symbols to be *always* -- # included in the symbol list -- _LT_TAGVAR(include_expsyms, $1)= -- # exclude_expsyms can be an extended regexp of symbols to exclude -- # it will be wrapped by ` (' and `)$', so one must not match beginning or -- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -- # as well as any symbol that contains `d'. -- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -- # platforms (ab)use it in PIC code, but their linkers get confused if -- # the symbol is explicitly referenced. Since portable code cannot -- # rely on this symbol name, it's probably fine to never include it in -- # preloaded symbol tables. -- # Exclude shared library initialization/finalization symbols. --dnl Note also adjust exclude_expsyms for C++ above. -- extract_expsyms_cmds= -- -- case $host_os in -- cygwin* | mingw* | pw32* | cegcc*) -- # FIXME: the MSVC++ port hasn't been tested in a loooong time -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- if test "$GCC" != yes; then -- with_gnu_ld=no -- fi -- ;; -- interix*) -- # we just hope/assume this is gcc and not c89 (= MSVC++) -- with_gnu_ld=yes -- ;; -- openbsd*) -- with_gnu_ld=no -- ;; -- linux* | k*bsd*-gnu) -- _LT_TAGVAR(link_all_deplibs, $1)=no -- ;; -- esac -- -- _LT_TAGVAR(ld_shlibs, $1)=yes -- if test "$with_gnu_ld" = yes; then -- # If archive_cmds runs LD, not CC, wlarc should be empty -- wlarc='${wl}' -- -- # Set some defaults for GNU ld with shared library support. These -- # are reset later if shared libraries are not supported. Putting them -- # here allows them to be overridden if necessary. -- runpath_var=LD_RUN_PATH -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- # ancient GNU ld didn't support --whole-archive et. al. -- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then -- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- else -- _LT_TAGVAR(whole_archive_flag_spec, $1)= -- fi -- supports_anon_versioning=no -- case `$LD -v 2>&1` in -- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 -- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... -- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... -- *\ 2.11.*) ;; # other 2.11 versions -- *) supports_anon_versioning=yes ;; -- esac -- -- # See if GNU ld supports shared libraries. -- case $host_os in -- aix[[3-9]]*) -- # On AIX/PPC, the GNU linker is very broken -- if test "$host_cpu" != ia64; then -- _LT_TAGVAR(ld_shlibs, $1)=no -- cat <<_LT_EOF 1>&2 -- --*** Warning: the GNU linker, at least up to release 2.9.1, is reported --*** to be unable to reliably create shared libraries on AIX. --*** Therefore, libtool is disabling shared libraries support. If you --*** really care for shared libraries, you may want to modify your PATH --*** so that a non-GNU linker is found, and then restart. -- --_LT_EOF -- fi -- ;; -- -- amigaos*) -- case $host_cpu in -- powerpc) -- # see comment about AmigaOS4 .so support -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='' -- ;; -- m68k) -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- ;; -- esac -- ;; -- -- beos*) -- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Joseph Beckenbach says some releases of gcc -- # support --undefined. This deserves some investigation. FIXME -- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- -- cygwin* | mingw* | pw32* | cegcc*) -- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -- # as there is no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(always_export_symbols, $1)=no -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' -- -- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- -- interix[[3-9]]*) -- _LT_TAGVAR(hardcode_direct, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. -- # Instead, shared libraries are loaded at an image base (0x10000000 by -- # default) and relocated if they conflict, which is a slow very memory -- # consuming and fragmenting process. To avoid this, we pick a random, -- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link -- # time. Moving up from 0x10000000 also allows more sbrk(2) space. -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -- ;; -- -- gnu* | linux* | tpf* | k*bsd*-gnu) -- tmp_diet=no -- if test "$host_os" = linux-dietlibc; then -- case $cc_basename in -- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) -- esac -- fi -- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ -- && test "$tmp_diet" = no -- then -- tmp_addflag= -- tmp_sharedflag='-shared' -- case $cc_basename,$host_cpu in -- pgcc*) # Portland Group C compiler -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag' -- ;; -- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' -- tmp_addflag=' $pic_flag -Mnomain' ;; -- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 -- tmp_addflag=' -i_dynamic' ;; -- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 -- tmp_addflag=' -i_dynamic -nofor_main' ;; -- ifc* | ifort*) # Intel Fortran compiler -- tmp_addflag=' -nofor_main' ;; -- lf95*) # Lahey Fortran 8.1 -- _LT_TAGVAR(whole_archive_flag_spec, $1)= -- tmp_sharedflag='--shared' ;; -- xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) -- tmp_sharedflag='-qmkshrobj' -- tmp_addflag= ;; -- esac -- case `$CC -V 2>&1 | sed 5q` in -- *Sun\ C*) # Sun C 5.9 -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' -- _LT_TAGVAR(compiler_needs_object, $1)=yes -- tmp_sharedflag='-G' ;; -- *Sun\ F*) # Sun Fortran 8.3 -- tmp_sharedflag='-G' ;; -- esac -- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- -- if test "x$supports_anon_versioning" = xyes; then -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -- fi -- -- case $cc_basename in -- xlf*) -- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself -- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' -- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -- if test "x$supports_anon_versioning" = xyes; then -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -- fi -- ;; -- esac -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- -- netbsd* | netbsdelf*-gnu) -- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' -- wlarc= -- else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- fi -- ;; -- -- solaris*) -- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then -- _LT_TAGVAR(ld_shlibs, $1)=no -- cat <<_LT_EOF 1>&2 -- --*** Warning: The releases 2.8.* of the GNU linker cannot reliably --*** create shared libraries on Solaris systems. Therefore, libtool --*** is disabling shared libraries support. We urge you to upgrade GNU --*** binutils to release 2.9.1 or newer. Another option is to modify --*** your PATH or compiler configuration so that the native linker is --*** used, and then restart. -- --_LT_EOF -- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- -- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) -- case `$LD -v 2>&1` in -- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) -- _LT_TAGVAR(ld_shlibs, $1)=no -- cat <<_LT_EOF 1>&2 -- --*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not --*** reliably create shared libraries on SCO systems. Therefore, libtool --*** is disabling shared libraries support. We urge you to upgrade GNU --*** binutils to release 2.16.91.0.3 or newer. Another option is to modify --*** your PATH or compiler configuration so that the native linker is --*** used, and then restart. -- --_LT_EOF -- ;; -- *) -- # For security reasons, it is highly recommended that you always -- # use absolute paths for naming shared libraries, and exclude the -- # DT_RUNPATH tag from executables and libraries. But doing so -- # requires that you compile everything twice, which is a pain. -- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -- ;; -- -- sunos4*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- wlarc= -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- *) -- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -- -- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then -- runpath_var= -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -- _LT_TAGVAR(export_dynamic_flag_spec, $1)= -- _LT_TAGVAR(whole_archive_flag_spec, $1)= -- fi -- else -- # PORTME fill in a description of your system's linker (not GNU ld) -- case $host_os in -- aix3*) -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(always_export_symbols, $1)=yes -- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' -- # Note: this linker hardcodes the directories in LIBPATH if there -- # are no directories specified by -L. -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then -- # Neither direct hardcoding nor static linking is supported with a -- # broken collect2. -- _LT_TAGVAR(hardcode_direct, $1)=unsupported -- fi -- ;; -- -- aix[[4-9]]*) -- if test "$host_cpu" = ia64; then -- # On IA64, the linker does run time linking by default, so we don't -- # have to do anything special. -- aix_use_runtimelinking=no -- exp_sym_flag='-Bexport' -- no_entry_flag="" -- else -- # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -- else -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -- fi -- aix_use_runtimelinking=no -- -- # Test if we are trying to use run time linking or normal -- # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) -- for ld_flag in $LDFLAGS; do -- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then -- aix_use_runtimelinking=yes -- break -- fi -- done -- ;; -- esac -- -- exp_sym_flag='-bexport' -- no_entry_flag='-bnoentry' -- fi -- -- # When large executables or shared objects are built, AIX ld can -- # have problems creating the table of contents. If linking a library -- # or program results in "error TOC overflow" add -mminimal-toc to -- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -- -- _LT_TAGVAR(archive_cmds, $1)='' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(hardcode_libdir_separator, $1)=':' -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' -- -- if test "$GCC" = yes; then -- case $host_os in aix4.[[012]]|aix4.[[012]].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -- if test -f "$collect2name" && -- strings "$collect2name" | $GREP resolve_lib_name >/dev/null -- then -- # We have reworked collect2 -- : -- else -- # We have old collect2 -- _LT_TAGVAR(hardcode_direct, $1)=unsupported -- # It fails to find uninstalled libraries when the uninstalled -- # path is not listed in the libpath. Setting hardcode_minus_L -- # to unsupported forces relinking -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)= -- fi -- ;; -- esac -- shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi -- _LT_TAGVAR(link_all_deplibs, $1)=no -- else -- # not using gcc -- if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -- else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -- else -- shared_flag='${wl}-bM:SRE' -- fi -- fi -- fi -- -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to export. -- _LT_TAGVAR(always_export_symbols, $1)=yes -- if test "$aix_use_runtimelinking" = yes; then -- # Warning - without using the other runtime loading flags (-brtl), -- # -berok will link without error, but may produce a broken library. -- _LT_TAGVAR(allow_undefined_flag, $1)='-berok' -- # Determine the default libpath from the value encoded in an -- # empty executable. -- _LT_SYS_MODULE_PATH_AIX -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -- if test "$host_cpu" = ia64; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' -- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" -- else -- # Determine the default libpath from the value encoded in an -- # empty executable. -- _LT_SYS_MODULE_PATH_AIX -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- # Warning - without using the other run time loading flags, -- # -berok will link without error, but may produce a broken library. -- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' -- # Exported symbols can be pulled into shared objects from archives -- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' -- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -- fi -- fi -- ;; -- -- amigaos*) -- case $host_cpu in -- powerpc) -- # see comment about AmigaOS4 .so support -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='' -- ;; -- m68k) -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- ;; -- esac -- ;; -- -- bsdi[[45]]*) -- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic -- ;; -- -- cygwin* | mingw* | pw32* | cegcc*) -- # When not using gcc, we currently assume that we are using -- # Microsoft Visual C++. -- # hardcode_libdir_flag_spec is actually meaningless, as there is -- # no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -- # FIXME: Should let the user specify the lib program. -- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' -- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- ;; -- -- darwin* | rhapsody*) -- _LT_DARWIN_LINKER_FEATURES($1) -- ;; -- -- dgux*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- freebsd1*) -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor -- # support. Future versions do this automatically, but an explicit c++rt0.o -- # does not break anything, and helps significantly (at the cost of a little -- # extra space). -- freebsd2.2*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- # Unfortunately, older versions of FreeBSD 2 do not have this feature. -- freebsd2*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- # FreeBSD 3 and greater uses gcc -shared to do shared libraries. -- freebsd* | dragonfly*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- hpux9*) -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- else -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- fi -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_TAGVAR(hardcode_direct, $1)=yes -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- ;; -- -- hpux10*) -- if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -- else -- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -- fi -- if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- fi -- ;; -- -- hpux11*) -- if test "$GCC" = yes -a "$with_gnu_ld" = no; then -- case $host_cpu in -- hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- else -- case $host_cpu in -- hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- fi -- if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- -- case $host_cpu in -- hppa*64*|ia64*) -- _LT_TAGVAR(hardcode_direct, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- *) -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- -- # hardcode_minus_L: Not really in the search PATH, -- # but as the default location of the library. -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- ;; -- esac -- fi -- ;; -- -- irix5* | irix6* | nonstopux*) -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- # Try to use the -exported_symbol ld option, if it does not -- # work, assume that -exports_file does not work either and -- # implicitly export all symbols. -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- AC_LINK_IFELSE(int foo(void) {}, -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- ) -- LDFLAGS="$save_LDFLAGS" -- else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -- fi -- _LT_TAGVAR(archive_cmds_need_lc, $1)='no' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_TAGVAR(inherit_rpath, $1)=yes -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- ;; -- -- netbsd* | netbsdelf*-gnu) -- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out -- else -- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF -- fi -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- newsos6) -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- *nto* | *qnx*) -- ;; -- -- openbsd*) -- if test -f /usr/libexec/ld.so; then -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- else -- case $host_os in -- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- ;; -- esac -- fi -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- -- os2*) -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -- ;; -- -- osf3*) -- if test "$GCC" = yes; then -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' -- fi -- _LT_TAGVAR(archive_cmds_need_lc, $1)='no' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- ;; -- -- osf4* | osf5*) # as osf3* with the addition of -msym flag -- if test "$GCC" = yes; then -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- else -- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ -- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' -- -- # Both c and cxx compiler support -rpath directly -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -- fi -- _LT_TAGVAR(archive_cmds_need_lc, $1)='no' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- ;; -- -- solaris*) -- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' -- if test "$GCC" = yes; then -- wlarc='${wl}' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -- else -- case `$CC -V 2>&1` in -- *"Compilers 5.0"*) -- wlarc='' -- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' -- ;; -- *) -- wlarc='${wl}' -- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -- ;; -- esac -- fi -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- case $host_os in -- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; -- *) -- # The compiler driver will combine and reorder linker options, -- # but understands `-z linker_flag'. GCC discards it without `$wl', -- # but is careful enough not to reorder. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- if test "$GCC" = yes; then -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' -- else -- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' -- fi -- ;; -- esac -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- ;; -- -- sunos4*) -- if test "x$host_vendor" = xsequent; then -- # Use $CC to link under sequent, because it throws in some extra .o -- # files that make .init and .fini sections work. -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' -- fi -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- sysv4) -- case $host_vendor in -- sni) -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? -- ;; -- siemens) -- ## LD is ld it makes a PLAMLIB -- ## CC just makes a GrossModule. -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' -- _LT_TAGVAR(hardcode_direct, $1)=no -- ;; -- motorola) -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie -- ;; -- esac -- runpath_var='LD_RUN_PATH' -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- sysv4.3*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' -- ;; -- -- sysv4*MP*) -- if test -d /usr/nec; then -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- runpath_var=LD_RUN_PATH -- hardcode_runpath_var=yes -- _LT_TAGVAR(ld_shlibs, $1)=yes -- fi -- ;; -- -- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- runpath_var='LD_RUN_PATH' -- -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- fi -- ;; -- -- sysv5* | sco3.2v5* | sco5v6*) -- # Note: We can NOT use -z defs as we might desire, because we do not -- # link with -lc, and that would cause any symbols used from libc to -- # always be unresolved, which means just about no library would -- # ever link correctly. If we're not using GNU ld we use -z text -- # though, which does catch some bad symbols but isn't as heavy-handed -- # as -z defs. -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=':' -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' -- runpath_var='LD_RUN_PATH' -- -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- else -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- fi -- ;; -- -- uts4*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- -- *) -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- -- if test x$host_vendor = xsni; then -- case $host in -- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' -- ;; -- esac -- fi -- fi --]) --AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) --test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -- --_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld -- --_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl --_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl --_LT_DECL([], [extract_expsyms_cmds], [2], -- [The commands to extract the exported symbol list from a shared archive]) -- --# --# Do we need to explicitly link libc? --# --case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in --x|xyes) -- # Assume -lc should be added -- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -- -- if test "$enable_shared" = yes && test "$GCC" = yes; then -- case $_LT_TAGVAR(archive_cmds, $1) in -- *'~'*) -- # FIXME: we may have to deal with multi-command sequences. -- ;; -- '$CC '*) -- # Test whether the compiler implicitly links with -lc since on some -- # systems, -lgcc has to come before -lc. If gcc already passes -lc -- # to ld, don't add -lc before -lgcc. -- AC_MSG_CHECKING([whether -lc should be explicitly linked in]) -- $RM conftest* -- echo "$lt_simple_compile_test_code" > conftest.$ac_ext -- -- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then -- soname=conftest -- lib=conftest -- libobjs=conftest.$ac_objext -- deplibs= -- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) -- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) -- compiler_flags=-v -- linker_flags=-v -- verstring= -- output_objdir=. -- libname=conftest -- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) -- _LT_TAGVAR(allow_undefined_flag, $1)= -- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) -- then -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- else -- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -- fi -- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag -- else -- cat conftest.err 1>&5 -- fi -- $RM conftest* -- AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) -- ;; -- esac -- fi -- ;; --esac -- --_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], -- [Whether or not to add -lc for building shared libraries]) --_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], -- [enable_shared_with_static_runtimes], [0], -- [Whether or not to disallow shared libs when runtime libs are static]) --_LT_TAGDECL([], [export_dynamic_flag_spec], [1], -- [Compiler flag to allow reflexive dlopens]) --_LT_TAGDECL([], [whole_archive_flag_spec], [1], -- [Compiler flag to generate shared objects directly from archives]) --_LT_TAGDECL([], [compiler_needs_object], [1], -- [Whether the compiler copes with passing no objects directly]) --_LT_TAGDECL([], [old_archive_from_new_cmds], [2], -- [Create an old-style archive from a shared archive]) --_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], -- [Create a temporary old-style archive to link instead of a shared archive]) --_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) --_LT_TAGDECL([], [archive_expsym_cmds], [2]) --_LT_TAGDECL([], [module_cmds], [2], -- [Commands used to build a loadable module if different from building -- a shared archive.]) --_LT_TAGDECL([], [module_expsym_cmds], [2]) --_LT_TAGDECL([], [with_gnu_ld], [1], -- [Whether we are building with GNU ld or not]) --_LT_TAGDECL([], [allow_undefined_flag], [1], -- [Flag that allows shared libraries with undefined symbols to be built]) --_LT_TAGDECL([], [no_undefined_flag], [1], -- [Flag that enforces no undefined symbols]) --_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], -- [Flag to hardcode $libdir into a binary during linking. -- This must work even if $libdir does not exist]) --_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], -- [[If ld is used when linking, flag to hardcode $libdir into a binary -- during linking. This must work even if $libdir does not exist]]) --_LT_TAGDECL([], [hardcode_libdir_separator], [1], -- [Whether we need a single "-rpath" flag with a separated argument]) --_LT_TAGDECL([], [hardcode_direct], [0], -- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -- DIR into the resulting binary]) --_LT_TAGDECL([], [hardcode_direct_absolute], [0], -- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -- DIR into the resulting binary and the resulting library dependency is -- "absolute", i.e impossible to change by setting ${shlibpath_var} if the -- library is relocated]) --_LT_TAGDECL([], [hardcode_minus_L], [0], -- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR -- into the resulting binary]) --_LT_TAGDECL([], [hardcode_shlibpath_var], [0], -- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -- into the resulting binary]) --_LT_TAGDECL([], [hardcode_automatic], [0], -- [Set to "yes" if building a shared library automatically hardcodes DIR -- into the library and all subsequent libraries and executables linked -- against it]) --_LT_TAGDECL([], [inherit_rpath], [0], -- [Set to yes if linker adds runtime paths of dependent libraries -- to runtime path list]) --_LT_TAGDECL([], [link_all_deplibs], [0], -- [Whether libtool must link a program against all its dependency libraries]) --_LT_TAGDECL([], [fix_srcfile_path], [1], -- [Fix the shell variable $srcfile for the compiler]) --_LT_TAGDECL([], [always_export_symbols], [0], -- [Set to "yes" if exported symbols are required]) --_LT_TAGDECL([], [export_symbols_cmds], [2], -- [The commands to list exported symbols]) --_LT_TAGDECL([], [exclude_expsyms], [1], -- [Symbols that should not be listed in the preloaded symbols]) --_LT_TAGDECL([], [include_expsyms], [1], -- [Symbols that must always be exported]) --_LT_TAGDECL([], [prelink_cmds], [2], -- [Commands necessary for linking programs (against libraries) with templates]) --_LT_TAGDECL([], [file_list_spec], [1], -- [Specify filename containing input files]) --dnl FIXME: Not yet implemented --dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], --dnl [Compiler flag to generate thread safe objects]) --])# _LT_LINKER_SHLIBS -- -- --# _LT_LANG_C_CONFIG([TAG]) --# ------------------------ --# Ensure that the configuration variables for a C compiler are suitably --# defined. These variables are subsequently used by _LT_CONFIG to write --# the compiler configuration to `libtool'. --m4_defun([_LT_LANG_C_CONFIG], --[m4_require([_LT_DECL_EGREP])dnl --lt_save_CC="$CC" --AC_LANG_PUSH(C) -- --# Source file extension for C test sources. --ac_ext=c -- --# Object file extension for compiled C test sources. --objext=o --_LT_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code="int some_variable = 0;" -- --# Code to be used in simple link tests --lt_simple_link_test_code='int main(){return(0);}' -- --_LT_TAG_COMPILER --# Save the default compiler, since it gets overwritten when the other --# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. --compiler_DEFAULT=$CC -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -- --if test -n "$compiler"; then -- _LT_COMPILER_NO_RTTI($1) -- _LT_COMPILER_PIC($1) -- _LT_COMPILER_C_O($1) -- _LT_COMPILER_FILE_LOCKS($1) -- _LT_LINKER_SHLIBS($1) -- _LT_SYS_DYNAMIC_LINKER($1) -- _LT_LINKER_HARDCODE_LIBPATH($1) -- LT_SYS_DLOPEN_SELF -- _LT_CMD_STRIPLIB -- -- # Report which library types will actually be built -- AC_MSG_CHECKING([if libtool supports shared libraries]) -- AC_MSG_RESULT([$can_build_shared]) -- -- AC_MSG_CHECKING([whether to build shared libraries]) -- test "$can_build_shared" = "no" && enable_shared=no -- -- # On AIX, shared libraries and static libraries use the same namespace, and -- # are all built from PIC. -- case $host_os in -- aix3*) -- test "$enable_shared" = yes && enable_static=no -- if test -n "$RANLIB"; then -- archive_cmds="$archive_cmds~\$RANLIB \$lib" -- postinstall_cmds='$RANLIB $lib' -- fi -- ;; -- -- aix[[4-9]]*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -- fi -- ;; -- esac -- AC_MSG_RESULT([$enable_shared]) -- -- AC_MSG_CHECKING([whether to build static libraries]) -- # Make sure either enable_shared or enable_static is yes. -- test "$enable_shared" = yes || enable_static=yes -- AC_MSG_RESULT([$enable_static]) -- -- _LT_CONFIG($1) --fi --AC_LANG_POP --CC="$lt_save_CC" --])# _LT_LANG_C_CONFIG -- -- --# _LT_PROG_CXX --# ------------ --# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ --# compiler, we have our own version here. --m4_defun([_LT_PROG_CXX], --[ --pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) --AC_PROG_CXX --if test -n "$CXX" && ( test "X$CXX" != "Xno" && -- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || -- (test "X$CXX" != "Xg++"))) ; then -- AC_PROG_CXXCPP --else -- _lt_caught_CXX_error=yes --fi --popdef([AC_MSG_ERROR]) --])# _LT_PROG_CXX -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([_LT_PROG_CXX], []) -- -- --# _LT_LANG_CXX_CONFIG([TAG]) --# -------------------------- --# Ensure that the configuration variables for a C++ compiler are suitably --# defined. These variables are subsequently used by _LT_CONFIG to write --# the compiler configuration to `libtool'. --m4_defun([_LT_LANG_CXX_CONFIG], --[AC_REQUIRE([_LT_PROG_CXX])dnl --m4_require([_LT_FILEUTILS_DEFAULTS])dnl --m4_require([_LT_DECL_EGREP])dnl -- --AC_LANG_PUSH(C++) --_LT_TAGVAR(archive_cmds_need_lc, $1)=no --_LT_TAGVAR(allow_undefined_flag, $1)= --_LT_TAGVAR(always_export_symbols, $1)=no --_LT_TAGVAR(archive_expsym_cmds, $1)= --_LT_TAGVAR(compiler_needs_object, $1)=no --_LT_TAGVAR(export_dynamic_flag_spec, $1)= --_LT_TAGVAR(hardcode_direct, $1)=no --_LT_TAGVAR(hardcode_direct_absolute, $1)=no --_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= --_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= --_LT_TAGVAR(hardcode_libdir_separator, $1)= --_LT_TAGVAR(hardcode_minus_L, $1)=no --_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported --_LT_TAGVAR(hardcode_automatic, $1)=no --_LT_TAGVAR(inherit_rpath, $1)=no --_LT_TAGVAR(module_cmds, $1)= --_LT_TAGVAR(module_expsym_cmds, $1)= --_LT_TAGVAR(link_all_deplibs, $1)=unknown --_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds --_LT_TAGVAR(no_undefined_flag, $1)= --_LT_TAGVAR(whole_archive_flag_spec, $1)= --_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no -- --# Source file extension for C++ test sources. --ac_ext=cpp -- --# Object file extension for compiled C++ test sources. --objext=o --_LT_TAGVAR(objext, $1)=$objext -- --# No sense in running all these tests if we already determined that --# the CXX compiler isn't working. Some variables (like enable_shared) --# are currently assumed to apply to all compilers on this platform, --# and will be corrupted by setting them based on a non-working compiler. --if test "$_lt_caught_CXX_error" != yes; then -- # Code to be used in simple compile tests -- lt_simple_compile_test_code="int some_variable = 0;" -- -- # Code to be used in simple link tests -- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' -- -- # ltmain only uses $CC for tagged configurations so make sure $CC is set. -- _LT_TAG_COMPILER -- -- # save warnings/boilerplate of simple test code -- _LT_COMPILER_BOILERPLATE -- _LT_LINKER_BOILERPLATE -- -- # Allow CC to be a program name with arguments. -- lt_save_CC=$CC -- lt_save_LD=$LD -- lt_save_GCC=$GCC -- GCC=$GXX -- lt_save_with_gnu_ld=$with_gnu_ld -- lt_save_path_LD=$lt_cv_path_LD -- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then -- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -- else -- $as_unset lt_cv_prog_gnu_ld -- fi -- if test -n "${lt_cv_path_LDCXX+set}"; then -- lt_cv_path_LD=$lt_cv_path_LDCXX -- else -- $as_unset lt_cv_path_LD -- fi -- test -z "${LDCXX+set}" || LD=$LDCXX -- CC=${CXX-"c++"} -- compiler=$CC -- _LT_TAGVAR(compiler, $1)=$CC -- _LT_CC_BASENAME([$compiler]) -- -- if test -n "$compiler"; then -- # We don't want -fno-exception when compiling C++ code, so set the -- # no_builtin_flag separately -- if test "$GXX" = yes; then -- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -- else -- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -- fi -- -- if test "$GXX" = yes; then -- # Set up default GNU C++ configuration -- -- LT_PATH_LD -- -- # Check if GNU C++ uses GNU ld as the underlying linker, since the -- # archiving commands below assume that GNU ld is being used. -- if test "$with_gnu_ld" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- -- # If archive_cmds runs LD, not CC, wlarc should be empty -- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to -- # investigate it a little bit more. (MM) -- wlarc='${wl}' -- -- # ancient GNU ld didn't support --whole-archive et. al. -- if eval "`$CC -print-prog-name=ld` --help 2>&1" | -- $GREP 'no-whole-archive' > /dev/null; then -- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- else -- _LT_TAGVAR(whole_archive_flag_spec, $1)= -- fi -- else -- with_gnu_ld=no -- wlarc= -- -- # A generic and very simple default shared library creation -- # command for GNU C++ for the case where it uses the native -- # linker, instead of GNU ld. If possible, this setting should -- # overridden to take advantage of the native linker features on -- # the platform it is being used on. -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' -- fi -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' -- -- else -- GXX=no -- with_gnu_ld=no -- wlarc= -- fi -- -- # PORTME: fill in a description of your system's C++ link characteristics -- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -- _LT_TAGVAR(ld_shlibs, $1)=yes -- case $host_os in -- aix3*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- aix[[4-9]]*) -- if test "$host_cpu" = ia64; then -- # On IA64, the linker does run time linking by default, so we don't -- # have to do anything special. -- aix_use_runtimelinking=no -- exp_sym_flag='-Bexport' -- no_entry_flag="" -- else -- aix_use_runtimelinking=no -- -- # Test if we are trying to use run time linking or normal -- # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) -- for ld_flag in $LDFLAGS; do -- case $ld_flag in -- *-brtl*) -- aix_use_runtimelinking=yes -- break -- ;; -- esac -- done -- ;; -- esac -- -- exp_sym_flag='-bexport' -- no_entry_flag='-bnoentry' -- fi -- -- # When large executables or shared objects are built, AIX ld can -- # have problems creating the table of contents. If linking a library -- # or program results in "error TOC overflow" add -mminimal-toc to -- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not -- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -- -- _LT_TAGVAR(archive_cmds, $1)='' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(hardcode_libdir_separator, $1)=':' -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' -- -- if test "$GXX" = yes; then -- case $host_os in aix4.[[012]]|aix4.[[012]].*) -- # We only want to do this on AIX 4.2 and lower, the check -- # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -- if test -f "$collect2name" && -- strings "$collect2name" | $GREP resolve_lib_name >/dev/null -- then -- # We have reworked collect2 -- : -- else -- # We have old collect2 -- _LT_TAGVAR(hardcode_direct, $1)=unsupported -- # It fails to find uninstalled libraries when the uninstalled -- # path is not listed in the libpath. Setting hardcode_minus_L -- # to unsupported forces relinking -- _LT_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)= -- fi -- esac -- shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -- fi -- else -- # not using gcc -- if test "$host_cpu" = ia64; then -- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release -- # chokes on -Wl,-G. The following line is correct: -- shared_flag='-G' -- else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -- else -- shared_flag='${wl}-bM:SRE' -- fi -- fi -- fi -- -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' -- # It seems that -bexpall does not export symbols beginning with -- # underscore (_), so it is better to generate a list of symbols to -- # export. -- _LT_TAGVAR(always_export_symbols, $1)=yes -- if test "$aix_use_runtimelinking" = yes; then -- # Warning - without using the other runtime loading flags (-brtl), -- # -berok will link without error, but may produce a broken library. -- _LT_TAGVAR(allow_undefined_flag, $1)='-berok' -- # Determine the default libpath from the value encoded in an empty -- # executable. -- _LT_SYS_MODULE_PATH_AIX -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -- else -- if test "$host_cpu" = ia64; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' -- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" -- else -- # Determine the default libpath from the value encoded in an -- # empty executable. -- _LT_SYS_MODULE_PATH_AIX -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- # Warning - without using the other run time loading flags, -- # -berok will link without error, but may produce a broken library. -- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' -- # Exported symbols can be pulled into shared objects from archives -- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' -- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -- # This is similar to how AIX traditionally builds its shared -- # libraries. -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -- fi -- fi -- ;; -- -- beos*) -- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Joseph Beckenbach says some releases of gcc -- # support --undefined. This deserves some investigation. FIXME -- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- -- chorus*) -- case $cc_basename in -- *) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- ;; -- -- cygwin* | mingw* | pw32* | cegcc*) -- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -- # as there is no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(always_export_symbols, $1)=no -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- -- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- darwin* | rhapsody*) -- _LT_DARWIN_LINKER_FEATURES($1) -- ;; -- -- dgux*) -- case $cc_basename in -- ec++*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- ghcx*) -- # Green Hills C++ Compiler -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- ;; -- -- freebsd[[12]]*) -- # C++ shared libraries reported to be fairly broken before -- # switch to ELF -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- freebsd-elf*) -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- ;; -- -- freebsd* | dragonfly*) -- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF -- # conventions -- _LT_TAGVAR(ld_shlibs, $1)=yes -- ;; -- -- gnu*) -- ;; -- -- hpux9*) -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- aCC*) -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' -- ;; -- *) -- if test "$GXX" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -- else -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -- ;; -- -- hpux10*|hpux11*) -- if test $with_gnu_ld = no; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- -- case $host_cpu in -- hppa*64*|ia64*) -- ;; -- *) -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- ;; -- esac -- fi -- case $host_cpu in -- hppa*64*|ia64*) -- _LT_TAGVAR(hardcode_direct, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- ;; -- *) -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, -- # but as the default -- # location of the library. -- ;; -- esac -- -- case $cc_basename in -- CC*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- aCC*) -- case $host_cpu in -- hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- esac -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' -- ;; -- *) -- if test "$GXX" = yes; then -- if test $with_gnu_ld = no; then -- case $host_cpu in -- hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- ;; -- esac -- fi -- else -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -- ;; -- -- interix[[3-9]]*) -- _LT_TAGVAR(hardcode_direct, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. -- # Instead, shared libraries are loaded at an image base (0x10000000 by -- # default) and relocated if they conflict, which is a slow very memory -- # consuming and fragmenting process. To avoid this, we pick a random, -- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link -- # time. Moving up from 0x10000000 also allows more sbrk(2) space. -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -- ;; -- irix5* | irix6*) -- case $cc_basename in -- CC*) -- # SGI C++ -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' -- -- # Archives containing C++ object files must be created using -- # "CC -ar", where "CC" is the IRIX C++ compiler. This is -- # necessary to make sure instantiated templates are included -- # in the archive. -- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' -- ;; -- *) -- if test "$GXX" = yes; then -- if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' -- fi -- fi -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- ;; -- esac -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_TAGVAR(inherit_rpath, $1)=yes -- ;; -- -- linux* | k*bsd*-gnu) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' -- -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- -- # Archives containing C++ object files must be created using -- # "CC -Bstatic", where "CC" is the KAI C++ compiler. -- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' -- ;; -- icpc* | ecpc* ) -- # Intel C++ -- with_gnu_ld=yes -- # version 8.0 and above of icpc choke on multiply defined symbols -- # if we add $predep_objects and $postdep_objects, however 7.1 and -- # earlier do not add the objects themselves. -- case `$CC -V 2>&1` in -- *"Version 7."*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- ;; -- *) # Version 8.0 or newer -- tmp_idyn= -- case $host_cpu in -- ia64*) tmp_idyn=' -i_dynamic';; -- esac -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- ;; -- esac -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -- ;; -- pgCC* | pgcpp*) -- # Portland Group C++ compiler -- case `$CC -V` in -- *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) -- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ -- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' -- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ -- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ -- $RANLIB $oldlib' -- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -- ;; -- *) # Version 6 will use weak symbols -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -- ;; -- esac -- -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' -- ;; -- cxx*) -- # Compaq C++ -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' -- -- runpath_var=LD_RUN_PATH -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' -- ;; -- xl*) -- # IBM XL 8.0 on PPC, with GNU ld -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- if test "x$supports_anon_versioning" = xyes; then -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -- fi -- ;; -- *) -- case `$CC -V 2>&1 | sed 5q` in -- *Sun\ C*) -- # Sun C++ 5.9 -- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' -- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' -- _LT_TAGVAR(compiler_needs_object, $1)=yes -- -- # Not sure whether something based on -- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 -- # would be better. -- output_verbose_link_cmd='echo' -- -- # Archives containing C++ object files must be created using -- # "CC -xar", where "CC" is the Sun C++ compiler. This is -- # necessary to make sure instantiated templates are included -- # in the archive. -- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' -- ;; -- esac -- ;; -- esac -- ;; -- -- lynxos*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- m88k*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- mvs*) -- case $cc_basename in -- cxx*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- ;; -- -- netbsd*) -- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' -- wlarc= -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- fi -- # Workaround some broken pre-1.5 toolchains -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' -- ;; -- -- *nto* | *qnx*) -- _LT_TAGVAR(ld_shlibs, $1)=yes -- ;; -- -- openbsd2*) -- # C++ shared libraries are fairly broken -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- openbsd*) -- if test -f /usr/libexec/ld.so; then -- _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -- fi -- output_verbose_link_cmd=echo -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- -- osf3* | osf4* | osf5*) -- case $cc_basename in -- KCC*) -- # Kuck and Associates, Inc. (KAI) C++ Compiler -- -- # KCC will only create a shared library if the output file -- # ends with ".so" (or ".sl" for HP-UX), so rename the library -- # to its proper name (with version) after linking. -- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Archives containing C++ object files must be created using -- # the KAI C++ compiler. -- case $host in -- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; -- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; -- esac -- ;; -- RCC*) -- # Rational C++ 2.4.1 -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- cxx*) -- case $host in -- osf3*) -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- ;; -- *) -- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ -- echo "-hidden">> $lib.exp~ -- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ -- $RM $lib.exp' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -- ;; -- esac -- -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- # -- # There doesn't appear to be a way to prevent this compiler from -- # explicitly linking system object files so we need to strip them -- # from the output so that they don't get included in the library -- # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' -- ;; -- *) -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- case $host in -- osf3*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- ;; -- esac -- -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' -- -- else -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -- esac -- ;; -- -- psos*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- sunos4*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.x -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- lcc*) -- # Lucid -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- ;; -- -- solaris*) -- case $cc_basename in -- CC*) -- # Sun C++ 4.2, 5.x and Centerline C++ -- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes -- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' -- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -- -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- case $host_os in -- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; -- *) -- # The compiler driver will combine and reorder linker options, -- # but understands `-z linker_flag'. -- # Supported since Solaris 2.6 (maybe 2.5.1?) -- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' -- ;; -- esac -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- -- output_verbose_link_cmd='echo' -- -- # Archives containing C++ object files must be created using -- # "CC -xar", where "CC" is the Sun C++ compiler. This is -- # necessary to make sure instantiated templates are included -- # in the archive. -- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' -- ;; -- gcx*) -- # Green Hills C++ Compiler -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- -- # The C++ compiler must be used to create the archive. -- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' -- ;; -- *) -- # GNU C++ compiler with Solaris linker -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' -- if $CC --version | $GREP -v '^2\.7' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' -- else -- # g++ 2.7 appears to require `-G' NOT `-shared' on this -- # platform. -- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -- -- # Commands to make compiler produce verbose output that lists -- # what "hidden" libraries, object files and flags are used when -- # linking a shared library. -- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' -- fi -- -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' -- case $host_os in -- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; -- *) -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' -- ;; -- esac -- fi -- ;; -- esac -- ;; -- -- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- runpath_var='LD_RUN_PATH' -- -- case $cc_basename in -- CC*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- ;; -- -- sysv5* | sco3.2v5* | sco5v6*) -- # Note: We can NOT use -z defs as we might desire, because we do not -- # link with -lc, and that would cause any symbols used from libc to -- # always be unresolved, which means just about no library would -- # ever link correctly. If we're not using GNU ld we use -z text -- # though, which does catch some bad symbols but isn't as heavy-handed -- # as -z defs. -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' -- _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' -- _LT_TAGVAR(hardcode_libdir_separator, $1)=':' -- _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' -- runpath_var='LD_RUN_PATH' -- -- case $cc_basename in -- CC*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- ;; -- esac -- ;; -- -- tandem*) -- case $cc_basename in -- NCC*) -- # NonStop-UX NCC 3.20 -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- *) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- ;; -- -- vxworks*) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- *) -- # FIXME: insert proper C++ library support -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- esac -- -- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -- -- _LT_TAGVAR(GCC, $1)="$GXX" -- _LT_TAGVAR(LD, $1)="$LD" -- -- ## CAVEAT EMPTOR: -- ## There is no encapsulation within the following macros, do not change -- ## the running order or otherwise move them around unless you know exactly -- ## what you are doing... -- _LT_SYS_HIDDEN_LIBDEPS($1) -- _LT_COMPILER_PIC($1) -- _LT_COMPILER_C_O($1) -- _LT_COMPILER_FILE_LOCKS($1) -- _LT_LINKER_SHLIBS($1) -- _LT_SYS_DYNAMIC_LINKER($1) -- _LT_LINKER_HARDCODE_LIBPATH($1) -- -- _LT_CONFIG($1) -- fi # test -n "$compiler" -- -- CC=$lt_save_CC -- LDCXX=$LD -- LD=$lt_save_LD -- GCC=$lt_save_GCC -- with_gnu_ld=$lt_save_with_gnu_ld -- lt_cv_path_LDCXX=$lt_cv_path_LD -- lt_cv_path_LD=$lt_save_path_LD -- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld --fi # test "$_lt_caught_CXX_error" != yes -- --AC_LANG_POP --])# _LT_LANG_CXX_CONFIG -- -- --# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) --# --------------------------------- --# Figure out "hidden" library dependencies from verbose --# compiler output when linking a shared library. --# Parse the compiler output and extract the necessary --# objects, libraries and library flags. --m4_defun([_LT_SYS_HIDDEN_LIBDEPS], --[m4_require([_LT_FILEUTILS_DEFAULTS])dnl --# Dependencies to place before and after the object being linked: --_LT_TAGVAR(predep_objects, $1)= --_LT_TAGVAR(postdep_objects, $1)= --_LT_TAGVAR(predeps, $1)= --_LT_TAGVAR(postdeps, $1)= --_LT_TAGVAR(compiler_lib_search_path, $1)= -- --dnl we can't use the lt_simple_compile_test_code here, --dnl because it contains code intended for an executable, --dnl not a library. It's possible we should let each --dnl tag define a new lt_????_link_test_code variable, --dnl but it's only used here... --m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF --int a; --void foo (void) { a = 0; } --_LT_EOF --], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF --class Foo --{ --public: -- Foo (void) { a = 0; } --private: -- int a; --}; --_LT_EOF --], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF -- subroutine foo -- implicit none -- integer*4 a -- a=0 -- return -- end --_LT_EOF --], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF -- subroutine foo -- implicit none -- integer a -- a=0 -- return -- end --_LT_EOF --], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF --public class foo { -- private int a; -- public void bar (void) { -- a = 0; -- } --}; --_LT_EOF --]) --dnl Parse the compiler output and extract the necessary --dnl objects, libraries and library flags. --if AC_TRY_EVAL(ac_compile); then -- # Parse the compiler output and extract the necessary -- # objects, libraries and library flags. -- -- # Sentinel used to keep track of whether or not we are before -- # the conftest object file. -- pre_test_object_deps_done=no -- -- for p in `eval "$output_verbose_link_cmd"`; do -- case $p in -- -- -L* | -R* | -l*) -- # Some compilers place space between "-{L,R}" and the path. -- # Remove the space. -- if test $p = "-L" || -- test $p = "-R"; then -- prev=$p -- continue -- else -- prev= -- fi -- -- if test "$pre_test_object_deps_done" = no; then -- case $p in -- -L* | -R*) -- # Internal compiler library paths should come after those -- # provided the user. The postdeps already come after the -- # user supplied libs so there is no need to process them. -- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then -- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" -- else -- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" -- fi -- ;; -- # The "-l" case would never come before the object being -- # linked, so don't bother handling this case. -- esac -- else -- if test -z "$_LT_TAGVAR(postdeps, $1)"; then -- _LT_TAGVAR(postdeps, $1)="${prev}${p}" -- else -- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" -- fi -- fi -- ;; -- -- *.$objext) -- # This assumes that the test object file only shows up -- # once in the compiler output. -- if test "$p" = "conftest.$objext"; then -- pre_test_object_deps_done=yes -- continue -- fi -- -- if test "$pre_test_object_deps_done" = no; then -- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then -- _LT_TAGVAR(predep_objects, $1)="$p" -- else -- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" -- fi -- else -- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then -- _LT_TAGVAR(postdep_objects, $1)="$p" -- else -- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" -- fi -- fi -- ;; -- -- *) ;; # Ignore the rest. -- -- esac -- done -- -- # Clean up. -- rm -f a.out a.exe --else -- echo "libtool.m4: error: problem compiling $1 test program" --fi -- --$RM -f confest.$objext -- --# PORTME: override above test on systems where it is broken --m4_if([$1], [CXX], --[case $host_os in --interix[[3-9]]*) -- # Interix 3.5 installs completely hosed .la files for C++, so rather than -- # hack all around it, let's just trust "g++" to DTRT. -- _LT_TAGVAR(predep_objects,$1)= -- _LT_TAGVAR(postdep_objects,$1)= -- _LT_TAGVAR(postdeps,$1)= -- ;; -- --linux*) -- case `$CC -V 2>&1 | sed 5q` in -- *Sun\ C*) -- # Sun C++ 5.9 -- -- # The more standards-conforming stlport4 library is -- # incompatible with the Cstd library. Avoid specifying -- # it if it's in CXXFLAGS. Ignore libCrun as -- # -library=stlport4 depends on it. -- case " $CXX $CXXFLAGS " in -- *" -library=stlport4 "*) -- solaris_use_stlport4=yes -- ;; -- esac -- -- if test "$solaris_use_stlport4" != yes; then -- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' -- fi -- ;; -- esac -- ;; -- --solaris*) -- case $cc_basename in -- CC*) -- # The more standards-conforming stlport4 library is -- # incompatible with the Cstd library. Avoid specifying -- # it if it's in CXXFLAGS. Ignore libCrun as -- # -library=stlport4 depends on it. -- case " $CXX $CXXFLAGS " in -- *" -library=stlport4 "*) -- solaris_use_stlport4=yes -- ;; -- esac -- -- # Adding this requires a known-good setup of shared libraries for -- # Sun compiler versions before 5.6, else PIC objects from an old -- # archive will be linked into the output, leading to subtle bugs. -- if test "$solaris_use_stlport4" != yes; then -- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' -- fi -- ;; -- esac -- ;; --esac --]) -- --case " $_LT_TAGVAR(postdeps, $1) " in --*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; --esac -- _LT_TAGVAR(compiler_lib_search_dirs, $1)= --if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then -- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` --fi --_LT_TAGDECL([], [compiler_lib_search_dirs], [1], -- [The directories searched by this compiler when creating a shared library]) --_LT_TAGDECL([], [predep_objects], [1], -- [Dependencies to place before and after the objects being linked to -- create a shared library]) --_LT_TAGDECL([], [postdep_objects], [1]) --_LT_TAGDECL([], [predeps], [1]) --_LT_TAGDECL([], [postdeps], [1]) --_LT_TAGDECL([], [compiler_lib_search_path], [1], -- [The library search path used internally by the compiler when linking -- a shared library]) --])# _LT_SYS_HIDDEN_LIBDEPS -- -- --# _LT_PROG_F77 --# ------------ --# Since AC_PROG_F77 is broken, in that it returns the empty string --# if there is no fortran compiler, we have our own version here. --m4_defun([_LT_PROG_F77], --[ --pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) --AC_PROG_F77 --if test -z "$F77" || test "X$F77" = "Xno"; then -- _lt_disable_F77=yes --fi --popdef([AC_MSG_ERROR]) --])# _LT_PROG_F77 -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([_LT_PROG_F77], []) -- -- --# _LT_LANG_F77_CONFIG([TAG]) --# -------------------------- --# Ensure that the configuration variables for a Fortran 77 compiler are --# suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. --m4_defun([_LT_LANG_F77_CONFIG], --[AC_REQUIRE([_LT_PROG_F77])dnl --AC_LANG_PUSH(Fortran 77) -- --_LT_TAGVAR(archive_cmds_need_lc, $1)=no --_LT_TAGVAR(allow_undefined_flag, $1)= --_LT_TAGVAR(always_export_symbols, $1)=no --_LT_TAGVAR(archive_expsym_cmds, $1)= --_LT_TAGVAR(export_dynamic_flag_spec, $1)= --_LT_TAGVAR(hardcode_direct, $1)=no --_LT_TAGVAR(hardcode_direct_absolute, $1)=no --_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= --_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= --_LT_TAGVAR(hardcode_libdir_separator, $1)= --_LT_TAGVAR(hardcode_minus_L, $1)=no --_LT_TAGVAR(hardcode_automatic, $1)=no --_LT_TAGVAR(inherit_rpath, $1)=no --_LT_TAGVAR(module_cmds, $1)= --_LT_TAGVAR(module_expsym_cmds, $1)= --_LT_TAGVAR(link_all_deplibs, $1)=unknown --_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds --_LT_TAGVAR(no_undefined_flag, $1)= --_LT_TAGVAR(whole_archive_flag_spec, $1)= --_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no -- --# Source file extension for f77 test sources. --ac_ext=f -- --# Object file extension for compiled f77 test sources. --objext=o --_LT_TAGVAR(objext, $1)=$objext -- --# No sense in running all these tests if we already determined that --# the F77 compiler isn't working. Some variables (like enable_shared) --# are currently assumed to apply to all compilers on this platform, --# and will be corrupted by setting them based on a non-working compiler. --if test "$_lt_disable_F77" != yes; then -- # Code to be used in simple compile tests -- lt_simple_compile_test_code="\ -- subroutine t -- return -- end --" -- -- # Code to be used in simple link tests -- lt_simple_link_test_code="\ -- program t -- end --" -- -- # ltmain only uses $CC for tagged configurations so make sure $CC is set. -- _LT_TAG_COMPILER -- -- # save warnings/boilerplate of simple test code -- _LT_COMPILER_BOILERPLATE -- _LT_LINKER_BOILERPLATE -- -- # Allow CC to be a program name with arguments. -- lt_save_CC="$CC" -- lt_save_GCC=$GCC -- CC=${F77-"f77"} -- compiler=$CC -- _LT_TAGVAR(compiler, $1)=$CC -- _LT_CC_BASENAME([$compiler]) -- GCC=$G77 -- if test -n "$compiler"; then -- AC_MSG_CHECKING([if libtool supports shared libraries]) -- AC_MSG_RESULT([$can_build_shared]) -- -- AC_MSG_CHECKING([whether to build shared libraries]) -- test "$can_build_shared" = "no" && enable_shared=no -- -- # On AIX, shared libraries and static libraries use the same namespace, and -- # are all built from PIC. -- case $host_os in -- aix3*) -- test "$enable_shared" = yes && enable_static=no -- if test -n "$RANLIB"; then -- archive_cmds="$archive_cmds~\$RANLIB \$lib" -- postinstall_cmds='$RANLIB $lib' -- fi -- ;; -- aix[[4-9]]*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -- fi -- ;; -- esac -- AC_MSG_RESULT([$enable_shared]) -- -- AC_MSG_CHECKING([whether to build static libraries]) -- # Make sure either enable_shared or enable_static is yes. -- test "$enable_shared" = yes || enable_static=yes -- AC_MSG_RESULT([$enable_static]) -- -- _LT_TAGVAR(GCC, $1)="$G77" -- _LT_TAGVAR(LD, $1)="$LD" -- -- ## CAVEAT EMPTOR: -- ## There is no encapsulation within the following macros, do not change -- ## the running order or otherwise move them around unless you know exactly -- ## what you are doing... -- _LT_COMPILER_PIC($1) -- _LT_COMPILER_C_O($1) -- _LT_COMPILER_FILE_LOCKS($1) -- _LT_LINKER_SHLIBS($1) -- _LT_SYS_DYNAMIC_LINKER($1) -- _LT_LINKER_HARDCODE_LIBPATH($1) -- -- _LT_CONFIG($1) -- fi # test -n "$compiler" -- -- GCC=$lt_save_GCC -- CC="$lt_save_CC" --fi # test "$_lt_disable_F77" != yes -- --AC_LANG_POP --])# _LT_LANG_F77_CONFIG -- -- --# _LT_PROG_FC --# ----------- --# Since AC_PROG_FC is broken, in that it returns the empty string --# if there is no fortran compiler, we have our own version here. --m4_defun([_LT_PROG_FC], --[ --pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) --AC_PROG_FC --if test -z "$FC" || test "X$FC" = "Xno"; then -- _lt_disable_FC=yes --fi --popdef([AC_MSG_ERROR]) --])# _LT_PROG_FC -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([_LT_PROG_FC], []) -- -- --# _LT_LANG_FC_CONFIG([TAG]) --# ------------------------- --# Ensure that the configuration variables for a Fortran compiler are --# suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. --m4_defun([_LT_LANG_FC_CONFIG], --[AC_REQUIRE([_LT_PROG_FC])dnl --AC_LANG_PUSH(Fortran) -- --_LT_TAGVAR(archive_cmds_need_lc, $1)=no --_LT_TAGVAR(allow_undefined_flag, $1)= --_LT_TAGVAR(always_export_symbols, $1)=no --_LT_TAGVAR(archive_expsym_cmds, $1)= --_LT_TAGVAR(export_dynamic_flag_spec, $1)= --_LT_TAGVAR(hardcode_direct, $1)=no --_LT_TAGVAR(hardcode_direct_absolute, $1)=no --_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= --_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= --_LT_TAGVAR(hardcode_libdir_separator, $1)= --_LT_TAGVAR(hardcode_minus_L, $1)=no --_LT_TAGVAR(hardcode_automatic, $1)=no --_LT_TAGVAR(inherit_rpath, $1)=no --_LT_TAGVAR(module_cmds, $1)= --_LT_TAGVAR(module_expsym_cmds, $1)= --_LT_TAGVAR(link_all_deplibs, $1)=unknown --_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds --_LT_TAGVAR(no_undefined_flag, $1)= --_LT_TAGVAR(whole_archive_flag_spec, $1)= --_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no -- --# Source file extension for fc test sources. --ac_ext=${ac_fc_srcext-f} -- --# Object file extension for compiled fc test sources. --objext=o --_LT_TAGVAR(objext, $1)=$objext -- --# No sense in running all these tests if we already determined that --# the FC compiler isn't working. Some variables (like enable_shared) --# are currently assumed to apply to all compilers on this platform, --# and will be corrupted by setting them based on a non-working compiler. --if test "$_lt_disable_FC" != yes; then -- # Code to be used in simple compile tests -- lt_simple_compile_test_code="\ -- subroutine t -- return -- end --" -- -- # Code to be used in simple link tests -- lt_simple_link_test_code="\ -- program t -- end --" -- -- # ltmain only uses $CC for tagged configurations so make sure $CC is set. -- _LT_TAG_COMPILER -- -- # save warnings/boilerplate of simple test code -- _LT_COMPILER_BOILERPLATE -- _LT_LINKER_BOILERPLATE -- -- # Allow CC to be a program name with arguments. -- lt_save_CC="$CC" -- lt_save_GCC=$GCC -- CC=${FC-"f95"} -- compiler=$CC -- GCC=$ac_cv_fc_compiler_gnu -- -- _LT_TAGVAR(compiler, $1)=$CC -- _LT_CC_BASENAME([$compiler]) -- -- if test -n "$compiler"; then -- AC_MSG_CHECKING([if libtool supports shared libraries]) -- AC_MSG_RESULT([$can_build_shared]) -- -- AC_MSG_CHECKING([whether to build shared libraries]) -- test "$can_build_shared" = "no" && enable_shared=no -- -- # On AIX, shared libraries and static libraries use the same namespace, and -- # are all built from PIC. -- case $host_os in -- aix3*) -- test "$enable_shared" = yes && enable_static=no -- if test -n "$RANLIB"; then -- archive_cmds="$archive_cmds~\$RANLIB \$lib" -- postinstall_cmds='$RANLIB $lib' -- fi -- ;; -- aix[[4-9]]*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -- fi -- ;; -- esac -- AC_MSG_RESULT([$enable_shared]) -- -- AC_MSG_CHECKING([whether to build static libraries]) -- # Make sure either enable_shared or enable_static is yes. -- test "$enable_shared" = yes || enable_static=yes -- AC_MSG_RESULT([$enable_static]) -- -- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" -- _LT_TAGVAR(LD, $1)="$LD" -- -- ## CAVEAT EMPTOR: -- ## There is no encapsulation within the following macros, do not change -- ## the running order or otherwise move them around unless you know exactly -- ## what you are doing... -- _LT_SYS_HIDDEN_LIBDEPS($1) -- _LT_COMPILER_PIC($1) -- _LT_COMPILER_C_O($1) -- _LT_COMPILER_FILE_LOCKS($1) -- _LT_LINKER_SHLIBS($1) -- _LT_SYS_DYNAMIC_LINKER($1) -- _LT_LINKER_HARDCODE_LIBPATH($1) -- -- _LT_CONFIG($1) -- fi # test -n "$compiler" -- -- GCC=$lt_save_GCC -- CC="$lt_save_CC" --fi # test "$_lt_disable_FC" != yes -- --AC_LANG_POP --])# _LT_LANG_FC_CONFIG -- -- --# _LT_LANG_GCJ_CONFIG([TAG]) --# -------------------------- --# Ensure that the configuration variables for the GNU Java Compiler compiler --# are suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. --m4_defun([_LT_LANG_GCJ_CONFIG], --[AC_REQUIRE([LT_PROG_GCJ])dnl --AC_LANG_SAVE -- --# Source file extension for Java test sources. --ac_ext=java -- --# Object file extension for compiled Java test sources. --objext=o --_LT_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code="class foo {}" -- --# Code to be used in simple link tests --lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. --_LT_TAG_COMPILER -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -- --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --lt_save_GCC=$GCC --GCC=yes --CC=${GCJ-"gcj"} --compiler=$CC --_LT_TAGVAR(compiler, $1)=$CC --_LT_TAGVAR(LD, $1)="$LD" --_LT_CC_BASENAME([$compiler]) -- --# GCJ did not exist at the time GCC didn't implicitly link libc in. --_LT_TAGVAR(archive_cmds_need_lc, $1)=no -- --_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -- --if test -n "$compiler"; then -- _LT_COMPILER_NO_RTTI($1) -- _LT_COMPILER_PIC($1) -- _LT_COMPILER_C_O($1) -- _LT_COMPILER_FILE_LOCKS($1) -- _LT_LINKER_SHLIBS($1) -- _LT_LINKER_HARDCODE_LIBPATH($1) -- -- _LT_CONFIG($1) --fi -- --AC_LANG_RESTORE -- --GCC=$lt_save_GCC --CC="$lt_save_CC" --])# _LT_LANG_GCJ_CONFIG -- -- --# _LT_LANG_RC_CONFIG([TAG]) --# ------------------------- --# Ensure that the configuration variables for the Windows resource compiler --# are suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. --m4_defun([_LT_LANG_RC_CONFIG], --[AC_REQUIRE([LT_PROG_RC])dnl --AC_LANG_SAVE -- --# Source file extension for RC test sources. --ac_ext=rc -- --# Object file extension for compiled RC test sources. --objext=o --_LT_TAGVAR(objext, $1)=$objext -- --# Code to be used in simple compile tests --lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' -- --# Code to be used in simple link tests --lt_simple_link_test_code="$lt_simple_compile_test_code" -- --# ltmain only uses $CC for tagged configurations so make sure $CC is set. --_LT_TAG_COMPILER -- --# save warnings/boilerplate of simple test code --_LT_COMPILER_BOILERPLATE --_LT_LINKER_BOILERPLATE -- --# Allow CC to be a program name with arguments. --lt_save_CC="$CC" --lt_save_GCC=$GCC --GCC= --CC=${RC-"windres"} --compiler=$CC --_LT_TAGVAR(compiler, $1)=$CC --_LT_CC_BASENAME([$compiler]) --_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes -- --if test -n "$compiler"; then -- : -- _LT_CONFIG($1) --fi -- --GCC=$lt_save_GCC --AC_LANG_RESTORE --CC="$lt_save_CC" --])# _LT_LANG_RC_CONFIG -- -- --# LT_PROG_GCJ --# ----------- --AC_DEFUN([LT_PROG_GCJ], --[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], -- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], -- [AC_CHECK_TOOL(GCJ, gcj,) -- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" -- AC_SUBST(GCJFLAGS)])])[]dnl --]) -- --# Old name: --AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([LT_AC_PROG_GCJ], []) -- -- --# LT_PROG_RC --# ---------- --AC_DEFUN([LT_PROG_RC], --[AC_CHECK_TOOL(RC, windres,) --]) -- --# Old name: --AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([LT_AC_PROG_RC], []) -- -- --# _LT_DECL_EGREP --# -------------- --# If we don't have a new enough Autoconf to choose the best grep --# available, choose the one first in the user's PATH. --m4_defun([_LT_DECL_EGREP], --[AC_REQUIRE([AC_PROG_EGREP])dnl --AC_REQUIRE([AC_PROG_FGREP])dnl --test -z "$GREP" && GREP=grep --_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) --_LT_DECL([], [EGREP], [1], [An ERE matcher]) --_LT_DECL([], [FGREP], [1], [A literal string matcher]) --dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too --AC_SUBST([GREP]) --]) -- -- --# _LT_DECL_OBJDUMP --# -------------- --# If we don't have a new enough Autoconf to choose the best objdump --# available, choose the one first in the user's PATH. --m4_defun([_LT_DECL_OBJDUMP], --[AC_CHECK_TOOL(OBJDUMP, objdump, false) --test -z "$OBJDUMP" && OBJDUMP=objdump --_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) --AC_SUBST([OBJDUMP]) --]) -- -- --# _LT_DECL_SED --# ------------ --# Check for a fully-functional sed program, that truncates --# as few characters as possible. Prefer GNU sed if found. --m4_defun([_LT_DECL_SED], --[AC_PROG_SED --test -z "$SED" && SED=sed --Xsed="$SED -e 1s/^X//" --_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) --_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], -- [Sed that helps us avoid accidentally triggering echo(1) options like -n]) --])# _LT_DECL_SED -- --m4_ifndef([AC_PROG_SED], [ --# NOTE: This macro has been submitted for inclusion into # --# GNU Autoconf as AC_PROG_SED. When it is available in # --# a released version of Autoconf we should remove this # --# macro and use it instead. # -- --m4_defun([AC_PROG_SED], --[AC_MSG_CHECKING([for a sed that does not truncate output]) --AC_CACHE_VAL(lt_cv_path_SED, --[# Loop through the user's path and test for sed and gsed. --# Then use that list of sed's as ones to test for truncation. --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for lt_ac_prog in sed gsed; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then -- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" -- fi -- done -- done --done --IFS=$as_save_IFS --lt_ac_max=0 --lt_ac_count=0 --# Add /usr/xpg4/bin/sed as it is typically found on Solaris --# along with /bin/sed that truncates output. --for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do -- test ! -f $lt_ac_sed && continue -- cat /dev/null > conftest.in -- lt_ac_count=0 -- echo $ECHO_N "0123456789$ECHO_C" >conftest.in -- # Check for GNU sed and select it if it is found. -- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then -- lt_cv_path_SED=$lt_ac_sed -- break -- fi -- while true; do -- cat conftest.in conftest.in >conftest.tmp -- mv conftest.tmp conftest.in -- cp conftest.in conftest.nl -- echo >>conftest.nl -- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break -- cmp -s conftest.out conftest.nl || break -- # 10000 chars as input seems more than enough -- test $lt_ac_count -gt 10 && break -- lt_ac_count=`expr $lt_ac_count + 1` -- if test $lt_ac_count -gt $lt_ac_max; then -- lt_ac_max=$lt_ac_count -- lt_cv_path_SED=$lt_ac_sed -- fi -- done --done --]) --SED=$lt_cv_path_SED --AC_SUBST([SED]) --AC_MSG_RESULT([$SED]) --])#AC_PROG_SED --])#m4_ifndef -- --# Old name: --AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([LT_AC_PROG_SED], []) -- -- --# _LT_CHECK_SHELL_FEATURES --# ------------------------ --# Find out whether the shell is Bourne or XSI compatible, --# or has some other useful features. --m4_defun([_LT_CHECK_SHELL_FEATURES], --[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) --# Try some XSI features --xsi_shell=no --( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -- && eval 'test $(( 1 + 1 )) -eq 2 \ -- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ -- && xsi_shell=yes --AC_MSG_RESULT([$xsi_shell]) --_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) -- --AC_MSG_CHECKING([whether the shell understands "+="]) --lt_shell_append=no --( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ -- >/dev/null 2>&1 \ -- && lt_shell_append=yes --AC_MSG_RESULT([$lt_shell_append]) --_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) -- --if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -- lt_unset=unset --else -- lt_unset=false --fi --_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl -- --# test EBCDIC or ASCII --case `echo X|tr X '\101'` in -- A) # ASCII based system -- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr -- lt_SP2NL='tr \040 \012' -- lt_NL2SP='tr \015\012 \040\040' -- ;; -- *) # EBCDIC based system -- lt_SP2NL='tr \100 \n' -- lt_NL2SP='tr \r\n \100\100' -- ;; --esac --_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl --_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl --])# _LT_CHECK_SHELL_FEATURES -- -- --# _LT_PROG_XSI_SHELLFNS --# --------------------- --# Bourne and XSI compatible variants of some useful shell functions. --m4_defun([_LT_PROG_XSI_SHELLFNS], --[case $xsi_shell in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac --} -- --# func_basename file --func_basename () --{ -- func_basename_result="${1##*/}" --} -- --# func_dirname_and_basename file append nondir_replacement --# perform func_basename and func_dirname in a single function --# call: --# dirname: Compute the dirname of FILE. If nonempty, --# add APPEND to the result, otherwise set result --# to NONDIR_REPLACEMENT. --# value returned in "$func_dirname_result" --# basename: Compute filename of FILE. --# value retuned in "$func_basename_result" --# Implementation must be kept synchronized with func_dirname --# and func_basename. For efficiency, we do not delegate to --# those functions but instead duplicate the functionality here. --func_dirname_and_basename () --{ -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}" --} -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --func_stripname () --{ -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"} --} -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=${1%%=*} -- func_opt_split_arg=${1#*=} --} -- --# func_lo2o object --func_lo2o () --{ -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=${1%.*}.lo --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=$(( $[*] )) --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=${#1} --} -- --_LT_EOF -- ;; -- *) # Bourne compatible functions. -- cat << \_LT_EOF >> "$cfgfile" -- --# func_dirname file append nondir_replacement --# Compute the dirname of FILE. If nonempty, add APPEND to the result, --# otherwise set result to NONDIR_REPLACEMENT. --func_dirname () --{ -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi --} -- --# func_basename file --func_basename () --{ -- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` --} -- --dnl func_dirname_and_basename --dnl A portable version of this function is already defined in general.m4sh --dnl so there is no need for it here. -- --# func_stripname prefix suffix name --# strip PREFIX and SUFFIX off of NAME. --# PREFIX and SUFFIX must not contain globbing or regex special --# characters, hashes, percent signs, but SUFFIX may contain a leading --# dot (in which case that matches only a dot). --# func_strip_suffix prefix name --func_stripname () --{ -- case ${2} in -- .*) func_stripname_result=`$ECHO "X${3}" \ -- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "X${3}" \ -- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; -- esac --} -- --# sed scripts: --my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[[^=]]*=//' -- --# func_opt_split --func_opt_split () --{ -- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` -- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` --} -- --# func_lo2o object --func_lo2o () --{ -- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` --} -- --# func_xform libobj-or-source --func_xform () --{ -- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` --} -- --# func_arith arithmetic-term... --func_arith () --{ -- func_arith_result=`expr "$[@]"` --} -- --# func_len string --# STRING may not start with a hyphen. --func_len () --{ -- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` --} -- --_LT_EOF --esac -- --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]+=\$[2]" --} --_LT_EOF -- ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]=\$$[1]\$[2]" --} -- --_LT_EOF -- ;; -- esac --]) -- --# Helper functions for option handling. -*- Autoconf -*- --# --# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. --# Written by Gary V. Vaughan, 2004 --# --# 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. -- --# serial 6 ltoptions.m4 -- --# This is to help aclocal find these macros, as it can't see m4_define. --AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) -- -- --# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) --# ------------------------------------------ --m4_define([_LT_MANGLE_OPTION], --[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) -- -- --# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) --# --------------------------------------- --# Set option OPTION-NAME for macro MACRO-NAME, and if there is a --# matching handler defined, dispatch to it. Other OPTION-NAMEs are --# saved as a flag. --m4_define([_LT_SET_OPTION], --[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl --m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), -- _LT_MANGLE_DEFUN([$1], [$2]), -- [m4_warning([Unknown $1 option `$2'])])[]dnl --]) -- -- --# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) --# ------------------------------------------------------------ --# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. --m4_define([_LT_IF_OPTION], --[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) -- -- --# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) --# ------------------------------------------------------- --# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME --# are set. --m4_define([_LT_UNLESS_OPTIONS], --[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), -- [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), -- [m4_define([$0_found])])])[]dnl --m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 --])[]dnl --]) -- -- --# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) --# ---------------------------------------- --# OPTION-LIST is a space-separated list of Libtool options associated --# with MACRO-NAME. If any OPTION has a matching handler declared with --# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about --# the unknown option and exit. --m4_defun([_LT_SET_OPTIONS], --[# Set options --m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), -- [_LT_SET_OPTION([$1], _LT_Option)]) -- --m4_if([$1],[LT_INIT],[ -- dnl -- dnl Simply set some default values (i.e off) if boolean options were not -- dnl specified: -- _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no -- ]) -- _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no -- ]) -- dnl -- dnl If no reference was made to various pairs of opposing options, then -- dnl we run the default mode handler for the pair. For example, if neither -- dnl `shared' nor `disable-shared' was passed, we enable building of shared -- dnl archives by default: -- _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) -- _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) -- _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) -- _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], -- [_LT_ENABLE_FAST_INSTALL]) -- ]) --])# _LT_SET_OPTIONS -- -- -- --# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) --# ----------------------------------------- --m4_define([_LT_MANGLE_DEFUN], --[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) -- -- --# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) --# ----------------------------------------------- --m4_define([LT_OPTION_DEFINE], --[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl --])# LT_OPTION_DEFINE -- -- --# dlopen --# ------ --LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes --]) -- --AU_DEFUN([AC_LIBTOOL_DLOPEN], --[_LT_SET_OPTION([LT_INIT], [dlopen]) --AC_DIAGNOSE([obsolete], --[$0: Remove this warning and the call to _LT_SET_OPTION when you --put the `dlopen' option into LT_INIT's first parameter.]) --]) -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) -- -- --# win32-dll --# --------- --# Declare package support for building win32 dll's. --LT_OPTION_DEFINE([LT_INIT], [win32-dll], --[enable_win32_dll=yes -- --case $host in --*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) -- AC_CHECK_TOOL(AS, as, false) -- AC_CHECK_TOOL(DLLTOOL, dlltool, false) -- AC_CHECK_TOOL(OBJDUMP, objdump, false) -- ;; --esac -- --test -z "$AS" && AS=as --_LT_DECL([], [AS], [0], [Assembler program])dnl -- --test -z "$DLLTOOL" && DLLTOOL=dlltool --_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl -- --test -z "$OBJDUMP" && OBJDUMP=objdump --_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl --])# win32-dll -- --AU_DEFUN([AC_LIBTOOL_WIN32_DLL], --[AC_REQUIRE([AC_CANONICAL_HOST])dnl --_LT_SET_OPTION([LT_INIT], [win32-dll]) --AC_DIAGNOSE([obsolete], --[$0: Remove this warning and the call to _LT_SET_OPTION when you --put the `win32-dll' option into LT_INIT's first parameter.]) --]) -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) -- -- --# _LT_ENABLE_SHARED([DEFAULT]) --# ---------------------------- --# implement the --enable-shared flag, and supports the `shared' and --# `disable-shared' LT_INIT options. --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. --m4_define([_LT_ENABLE_SHARED], --[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl --AC_ARG_ENABLE([shared], -- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], -- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], -- [p=${PACKAGE-default} -- case $enableval in -- yes) enable_shared=yes ;; -- no) enable_shared=no ;; -- *) -- enable_shared=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_shared=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac], -- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) -- -- _LT_DECL([build_libtool_libs], [enable_shared], [0], -- [Whether or not to build shared libraries]) --])# _LT_ENABLE_SHARED -- --LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) --LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) -- --# Old names: --AC_DEFUN([AC_ENABLE_SHARED], --[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) --]) -- --AC_DEFUN([AC_DISABLE_SHARED], --[_LT_SET_OPTION([LT_INIT], [disable-shared]) --]) -- --AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) --AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AM_ENABLE_SHARED], []) --dnl AC_DEFUN([AM_DISABLE_SHARED], []) -- -- -- --# _LT_ENABLE_STATIC([DEFAULT]) --# ---------------------------- --# implement the --enable-static flag, and support the `static' and --# `disable-static' LT_INIT options. --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. --m4_define([_LT_ENABLE_STATIC], --[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl --AC_ARG_ENABLE([static], -- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], -- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], -- [p=${PACKAGE-default} -- case $enableval in -- yes) enable_static=yes ;; -- no) enable_static=no ;; -- *) -- enable_static=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_static=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac], -- [enable_static=]_LT_ENABLE_STATIC_DEFAULT) -- -- _LT_DECL([build_old_libs], [enable_static], [0], -- [Whether or not to build static libraries]) --])# _LT_ENABLE_STATIC -- --LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) --LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) -- --# Old names: --AC_DEFUN([AC_ENABLE_STATIC], --[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) --]) -- --AC_DEFUN([AC_DISABLE_STATIC], --[_LT_SET_OPTION([LT_INIT], [disable-static]) --]) -- --AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) --AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AM_ENABLE_STATIC], []) --dnl AC_DEFUN([AM_DISABLE_STATIC], []) -- -- -- --# _LT_ENABLE_FAST_INSTALL([DEFAULT]) --# ---------------------------------- --# implement the --enable-fast-install flag, and support the `fast-install' --# and `disable-fast-install' LT_INIT options. --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. --m4_define([_LT_ENABLE_FAST_INSTALL], --[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl --AC_ARG_ENABLE([fast-install], -- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], -- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], -- [p=${PACKAGE-default} -- case $enableval in -- yes) enable_fast_install=yes ;; -- no) enable_fast_install=no ;; -- *) -- enable_fast_install=no -- # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -- for pkg in $enableval; do -- IFS="$lt_save_ifs" -- if test "X$pkg" = "X$p"; then -- enable_fast_install=yes -- fi -- done -- IFS="$lt_save_ifs" -- ;; -- esac], -- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) -- --_LT_DECL([fast_install], [enable_fast_install], [0], -- [Whether or not to optimize for fast installation])dnl --])# _LT_ENABLE_FAST_INSTALL -- --LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) --LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) -- --# Old names: --AU_DEFUN([AC_ENABLE_FAST_INSTALL], --[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) --AC_DIAGNOSE([obsolete], --[$0: Remove this warning and the call to _LT_SET_OPTION when you put --the `fast-install' option into LT_INIT's first parameter.]) --]) -- --AU_DEFUN([AC_DISABLE_FAST_INSTALL], --[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) --AC_DIAGNOSE([obsolete], --[$0: Remove this warning and the call to _LT_SET_OPTION when you put --the `disable-fast-install' option into LT_INIT's first parameter.]) --]) -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) --dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) -- -- --# _LT_WITH_PIC([MODE]) --# -------------------- --# implement the --with-pic flag, and support the `pic-only' and `no-pic' --# LT_INIT options. --# MODE is either `yes' or `no'. If omitted, it defaults to `both'. --m4_define([_LT_WITH_PIC], --[AC_ARG_WITH([pic], -- [AS_HELP_STRING([--with-pic], -- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], -- [pic_mode="$withval"], -- [pic_mode=default]) -- --test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) -- --_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl --])# _LT_WITH_PIC -- --LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) --LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) -- --# Old name: --AU_DEFUN([AC_LIBTOOL_PICMODE], --[_LT_SET_OPTION([LT_INIT], [pic-only]) --AC_DIAGNOSE([obsolete], --[$0: Remove this warning and the call to _LT_SET_OPTION when you --put the `pic-only' option into LT_INIT's first parameter.]) --]) -- --dnl aclocal-1.4 backwards compatibility: --dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) -- -- --m4_define([_LTDL_MODE], []) --LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], -- [m4_define([_LTDL_MODE], [nonrecursive])]) --LT_OPTION_DEFINE([LTDL_INIT], [recursive], -- [m4_define([_LTDL_MODE], [recursive])]) --LT_OPTION_DEFINE([LTDL_INIT], [subproject], -- [m4_define([_LTDL_MODE], [subproject])]) -- --m4_define([_LTDL_TYPE], []) --LT_OPTION_DEFINE([LTDL_INIT], [installable], -- [m4_define([_LTDL_TYPE], [installable])]) --LT_OPTION_DEFINE([LTDL_INIT], [convenience], -- [m4_define([_LTDL_TYPE], [convenience])]) -- --# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- --# --# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. --# Written by Gary V. Vaughan, 2004 --# --# 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. -- --# serial 6 ltsugar.m4 -- --# This is to help aclocal find these macros, as it can't see m4_define. --AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) -- -- --# lt_join(SEP, ARG1, [ARG2...]) --# ----------------------------- --# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their --# associated separator. --# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier --# versions in m4sugar had bugs. --m4_define([lt_join], --[m4_if([$#], [1], [], -- [$#], [2], [[$2]], -- [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) --m4_define([_lt_join], --[m4_if([$#$2], [2], [], -- [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) -- -- --# lt_car(LIST) --# lt_cdr(LIST) --# ------------ --# Manipulate m4 lists. --# These macros are necessary as long as will still need to support --# Autoconf-2.59 which quotes differently. --m4_define([lt_car], [[$1]]) --m4_define([lt_cdr], --[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], -- [$#], 1, [], -- [m4_dquote(m4_shift($@))])]) --m4_define([lt_unquote], $1) -- -- --# lt_append(MACRO-NAME, STRING, [SEPARATOR]) --# ------------------------------------------ --# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. --# Note that neither SEPARATOR nor STRING are expanded; they are appended --# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). --# No SEPARATOR is output if MACRO-NAME was previously undefined (different --# than defined and empty). --# --# This macro is needed until we can rely on Autoconf 2.62, since earlier --# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. --m4_define([lt_append], --[m4_define([$1], -- m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) -- -- -- --# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) --# ---------------------------------------------------------- --# Produce a SEP delimited list of all paired combinations of elements of --# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list --# has the form PREFIXmINFIXSUFFIXn. --# Needed until we can rely on m4_combine added in Autoconf 2.62. --m4_define([lt_combine], --[m4_if(m4_eval([$# > 3]), [1], -- [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl --[[m4_foreach([_Lt_prefix], [$2], -- [m4_foreach([_Lt_suffix], -- ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, -- [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) -- -- --# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) --# ----------------------------------------------------------------------- --# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited --# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. --m4_define([lt_if_append_uniq], --[m4_ifdef([$1], -- [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], -- [lt_append([$1], [$2], [$3])$4], -- [$5])], -- [lt_append([$1], [$2], [$3])$4])]) -- -- --# lt_dict_add(DICT, KEY, VALUE) --# ----------------------------- --m4_define([lt_dict_add], --[m4_define([$1($2)], [$3])]) -- -- --# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) --# -------------------------------------------- --m4_define([lt_dict_add_subkey], --[m4_define([$1($2:$3)], [$4])]) -- -- --# lt_dict_fetch(DICT, KEY, [SUBKEY]) --# ---------------------------------- --m4_define([lt_dict_fetch], --[m4_ifval([$3], -- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), -- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) -- -- --# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) --# ----------------------------------------------------------------- --m4_define([lt_if_dict_fetch], --[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], -- [$5], -- [$6])]) -- -- --# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) --# -------------------------------------------------------------- --m4_define([lt_dict_filter], --[m4_if([$5], [], [], -- [lt_join(m4_quote(m4_default([$4], [[, ]])), -- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), -- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl --]) -- --# ltversion.m4 -- version numbers -*- Autoconf -*- --# --# Copyright (C) 2004 Free Software Foundation, Inc. --# Written by Scott James Remnant, 2004 --# --# 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. -- --# Generated from ltversion.in. -- --# serial 3012 ltversion.m4 --# This file is part of GNU Libtool -- --m4_define([LT_PACKAGE_VERSION], [2.2.6]) --m4_define([LT_PACKAGE_REVISION], [1.3012]) -- --AC_DEFUN([LTVERSION_VERSION], --[macro_version='2.2.6' --macro_revision='1.3012' --_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) --_LT_DECL(, macro_revision, 0) --]) -- --# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- --# --# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. --# Written by Scott James Remnant, 2004. --# --# 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. -- --# serial 4 lt~obsolete.m4 -- --# These exist entirely to fool aclocal when bootstrapping libtool. --# --# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) --# which have later been changed to m4_define as they aren't part of the --# exported API, or moved to Autoconf or Automake where they belong. --# --# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN --# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us --# using a macro with the same name in our local m4/libtool.m4 it'll --# pull the old libtool.m4 in (it doesn't see our shiny new m4_define --# and doesn't know about Autoconf macros at all.) --# --# So we provide this file, which has a silly filename so it's always --# included after everything else. This provides aclocal with the --# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything --# because those macros already exist, or will be overwritten later. --# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. --# --# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. --# Yes, that means every name once taken will need to remain here until --# we give up compatibility with versions before 1.7, at which point --# we need to keep only those names which we still refer to. -- --# This is to help aclocal find these macros, as it can't see m4_define. --AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) -- --m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) --m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) --m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) --m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) --m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) --m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) --m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) --m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) --m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) --m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) --m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) --m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) --m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) --m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) --m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) --m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) --m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) --m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) --m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) --m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) --m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) --m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) --m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) --m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) --m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) --m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) --m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) --m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) --m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) --m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) --m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) --m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) --m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) --m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) --m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) --m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) --m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) --m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) --m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) --m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) --m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) --m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) --m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) --m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) --m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) --m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) --m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) --m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) --m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) --m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) --m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) --m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) --m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) --m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) --m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -- - # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation -@@ -7999,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], - [am__api_version='1.11' - 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.11], [], -+m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl - ]) - -@@ -8015,7 +50,7 @@ m4_define([_AM_AUTOCONF_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.11])dnl -+[AM_AUTOMAKE_VERSION([1.11.1])dnl - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl - _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -@@ -8831,6 +866,14 @@ python2.1 python2.0]) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; -+ *) -+ case $am_py_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - ]) - AC_SUBST([pythondir], [$am_cv_python_pythondir]) -@@ -8861,6 +904,14 @@ python2.1 python2.0]) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; -+ *) -+ case $am_py_exec_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - ]) - AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) -@@ -9104,3 +1155,8 @@ AC_SUBST([am__untar]) - ]) # _AM_PROG_TAR - - m4_include([config/autotroll.m4]) -+m4_include([config/libtool.m4]) -+m4_include([config/ltoptions.m4]) -+m4_include([config/ltsugar.m4]) -+m4_include([config/ltversion.m4]) -+m4_include([config/lt~obsolete.m4]) ---- mathgl-1.10.2.1.orig/configure -+++ mathgl-1.10.2.1/configure -@@ -1,13 +1,15 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for mathgl 1.10. -+# Generated by GNU Autoconf 2.67 for mathgl 1.10. - # - # Report bugs to . - # -+# - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software - # Foundation, Inc. - # -+# - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. - ## -------------------- ## -@@ -317,7 +319,7 @@ $as_echo X"$as_dir" | - 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" -+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - - } # as_fn_mkdir_p -@@ -357,19 +359,19 @@ else - fi # as_fn_arith - - --# as_fn_error ERROR [LINENO LOG_FD] --# --------------------------------- -+# 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. -+# script with STATUS, using 1 if that was 0. - as_fn_error () - { -- as_status=$?; test $as_status -eq 0 && as_status=1 -- if test "$3"; then -- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 -+ 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: $1" >&2 -+ $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status - } # as_fn_error - -@@ -736,10 +738,11 @@ as_awk_strverscmp=' - } - ' - --exec 7<&0 &1 -+test -n "$DJDIR" || exec 7<&0 &1 - - # Name of the host. --# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -+# 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` - -@@ -1101,8 +1104,9 @@ do - fi - - case $ac_option in -- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -- *) ac_optarg=yes ;; -+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -+ *=) ac_optarg= ;; -+ *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. -@@ -1147,7 +1151,7 @@ do - 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" -+ 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 -@@ -1173,7 +1177,7 @@ do - 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" -+ 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 -@@ -1377,7 +1381,7 @@ do - 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" -+ 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 -@@ -1393,7 +1397,7 @@ do - 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" -+ 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 -@@ -1423,8 +1427,8 @@ do - | --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." -+ -*) as_fn_error $? "unrecognized option: \`$ac_option' -+Try \`$0 --help' for more information" - ;; - - *=*) -@@ -1432,7 +1436,7 @@ Try \`$0 --help' for more information." - # 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'" ;; -+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; -@@ -1450,13 +1454,13 @@ done - - if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` -- as_fn_error "missing argument to $ac_option" -+ 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" ;; -+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac - fi -@@ -1479,7 +1483,7 @@ do - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac -- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -+ 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' -@@ -1493,8 +1497,8 @@ target=$target_alias - if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe -- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. -- If a cross compiler is detected then cross compile mode will be used." >&2 -+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -@@ -1509,9 +1513,9 @@ 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" -+ 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" -+ as_fn_error $? "pwd does not report name of working directory" - - - # Find the source files, if location was not specified. -@@ -1550,11 +1554,11 @@ else - 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" -+ 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" -+ 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 -@@ -1594,7 +1598,7 @@ Configuration: - --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 -+ -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 -@@ -1697,7 +1701,7 @@ Some influential environment variables: - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l -- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if -+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CXX C++ compiler command - CXXFLAGS C++ compiler flags -@@ -1772,9 +1776,9 @@ test -n "$ac_init_help" && exit $ac_stat - if $ac_init_version; then - cat <<\_ACEOF - mathgl configure 1.10 --generated by GNU Autoconf 2.64 -+generated by GNU Autoconf 2.67 - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This configure script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it. - _ACEOF -@@ -1819,7 +1823,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 - fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_compile - -@@ -1857,7 +1861,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 - fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_cxx_try_compile - -@@ -1903,7 +1907,7 @@ fi - # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_link - -@@ -1916,7 +1920,7 @@ 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -1959,7 +1963,7 @@ $as_echo "$ac_try_echo"; } >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } >/dev/null && { -+ test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : -@@ -1971,7 +1975,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 - fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_cpp - -@@ -2013,7 +2017,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 - fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_run - -@@ -2025,7 +2029,7 @@ 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -2105,7 +2109,7 @@ $as_echo "$ac_try_echo"; } >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } >/dev/null && { -+ test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : -@@ -2117,7 +2121,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 - fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_cxx_try_cpp - -@@ -2163,7 +2167,7 @@ fi - # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_cxx_try_link - -@@ -2175,10 +2179,10 @@ fi - ac_fn_c_check_header_mongrel () - { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+ if eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - fi - eval ac_res=\$$3 -@@ -2214,7 +2218,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : - else - ac_header_preproc=no - fi --rm -f conftest.err conftest.$ac_ext -+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; } - -@@ -2237,17 +2241,15 @@ $as_echo "$as_me: WARNING: $2: see the A - $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;} --( cat <<\_ASBOX --## ---------------------------------------- ## -+( $as_echo "## ---------------------------------------- ## - ## Report this to mathgl.abalakin@gmail.com ## --## ---------------------------------------- ## --_ASBOX -+## ---------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - eval "$3=\$ac_header_compiler" -@@ -2264,7 +2266,7 @@ This file contains any messages produced - running configure, to aid debugging if configure makes a mistake. - - It was created by mathgl $as_me 1.10, which was --generated by GNU Autoconf 2.64. Invocation command line was -+generated by GNU Autoconf 2.67. Invocation command line was - - $ $0 $@ - -@@ -2374,11 +2376,9 @@ trap 'exit_status=$? - { - echo - -- cat <<\_ASBOX --## ---------------- ## -+ $as_echo "## ---------------- ## - ## Cache variables. ## --## ---------------- ## --_ASBOX -+## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, - ( -@@ -2412,11 +2412,9 @@ $as_echo "$as_me: WARNING: cache variabl - ) - echo - -- cat <<\_ASBOX --## ----------------- ## -+ $as_echo "## ----------------- ## - ## Output variables. ## --## ----------------- ## --_ASBOX -+## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do -@@ -2429,11 +2427,9 @@ _ASBOX - echo - - if test -n "$ac_subst_files"; then -- cat <<\_ASBOX --## ------------------- ## -+ $as_echo "## ------------------- ## - ## File substitutions. ## --## ------------------- ## --_ASBOX -+## ------------------- ##" - echo - for ac_var in $ac_subst_files - do -@@ -2447,11 +2443,9 @@ _ASBOX - fi - - if test -s confdefs.h; then -- cat <<\_ASBOX --## ----------- ## -+ $as_echo "## ----------- ## - ## confdefs.h. ## --## ----------- ## --_ASBOX -+## ----------- ##" - echo - cat confdefs.h - echo -@@ -2506,7 +2500,12 @@ _ACEOF - ac_site_file1=NONE - ac_site_file2=NONE - if test -n "$CONFIG_SITE"; then -- ac_site_file1=$CONFIG_SITE -+ # 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 -@@ -2517,18 +2516,22 @@ fi - for ac_site_file in "$ac_site_file1" "$ac_site_file2" - do - test "x$ac_site_file" = xNONE && continue -- if test -r "$ac_site_file"; then -+ 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" -+ . "$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. -- if test -f "$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 -@@ -2597,7 +2600,7 @@ if $ac_cache_corrupted; then - $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 -+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 - fi - ## -------------------- ## - ## Main body of script. ## -@@ -2614,16 +2617,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_aux_dir= - for ac_dir in config "$srcdir"/config; do -- for ac_t in install-sh install.sh shtool; do -- if test -f "$ac_dir/$ac_t"; then -- ac_aux_dir=$ac_dir -- ac_install_sh="$ac_aux_dir/$ac_t -c" -- break 2 -- fi -- done -+ 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 config \"$srcdir\"/config" "$LINENO" 5 -+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 - fi - - # These three variables are undocumented and unsupported, -@@ -2759,11 +2768,11 @@ am_lf=' - ' - case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) -- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -+ 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;; -+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; - esac - - # Do `set' in a subshell so we don't clobber the current shell's -@@ -2785,7 +2794,7 @@ if ( - # 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 -+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - -@@ -2795,7 +2804,7 @@ then - # Ok. - : - else -- as_fn_error "newly created file is older than distributed files! -+ 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 -@@ -2967,6 +2976,7 @@ 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 -@@ -2974,7 +2984,6 @@ fi - # 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. -- test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi - fi -@@ -3033,7 +3042,7 @@ done - $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat >conftest.make <<\_ACEOF -@@ -3041,7 +3050,7 @@ SHELL = /bin/sh - all: - @echo '@@@%%%=$(MAKE)=@@@%%%' - _ACEOF --# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -+# 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;; -@@ -3075,7 +3084,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" - 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 -+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi - fi - -@@ -3432,8 +3441,8 @@ 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; } -+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 -@@ -3454,32 +3463,30 @@ $as_echo "$ac_try_echo"; } >&5 - ... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 -- rm -f conftest.er1 conftest.err - 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. */ --#include -+ - int - main () - { --FILE *f = fopen ("conftest.out", "w"); -- return ferror (f) || fclose (f) != 0; - - ; - 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 conftest.out" -+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 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}: 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: -@@ -3541,62 +3548,28 @@ test "$ac_cv_exeext" = no && ac_cv_exeex - else - ac_file='' - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 --$as_echo "$ac_file" >&6; } - if test -z "$ac_file"; then : -- $as_echo "$as_me: failed program was:" >&5 -+ { $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_set_status 77 --as_fn_error "C compiler cannot create executables --See \`config.log' for more details." "$LINENO" 5; }; } -+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 - --# 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 the C compiler works" >&5 --$as_echo_n "checking whether the C compiler works... " >&6; } --# If not cross compiling, check that we can run a simple program. --if test "$cross_compiling" != yes; then -- if { ac_try='./$ac_file' -- { { 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: yes" >&5 --$as_echo "yes" >&6; } -- --rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out -+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out - ac_clean_files=$ac_clean_files_save --# 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; } --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 --$as_echo "$cross_compiling" >&6; } -- - { $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" -@@ -3626,16 +3599,75 @@ 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; } -+as_fn_error $? "cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details" "$LINENO" 5 ; } - fi --rm -f conftest$ac_cv_exeext -+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 -+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 test "${ac_cv_objext+set}" = set; then : -@@ -3678,8 +3710,8 @@ 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; } -+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 -@@ -4218,8 +4250,8 @@ $as_echo "$ac_try_echo"; } >&5 - ... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 -- rm -f conftest.er1 conftest.err - fi -+ rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - done -@@ -4476,7 +4508,7 @@ fi - - # Make sure we can run config.sub. - $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || -- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 - $as_echo_n "checking build system type... " >&6; } -@@ -4487,16 +4519,16 @@ else - test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` - test "x$ac_build_alias" = x && -- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 - ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || -- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 -+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 - $as_echo "$ac_cv_build" >&6; } - case $ac_cv_build in - *-*-*) ;; --*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; - esac - build=$ac_cv_build - ac_save_IFS=$IFS; IFS='-' -@@ -4521,7 +4553,7 @@ else - ac_cv_host=$ac_cv_build - else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || -- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 - fi - - fi -@@ -4529,7 +4561,7 @@ fi - $as_echo "$ac_cv_host" >&6; } - case $ac_cv_host in - *-*-*) ;; --*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; - esac - host=$ac_cv_host - ac_save_IFS=$IFS; IFS='-' -@@ -4934,7 +4966,7 @@ esac - done - IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then -- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 -+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi - else - ac_cv_path_SED=$SED -@@ -5010,7 +5042,7 @@ esac - 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 -+ 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 -@@ -5076,7 +5108,7 @@ esac - 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 -+ 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 -@@ -5143,7 +5175,7 @@ esac - done - IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then -- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi - else - ac_cv_path_FGREP=$FGREP -@@ -5259,7 +5291,7 @@ else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } - fi --test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 - $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } - if test "${lt_cv_prog_gnu_ld+set}" = set; then : -@@ -5461,13 +5493,13 @@ if test "${lt_cv_nm_interface+set}" = se - else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:5464: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:5496: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 -- (eval echo "\"\$as_me:5467: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:5499: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 -- (eval echo "\"\$as_me:5470: output\"" >&5) -+ (eval echo "\"\$as_me:5502: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" -@@ -6670,7 +6702,7 @@ ia64-*-hpux*) - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 6673 "configure"' > conftest.$ac_ext -+ echo '#line 6705 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -7459,7 +7491,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -7475,11 +7507,11 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.i conftest.err conftest.$ac_ext - if $ac_preproc_ok; then : - break - fi -@@ -7518,7 +7550,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -7534,18 +7566,18 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+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; } -+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details" "$LINENO" 5 ; } - fi - - ac_ext=c -@@ -7674,8 +7706,7 @@ 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 - " --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -+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 -@@ -7830,8 +7861,8 @@ $as_echo "$ac_try_echo"; } >&5 - ... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 -- rm -f conftest.er1 conftest.err - fi -+ rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - done -@@ -8125,7 +8156,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -8141,11 +8172,11 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.i conftest.err conftest.$ac_ext - if $ac_preproc_ok; then : - break - fi -@@ -8184,7 +8215,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -8200,11 +8231,11 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.i conftest.err conftest.$ac_ext - if $ac_preproc_ok; then : - - else -@@ -8694,6 +8725,10 @@ _lt_linker_boilerplate=`cat conftest.err - $RM -r conftest* - - -+## CAVEAT EMPTOR: -+## There is no encapsulation within the following macros, do not change -+## the running order or otherwise move them around unless you know exactly -+## what you are doing... - if test -n "$compiler"; then - - lt_prog_compiler_no_builtin_flag= -@@ -8719,11 +8754,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:8722: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8757: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:8726: \$? = $ac_status" >&5 -+ echo "$as_me:8761: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -9058,11 +9093,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:9061: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:9096: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:9065: \$? = $ac_status" >&5 -+ echo "$as_me:9100: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -9163,11 +9198,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:9166: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:9201: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:9170: \$? = $ac_status" >&5 -+ echo "$as_me:9205: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -9218,11 +9253,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:9221: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:9256: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:9225: \$? = $ac_status" >&5 -+ echo "$as_me:9260: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -11601,7 +11636,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11604 "configure" -+#line 11639 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11697,7 +11732,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11700 "configure" -+#line 11735 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12112,7 +12147,7 @@ else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } - fi --test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 - $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } - if test "${lt_cv_prog_gnu_ld+set}" = set; then : -@@ -13653,11 +13688,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13656: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13691: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:13660: \$? = $ac_status" >&5 -+ echo "$as_me:13695: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -13752,11 +13787,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13755: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13790: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:13759: \$? = $ac_status" >&5 -+ echo "$as_me:13794: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -13804,11 +13839,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13807: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13842: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:13811: \$? = $ac_status" >&5 -+ echo "$as_me:13846: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -14777,7 +14812,7 @@ if test "${enable_double+set}" = set; th - enableval=$enable_double; case "${enableval}" in - yes) double=true ;; - no) double=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-double" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-double" "$LINENO" 5 ;; - esac - else - double=false -@@ -14799,7 +14834,7 @@ if test "${enable_all+set}" = set; then - enableval=$enable_all; case "${enableval}" in - yes) all=true ;; - no) all=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-all" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-all" "$LINENO" 5 ;; - esac - else - all=false -@@ -14811,7 +14846,7 @@ if test "${enable_langall+set}" = set; t - enableval=$enable_langall; case "${enableval}" in - yes) langall=true ;; - no) langall=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-langall" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-langall" "$LINENO" 5 ;; - esac - else - langall=false -@@ -14823,7 +14858,7 @@ if test "${enable_pthread+set}" = set; t - enableval=$enable_pthread; case "${enableval}" in - yes) pthread=true ;; - no) pthread=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-pthread" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-pthread" "$LINENO" 5 ;; - esac - else - pthread=true -@@ -14888,7 +14923,7 @@ if test "${enable_gsl+set}" = set; then - enableval=$enable_gsl; case "${enableval}" in - yes) gsl=true ;; - no) gsl=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-gsl" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-gsl" "$LINENO" 5 ;; - esac - else - gsl=true -@@ -14996,7 +15031,7 @@ if test "${enable_glut+set}" = set; then - enableval=$enable_glut; case "${enableval}" in - yes) glut=true ;; - no) glut=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-glut" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-glut" "$LINENO" 5 ;; - esac - else - glut=false -@@ -15026,7 +15061,7 @@ fi - as_ac_Lib=`$as_echo "ac_cv_lib_${GL_LIBS}''_main" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l${GL_LIBS}" >&5 - $as_echo_n "checking for main in -l${GL_LIBS}... " >&6; } --if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$as_ac_Lib+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS -@@ -15055,8 +15090,7 @@ fi - eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } --eval as_val=\$$as_ac_Lib -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - GL_LIBS=-l${GL_LIBS} - else - echo "Please install OpenGL library (lib${GL_LIBS}.a)"; exit -@@ -15074,7 +15108,7 @@ fi - as_ac_Lib=`$as_echo "ac_cv_lib_${GLUT_LIBS}''_main" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l${GLUT_LIBS}" >&5 - $as_echo_n "checking for main in -l${GLUT_LIBS}... " >&6; } --if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$as_ac_Lib+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS -@@ -15103,8 +15137,7 @@ fi - eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } --eval as_val=\$$as_ac_Lib -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - (test x$all = xtrue || test x$glut = xtrue) && GLUT_LIBS=-l${GLUT_LIBS} - else - (test x$all = xtrue || test x$glut = xtrue) && echo "Please install FreeGLUT library (lib${GLUT_LIBS}.a)" && exit -@@ -15125,7 +15158,7 @@ fi - as_ac_Lib=`$as_echo "ac_cv_lib_${GL_LIBS}''_main" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l${GL_LIBS}" >&5 - $as_echo_n "checking for main in -l${GL_LIBS}... " >&6; } --if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$as_ac_Lib+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS -@@ -15154,8 +15187,7 @@ fi - eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } --eval as_val=\$$as_ac_Lib -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - GL_LIBS=-l${GL_LIBS} - else - echo "Please install OpenGL library (lib${GL_LIBS}.a)"; exit -@@ -15173,7 +15205,7 @@ fi - as_ac_Lib=`$as_echo "ac_cv_lib_${GLUT_LIBS}''_main" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l${GLUT_LIBS}" >&5 - $as_echo_n "checking for main in -l${GLUT_LIBS}... " >&6; } --if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$as_ac_Lib+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS -@@ -15202,8 +15234,7 @@ fi - eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } --eval as_val=\$$as_ac_Lib -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - (test x$all = xtrue || test x$glut = xtrue) && GLUT_LIBS=-l${GLUT_LIBS} - else - (test x$all = xtrue || test x$glut = xtrue) && echo "Please install FreeGLUT library (lib${GLUT_LIBS}.a)" && exit -@@ -15235,7 +15266,7 @@ if test "${enable_hdf5+set}" = set; then - enableval=$enable_hdf5; case "${enableval}" in - yes) hdf5=true ;; - no) hdf5=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-hdf5" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-hdf5" "$LINENO" 5 ;; - esac - else - hdf5=false -@@ -15246,7 +15277,7 @@ if test "${enable_hdf5_18+set}" = set; t - enableval=$enable_hdf5_18; case "${enableval}" in - yes) hdf5_18=true ;; - no) hdf5_18=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-hdf5_18" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-hdf5_18" "$LINENO" 5 ;; - esac - else - hdf5_18=false -@@ -15315,7 +15346,7 @@ if test "${enable_gif+set}" = set; then - enableval=$enable_gif; case "${enableval}" in - yes) gif=true ;; - no) gif=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-gif" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-gif" "$LINENO" 5 ;; - esac - else - gif=false -@@ -15426,7 +15457,7 @@ if test "${enable_jpeg+set}" = set; then - enableval=$enable_jpeg; case "${enableval}" in - yes) jpeg=true ;; - no) jpeg=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-jpeg" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-jpeg" "$LINENO" 5 ;; - esac - else - jpeg=false -@@ -15491,7 +15522,7 @@ if test "${enable_fltk+set}" = set; then - enableval=$enable_fltk; case "${enableval}" in - yes) fltk=true ;; - no) fltk=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-fltk" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-fltk" "$LINENO" 5 ;; - esac - else - fltk=false -@@ -15595,7 +15626,7 @@ if test "${enable_wx+set}" = set; then : - enableval=$enable_wx; case "${enableval}" in - yes) wx=true ;; - no) wx=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-wx" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-wx" "$LINENO" 5 ;; - esac - else - wx=false -@@ -15700,7 +15731,7 @@ if test "${enable_qt+set}" = set; then : - enableval=$enable_qt; case "${enableval}" in - yes) qt=true ;; - no) qt=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-qt" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-qt" "$LINENO" 5 ;; - esac - else - qt=false -@@ -15826,7 +15857,7 @@ done - test -n "$QMAKE" || QMAKE="missing" - - if test x"$QMAKE" = xmissing; then -- as_fn_error "Cannot find qmake in your PATH. Try using --with-qt." "$LINENO" 5 -+ as_fn_error $? "Cannot find qmake in your PATH. Try using --with-qt." "$LINENO" 5 - fi - fi - -@@ -15927,7 +15958,7 @@ done - test -n "$MOC" || MOC="missing" - - if test x"$MOC" = xmissing; then -- as_fn_error "Cannot find moc (Meta Object Compiler) in your PATH. Try using --with-qt." "$LINENO" 5 -+ as_fn_error $? "Cannot find moc (Meta Object Compiler) in your PATH. Try using --with-qt." "$LINENO" 5 - fi - fi - -@@ -16028,7 +16059,7 @@ done - test -n "$UIC" || UIC="missing" - - if test x"$UIC" = xmissing; then -- as_fn_error "Cannot find uic (User Interface Compiler) in your PATH. Try using --with-qt." "$LINENO" 5 -+ as_fn_error $? "Cannot find uic (User Interface Compiler) in your PATH. Try using --with-qt." "$LINENO" 5 - fi - fi - -@@ -16139,7 +16170,7 @@ $as_echo "$as_me: WARNING: Cannot find r - QT_PATH=`dirname "$QMAKE"` - fi - if test x"$QT_PATH" = x; then -- as_fn_error "Cannot find the path to your Qt install. Use --with-qt." "$LINENO" 5 -+ as_fn_error $? "Cannot find the path to your Qt install. Use --with-qt." "$LINENO" 5 - fi - - -@@ -16173,7 +16204,7 @@ $as_echo "$as_me: WARNING: Cannot find r - then - : - else -- as_fn_error "Cannot cd to or write in $my_tmpdir" "$LINENO" 5 -+ as_fn_error $? "Cannot cd to or write in $my_tmpdir" "$LINENO" 5 - fi - cat >conftest.h <<_ASEOF - #include -@@ -16212,14 +16243,14 @@ int main() - } - _ASEOF - if $QMAKE -project; then :; else -- as_fn_error "Calling $QMAKE -project failed." "$LINENO" 5 -+ as_fn_error $? "Calling $QMAKE -project failed." "$LINENO" 5 - fi - - # Find the .pro file generated by qmake. - pro_file='conftest.dir.pro' - test -f $pro_file || pro_file=`echo *.pro` - if test -f "$pro_file"; then :; else -- as_fn_error "Can't find the .pro file generated by Qmake." "$LINENO" 5 -+ as_fn_error $? "Can't find the .pro file generated by Qmake." "$LINENO" 5 - fi - - -@@ -16232,7 +16263,7 @@ _ASEOF - sed 's/^/| /' "$pro_file" >&5 - - if $QMAKE; then :; else -- as_fn_error "Calling $QMAKE failed." "$LINENO" 5 -+ as_fn_error $? "Calling $QMAKE failed." "$LINENO" 5 - fi - # Try to compile a simple Qt app. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can build a simple Qt app" >&5 -@@ -16298,7 +16329,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_qt_build" >&5 - $as_echo "$at_cv_qt_build" >&6; } - if test x"$at_cv_qt_build" = xko; then -- as_fn_error "Cannot build a test Qt program" "$LINENO" 5 -+ as_fn_error $? "Cannot build a test Qt program" "$LINENO" 5 - fi - QT_VERSION_MAJOR=`echo "$at_cv_qt_build" | sed 's/^^0-9*//'` - -@@ -16324,7 +16355,7 @@ $as_echo "$at_cv_qt_build" >&6; } - fi - if test -f $at_mfile; then :; else - cd "$my_configure_pwd" -- as_fn_error "Cannot find the Makefile generated by qmake." "$LINENO" 5 -+ as_fn_error $? "Cannot find the Makefile generated by qmake." "$LINENO" 5 - fi - - # Find the DEFINES of Qt (should have been named CPPFLAGS). -@@ -16434,7 +16465,7 @@ $as_echo "$at_cv_env_QT_LIBS" >&6; } - - - if test x"$QMAKE" = x; then -- as_fn_error "\$QMAKE is empty. \ -+ as_fn_error $? "\$QMAKE is empty. \ - Did you invoke AT_WITH_QT before AT_REQUIRE_QT_VERSION?" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt's version" >&5 -@@ -16450,7 +16481,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $at_cv_QT_VERSION" >&5 - $as_echo "$at_cv_QT_VERSION" >&6; } - if test x"$at_cv_QT_VERSION" = x; then -- as_fn_error "Cannot detect Qt's version." "$LINENO" 5 -+ as_fn_error $? "Cannot detect Qt's version." "$LINENO" 5 - fi - QT_VERSION=$at_cv_QT_VERSION - -@@ -16459,7 +16490,7 @@ as_arg_v2=4.3 - awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null - case $? in #( - 1) : -- as_fn_error "This package requires Qt 4.3 or above." "$LINENO" 5 ;; #( -+ as_fn_error $? "This package requires Qt 4.3 or above." "$LINENO" 5 ;; #( - 0) : - ;; #( - 2) : -@@ -16484,7 +16515,7 @@ if test "${enable_python+set}" = set; th - enableval=$enable_python; case "${enableval}" in - yes) python=true ;; - no) python=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-python" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-python" "$LINENO" 5 ;; - esac - else - python=false -@@ -16624,7 +16655,7 @@ test -n "$PYTHON" || PYTHON=":" - - - if test "$PYTHON" = :; then -- as_fn_error "no suitable Python interpreter found" "$LINENO" 5 -+ as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 - else - - -@@ -16679,6 +16710,14 @@ else - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; -+ *) -+ case $am_py_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - - fi -@@ -16709,6 +16748,14 @@ else - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; -+ *) -+ case $am_py_exec_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - - fi -@@ -16744,7 +16791,7 @@ if test "${enable_octave+set}" = set; th - enableval=$enable_octave; case "${enableval}" in - yes) octave=true ;; - no) octave=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-octave" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-octave" "$LINENO" 5 ;; - esac - else - octave=false -@@ -16815,7 +16862,7 @@ if test "${enable_testio+set}" = set; th - enableval=$enable_testio; case "${enableval}" in - yes) testio=true ;; - no) testio=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-testio" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-testio" "$LINENO" 5 ;; - esac - else - testio=false -@@ -16835,7 +16882,7 @@ if test "${enable_docs+set}" = set; then - enableval=$enable_docs; case "${enableval}" in - yes) docs=true ;; - no) docs=false ;; -- *) as_fn_error "bad value ${enableval} for --enable-docs" "$LINENO" 5 ;; -+ *) as_fn_error $? "bad value ${enableval} for --enable-docs" "$LINENO" 5 ;; - esac - else - docs=false -@@ -16942,6 +16989,7 @@ 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$//' -@@ -16965,71 +17013,71 @@ else - fi - - if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then -- as_fn_error "conditional \"AMDEP\" was never defined. -+ 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. -+ 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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then -- as_fn_error "conditional \"am__fastdepCXX\" was never defined. -+ as_fn_error $? "conditional \"am__fastdepCXX\" 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. -+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_PTHREAD_TRUE}" && test -z "${USE_PTHREAD_FALSE}"; then -- as_fn_error "conditional \"USE_PTHREAD\" was never defined. -+ as_fn_error $? "conditional \"USE_PTHREAD\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_GSL_TRUE}" && test -z "${USE_GSL_FALSE}"; then -- as_fn_error "conditional \"USE_GSL\" was never defined. -+ as_fn_error $? "conditional \"USE_GSL\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_GLUT_TRUE}" && test -z "${USE_GLUT_FALSE}"; then -- as_fn_error "conditional \"USE_GLUT\" was never defined. -+ as_fn_error $? "conditional \"USE_GLUT\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_HDF5_TRUE}" && test -z "${USE_HDF5_FALSE}"; then -- as_fn_error "conditional \"USE_HDF5\" was never defined. -+ as_fn_error $? "conditional \"USE_HDF5\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_GIF_TRUE}" && test -z "${USE_GIF_FALSE}"; then -- as_fn_error "conditional \"USE_GIF\" was never defined. -+ as_fn_error $? "conditional \"USE_GIF\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_JPEG_TRUE}" && test -z "${USE_JPEG_FALSE}"; then -- as_fn_error "conditional \"USE_JPEG\" was never defined. -+ as_fn_error $? "conditional \"USE_JPEG\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_FLTK_TRUE}" && test -z "${USE_FLTK_FALSE}"; then -- as_fn_error "conditional \"USE_FLTK\" was never defined. -+ as_fn_error $? "conditional \"USE_FLTK\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_WX_TRUE}" && test -z "${USE_WX_FALSE}"; then -- as_fn_error "conditional \"USE_WX\" was never defined. -+ as_fn_error $? "conditional \"USE_WX\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_QT_TRUE}" && test -z "${USE_QT_FALSE}"; then -- as_fn_error "conditional \"USE_QT\" was never defined. -+ as_fn_error $? "conditional \"USE_QT\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_PYTHON_TRUE}" && test -z "${USE_PYTHON_FALSE}"; then -- as_fn_error "conditional \"USE_PYTHON\" was never defined. -+ as_fn_error $? "conditional \"USE_PYTHON\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_OCTAVE_TRUE}" && test -z "${USE_OCTAVE_FALSE}"; then -- as_fn_error "conditional \"USE_OCTAVE\" was never defined. -+ as_fn_error $? "conditional \"USE_OCTAVE\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_TESTIO_TRUE}" && test -z "${USE_TESTIO_FALSE}"; then -- as_fn_error "conditional \"USE_TESTIO\" was never defined. -+ as_fn_error $? "conditional \"USE_TESTIO\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - if test -z "${USE_DOCS_TRUE}" && test -z "${USE_DOCS_FALSE}"; then -- as_fn_error "conditional \"USE_DOCS\" was never defined. -+ as_fn_error $? "conditional \"USE_DOCS\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi - -@@ -17179,19 +17227,19 @@ export LANGUAGE - (unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - --# as_fn_error ERROR [LINENO LOG_FD] --# --------------------------------- -+# 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. -+# script with STATUS, using 1 if that was 0. - as_fn_error () - { -- as_status=$?; test $as_status -eq 0 && as_status=1 -- if test "$3"; then -- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 -+ 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: $1" >&2 -+ $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status - } # as_fn_error - -@@ -17387,7 +17435,7 @@ $as_echo X"$as_dir" | - 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" -+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - - } # as_fn_mkdir_p -@@ -17441,7 +17489,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri - # values after options handling. - ac_log=" - This file was extended by mathgl $as_me 1.10, which was --generated by GNU Autoconf 2.64. Invocation command line was -+generated by GNU Autoconf 2.67. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -17481,6 +17529,7 @@ 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 -@@ -17503,12 +17552,13 @@ Report bugs to >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" - ac_cs_version="\\ - mathgl config.status 1.10 --configured by $0, generated by GNU Autoconf 2.64, -- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -+configured by $0, generated by GNU Autoconf 2.67, -+ with options \\"\$ac_cs_config\\" - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This config.status script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it." - -@@ -17526,11 +17576,16 @@ 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 -@@ -17544,12 +17599,15 @@ do - 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;; -@@ -17562,7 +17620,7 @@ do - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header -- as_fn_error "ambiguous option: \`$1' -+ as_fn_error $? "ambiguous option: \`$1' - Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; -@@ -17571,7 +17629,7 @@ Try \`$0 --help' for more information."; - ac_cs_silent=: ;; - - # This is an error. -- -*) as_fn_error "unrecognized option: \`$1' -+ -*) as_fn_error $? "unrecognized option: \`$1' - Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" -@@ -17990,7 +18048,7 @@ do - "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; - "widgets/Makefile") CONFIG_FILES="$CONFIG_FILES widgets/Makefile" ;; - -- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; -+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; - esac - done - -@@ -18028,7 +18086,7 @@ $debug || - { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") --} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 -+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 - - # Set up the scripts for CONFIG_FILES section. - # No need to generate them if there are no CONFIG_FILES. -@@ -18045,7 +18103,7 @@ if test "x$ac_cr" = x; then - fi - ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` - if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then -- ac_cs_awk_cr='\r' -+ ac_cs_awk_cr='\\r' - else - ac_cs_awk_cr=$ac_cr - fi -@@ -18059,18 +18117,18 @@ _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 '$'` -+ 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 -+ 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 -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -@@ -18092,7 +18150,7 @@ s/'"$ac_delim"'$// - t delim - :nl - h --s/\(.\{148\}\).*/\1/ -+s/\(.\{148\}\)..*/\1/ - t more1 - s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ - p -@@ -18106,7 +18164,7 @@ s/.\{148\}// - t nl - :delim - h --s/\(.\{148\}\).*/\1/ -+s/\(.\{148\}\)..*/\1/ - t more2 - s/["\\]/\\&/g; s/^/"/; s/$/"/ - p -@@ -18159,20 +18217,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n - else - cat - fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ -- || as_fn_error "could not setup config files machinery" "$LINENO" 5 -+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 - _ACEOF - --# VPATH may cause trouble with some makes, so we remove $(srcdir), --# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -+# 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[ ]*=/{ --s/:*\$(srcdir):*/:/ --s/:*\${srcdir}:*/:/ --s/:*@srcdir@:*/:/ --s/^\([^=]*=[ ]*\):*/\1/ -+ 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 -@@ -18200,7 +18266,7 @@ for ac_last_try in false false :; do - if test -z "$ac_t"; then - break - elif $ac_last_try; then -- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 -+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -@@ -18285,7 +18351,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ - _ACAWK - _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -- as_fn_error "could not setup config headers machinery" "$LINENO" 5 -+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 - fi # test -n "$CONFIG_HEADERS" - - -@@ -18298,7 +18364,7 @@ do - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; -- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; -+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac -@@ -18326,7 +18392,7 @@ do - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || -- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; -+ 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'" -@@ -18353,7 +18419,7 @@ $as_echo "$as_me: creating $ac_file" >&6 - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac -@@ -18490,22 +18556,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t - $ac_datarootdir_hack - " - eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - - test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$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 -+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;} -+which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # -@@ -18516,19 +18582,19 @@ which seems to be undefined. Please mak - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$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 "$tmp/config.h" "$ac_file" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ -- || as_fn_error "could not create -" "$LINENO" 5 -+ || as_fn_error $? "could not create -" "$LINENO" 5 - fi - # Compute "$ac_file"'s index in $config_headers. - _am_arg="$ac_file" -@@ -19486,7 +19552,7 @@ _ACEOF - ac_clean_files=$ac_clean_files_save - - test $ac_write_fail = 0 || -- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 -+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - - # configure is writing to config.log, and then calls config.status. -@@ -19507,7 +19573,7 @@ if test "$no_create" != yes; then - 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 $? -+ $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 ---- mathgl-1.10.2.1.orig/widgets/Makefile.in -+++ mathgl-1.10.2.1/widgets/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -62,7 +62,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(sr - subdir = widgets - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/samples.texi -@@ -0,0 +1,6586 @@ -+@c ------------------------------------------------------------------ -+@node Samples, TeX-like symbols, MGL interface, Top -+@chapter Samples -+ -+This chapter contain a lot of sample codes for all types of plots and for most important examples and hints. The same sample (with pictures) you can find at @uref{http://mathgl.sf.net/pictures.html}. Most of examples have the sample code on 5 languages: C++, MGL, C, Fortran and Python. However, I put only C++ code for some of examples due to a lot of them and clearency how to write code for other languages. All samples are divided on 6 large categories. -+ -+The minimal code to view the samples for different languages are following. -+ -+@strong{C++ code} -+ -+For compilation use: @code{g++ -o sample sample.cpp -lmgl}. -+@verbatim -+#include -+int main() -+{ -+ mglGraph *gr = new mglGraphZB; -+ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ // put sample code here -+ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ gr->ShowImage(); delete gr; -+ return 0; -+} -+@end verbatim -+@strong{MGL code} -+ -+For preview use: @code{mglview sample.mgl}. -+@verbatim -+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+# put sample code here -+# --> you may use sample as is :) -+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+@end verbatim -+@strong{Pure C code} -+ -+For compilation use: @code{gcc -o sample sample.c -lmgl}. -+@verbatim -+#include -+int main() -+{ -+ HMGL gr = mgl_create_graph_zb(600,400); -+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ -+ /* put sample code here */ -+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ -+ mgl_show_image(gr,"",0); -+ mgl_delete_graph(gr); -+ return 0; -+} -+@end verbatim -+@strong{Fortran code} -+ -+For compilation use: @code{gfortran -o sample sample.f90 -lmgl}. Note, fortran don't have argument checking. So you have to take special attention to pass real variables to real arguments of functions and integer variables to integer arguments of functions. There is no other special checking for that!!! -+@verbatim -+integer gr, mgl_create_graph_zb -+gr = mgl_create_graph_zb(600,400) -+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+! put sample code here -+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+call mgl_show_image(gr,'',0) -+call mgl_delete_graph(gr) -+end -+@end verbatim -+@strong{Python} -+ -+For preview use: @code{python sample.py}. -+@verbatim -+from mathgl import * -+gr = mglGraph(); -+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+# put sample code here -+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+gr.ShowImage(); -+@end verbatim -+ -+ -+@menu -+* 1D plotting samples:: -+* 2D plotting samples:: -+* 3D plotting samples:: -+* Dual plotting samples:: -+* Additional features:: -+* Advanced features:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node 1D plotting samples, 2D plotting samples, , Samples -+@section 1D plotting samples -+ -+@menu -+* Plot sample:: -+* Radar sample:: -+* Tens sample:: -+* Area sample:: -+* Bars sample:: -+* Barh sample:: -+* Step sample:: -+* Stem sample:: -+* Region sample:: -+* Error sample:: -+* Mark sample:: -+* TextMark sample:: -+* Tube sample:: -+* Text sample:: -+* Torus sample:: -+* Chart sample:: -+* Pie chart sample:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Plot sample, Radar sample, , 1D plotting samples -+@subsection Plot sample -+@cindex Plot -+ -+@float -+@image{png/plot, 7cm} -+@caption{Example of Plot. @tdref{plot}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr->Box(); -+gr->Plot(y); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+box -+plot y -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,3,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+mgl_box(gr,1); -+mgl_plot(gr,y,NULL); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+call mgl_box(gr,1) -+call mgl_plot(gr,y,'') -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(50,3); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr.Box(); -+gr.Plot(y); -+@end verbatim -+ -+ -+ -+@c ------------------------------------------------------------------ -+@node Radar sample, Tens sample, Plot sample, 1D plotting samples -+@subsection Radar sample -+@cindex Radar -+ -+@float -+@image{png/radar, 7cm} -+@caption{Example of Plot. @tdref{radar}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(10,3); -+y.Modify("0.4*sin(pi*(2*x+y/2))+0.1*rnd"); -+gr->Radar(y,"#"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 10 3 -+modify y '0.4*sin(pi*(2*x+y/2))+0.1*rnd' -+radar y '#' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(10,3,1); -+mgl_data_modify(y,"0.4*sin(pi*(2*x+y/2))+0.1*rnd",0); -+mgl_radar(gr,y,"#",-1); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(10,3,1) -+call mgl_data_modify(y,'0.4*sin(pi*(2*x+y/2))+0.1*rnd',0) -+call mgl_radar(gr,y,'#',-1.) -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(10,3); -+y.Modify("0.4*sin(pi*(2*x+y/2))+0.1*rnd"); -+gr.Radar(y,"#"); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Tens sample, Area sample, Radar sample, 1D plotting samples -+@subsection Tens sample -+@cindex Tens -+ -+@float -+@image{png/tens, 7cm} -+@caption{Example of Tens. @tdref{tens}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50), c(50); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)"); -+c.Modify("sin(2*pi*x)"); -+gr->Box(); -+gr->Tens(y,c); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 -+new c 50 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify c 'sin(2*pi*x)' -+box -+tens y c -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,1,1); -+HMDT c = mgl_create_data_size(50,1,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(c,"sin(2*pi*x)",0); -+mgl_box(gr,1); -+mgl_tens(gr,y,c,NULL); -+mgl_delete_data(y); -+mgl_delete_data(c); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, c, mgl_create_data_size -+y = mgl_create_data_size(50,1,1) -+c = mgl_create_data_size(50,1,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(c,'sin(2*pi*x)',0) -+call mgl_box(gr,1) -+call mgl_tens(gr,y,'') -+call mgl_delete_data(y) -+call mgl_delete_data(c) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(50); -+c = mglData(50); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)"); -+c.Modify("sin(2*pi*x)"); -+gr.Box(); -+gr.Tens(y,c); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Area sample, Bars sample, Tens sample, 1D plotting samples -+@subsection Area sample -+@cindex Area -+ -+@float -+@image{png/area, 7cm} -+@caption{Example of Area. @tdref{area}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr->Org=mglPoint(0,0); -+gr->Box(); -+gr->Area(y); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+origin 0 0 -+box -+area y -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,3,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+mgl_set_origin(gr,0.,0.,0.); -+mgl_box(gr,1); -+mgl_area(gr,y,NULL); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+call mgl_set_origin(gr,0.,0.,0.) -+call mgl_box(gr,1) -+call mgl_area(gr,y,'') -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(50,3); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr.SetOrigin(0.,0.); -+gr.Box(); -+gr.Area(y); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Bars sample, Barh sample, Area sample, 1D plotting samples -+@subsection Bars sample -+@cindex Bars -+ -+@float -+@image{png/bars, 7cm} -+@caption{Example of Bars. @tdref{bars}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(10,3); -+y.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd"); -+gr->Org=mglPoint(0,0); -+gr->Box(); -+gr->Bars(y); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 10 3 -+modify y '0.8*sin(pi*(2*x+y/2))+0.2*rnd' -+origin 0 0 -+box -+bars y -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(10,3,1); -+mgl_data_modify(y,"0.8*sin(pi*(2*x+y/2))+0.2*rnd"); -+mgl_set_origin(gr,0.,0.,0.); -+mgl_box(gr,1); -+mgl_bars(gr,y,NULL); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(10,3,1) -+call mgl_data_modify(y,'0.8*sin(pi*(2*x+y/2))+0.2*rnd') -+call mgl_set_origin(gr,0.,0.,0.) -+call mgl_box(gr,1) -+call mgl_bars(gr,y,'') -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(10,3); -+y.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd"); -+gr.SetOrigin(0.,0.); -+gr.Box(); -+gr.Bars(y); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Barh sample, Step sample, Bars sample, 1D plotting samples -+@subsection Barh sample -+@cindex Barh -+ -+@float -+@image{png/barh, 7cm} -+@caption{Example of Barh. @tdref{barh}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(10,3); -+y.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd"); -+gr->Org=mglPoint(0,0); -+gr->Box(); -+gr->Barh(y); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 10 3 -+modify y '0.8*sin(pi*(2*x+y/2))+0.2*rnd' -+origin 0 0 -+box -+barh y -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(10,3,1); -+mgl_data_modify(y,"0.8*sin(pi*(2*x+y/2))+0.2*rnd"); -+mgl_set_origin(gr,0.,0.,0.); -+mgl_box(gr,1); -+mgl_barh(gr,y,NULL); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(10,3,1) -+call mgl_data_modify(y,'0.8*sin(pi*(2*x+y/2))+0.2*rnd') -+call mgl_set_origin(gr,0.,0.,0.) -+call mgl_box(gr,1) -+call mgl_barh(gr,y,'') -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(10,3); -+y.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd"); -+gr.SetOrigin(0.,0.); -+gr.Box(); -+gr.Barh(y); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Step sample, Stem sample, Barh sample, 1D plotting samples -+@subsection Step sample -+@cindex Step -+ -+@float -+@image{png/step, 7cm} -+@caption{Example of Step. @tdref{step}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr->Box(); -+gr->Step(y); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+box -+step y -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,3,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+mgl_box(gr,1); -+mgl_step(gr,y,NULL); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+call mgl_box(gr,1) -+call mgl_step(gr,y,'') -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(50,3); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr.Box(); -+gr.Step(y); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Stem sample, Region sample, Step sample, 1D plotting samples -+@subsection Stem sample -+@cindex Stem -+ -+@float -+@image{png/stem, 7cm} -+@caption{Example of Stem. @tdref{stem}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr->Org=mglPoint(0,0); -+gr->Box(); -+gr->Stem(y); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+origin 0 0 -+box -+stem y -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,3,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+mgl_set_origin(gr,0.,0.,0.); -+mgl_box(gr,1); -+mgl_stem(gr,y,NULL); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+call mgl_set_origin(gr,0.,0.,0.) -+call mgl_box(gr,1) -+call mgl_stem(gr,y,'') -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(50,3); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr.SetOrigin(0.,0.); -+gr.Box(); -+gr.Stem(y); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Region sample, Error sample, Stem sample, 1D plotting samples -+@subsection Region sample -+@cindex Region -+ -+@float -+@image{png/region, 7cm} -+@caption{Example of Region. @tdref{region}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y1(50), y2(50); -+y1.Modify("0.3*sin(2*pi*x)"); -+y2.Modify("0.5+0.3*cos(2*pi*x)"); -+gr->Box(); -+gr->Region(y1,y2,"r"); -+gr->Plot(y1,"k2"); -+gr->Plot(y2,"k2"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y1 50 -+new y2 50 -+modify y1 '0.3*sin(2*pi*x)' -+modify y2 '0.5+0.3*cos(2*pi*x)' -+box -+region y1 y2 'r' -+plot y1 'k2' -+plot y2 'k2' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y1 = mgl_create_data_size(50,1,1); -+HMDT y2 = mgl_create_data_size(50,1,1); -+mgl_data_modify(y1,"0.3*sin(2*pi*x)",0); -+mgl_data_modify(y2,"0.5+0.3*cos(2*pi*x)",0); -+mgl_box(gr,1); -+mgl_region(gr,y1,y2,"r",1); -+mgl_plot(gr,y1,"k2"); -+mgl_plot(gr,y2,"k2"); -+mgl_delete_data(y1); -+mgl_delete_data(y2); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y1, y2, mgl_create_data_size -+y1 = mgl_create_data_size(50,1,1); -+y2 = mgl_create_data_size(50,1,1); -+call mgl_data_modify(y1,'0.3*sin(2*pi*x)',0); -+call mgl_data_modify(y2,'0.5+0.3*cos(2*pi*x)',0); -+call mgl_box(gr,1); -+call mgl_region(gr,y1,y2,'r',1); -+call mgl_plot(gr,y1,'k2'); -+call mgl_plot(gr,y2,'k2'); -+call mgl_delete_data(y1); -+call mgl_delete_data(y2); -+@end verbatim -+@strong{Python} -+@verbatim -+y1, y2, x = mglData(50), mglData(50), mglData(50); -+y1.Modify("0.3*sin(2*pi*x)"); -+y2.Modify("0.5+0.3*cos(2*pi*x)"); -+gr.Box(); -+gr.Region(y1,y2,"r"); -+gr.Plot(y1,"k2"); -+gr.Plot(y2,"k2"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Error sample, Mark sample, Region sample, 1D plotting samples -+@subsection Error sample -+@cindex Error -+ -+@float -+@image{png/error, 7cm} -+@caption{Example of Error. @tdref{error}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,1), x0(10), y0(10), ex(10), ey(10); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+x0.Modify("2*x-1 + 0.1*rnd-0.05"); -+y0.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x) + 0.2*rnd-0.1"); -+ey.Modify("0.2"); ex.Modify("0.1"); -+gr->Box(); -+gr->Plot(y); -+gr->Error(x0,y0,ex,ey,"ko"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 -+new x0 10 -+new y0 10 -+new ex 10 -+new ey 10 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify x0 '2*x-1 + 0.1*rnd-0.05' -+modify y0 '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x) + 0.2*rnd-0.1' -+modify ey '0.2' -+modify ex '0.1' -+box -+plot y -+error x0 y0 ex ey 'ko' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,1,1); -+HMDT x0 = mgl_create_data_size(10,1,1); -+HMDT y0 = mgl_create_data_size(10,1,1); -+HMDT ex = mgl_create_data_size(10,1,1); -+HMDT ey = mgl_create_data_size(10,1,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(x0,"2*x-1 + 0.1*rnd-0.05",0); -+mgl_data_modify(y0,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x) + 0.2*rnd-0.1",0); -+mgl_data_modify(ey,"0.2",0); mgl_data_modify(ex,"0.1",0); -+ -+mgl_box(gr,1); -+mgl_plot(gr,y,NULL); -+mgl_error_exy(gr,x0,y0,ex,ey,"ko"); -+mgl_delete_data(x0); mgl_delete_data(y0); -+mgl_delete_data(ex); mgl_delete_data(ey); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, x0, y0, ex, ey, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+x0 = mgl_create_data_size(10,1,1) -+y0 = mgl_create_data_size(10,1,1) -+ex = mgl_create_data_size(10,1,1) -+ey = mgl_create_data_size(10,1,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(x0,'2*x-1 + 0.1*rnd-0.05',0); -+call mgl_data_modify(y0,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + & -+ 0.2*sin(pi*x) + 0.2*rnd-0.1',0); -+call mgl_data_modify(ey,'0.2',0) -+call mgl_data_modify(ex,'0.1',0); -+ -+call mgl_box(gr,1) -+call mgl_plot(gr,y,'') -+call mgl_error_exy(gr,x0,y0,ex,ey,'ko') -+call mgl_delete_data(x0) -+call mgl_delete_data(y0) -+call mgl_delete_data(ex) -+call mgl_delete_data(ey) -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y, x0, y0, ex, ey = mglData(50,1), mglData(10), mglData(10), mglData(10), mglData(10); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+x0.Modify("2*x-1+0.1*rnd-0.05"); -+y0.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)+0.2*rnd-0.1"); -+ey.Modify("0.2"); ex.Modify("0.1"); -+gr.Box(); gr.Plot(y); -+gr.Error(x0,y0,ex,ey,"ko"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Mark sample, TextMark sample, Error sample, 1D plotting samples -+@subsection Mark sample -+@cindex Mark -+ -+@float -+@image{png/mark, 7cm} -+@caption{Example of Mark. @tdref{mark}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3), y1(50); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+gr->Box(); -+gr->Mark(y,y1,"bs"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+new y1 50 -+modify y1 '0.5+0.3*cos(2*pi*x)' -+box -+mark y y1 'bs' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,3,1); -+HMDT y1 = mgl_create_data_size(50,1,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+mgl_data_modify(y1,"0.5+0.3*cos(2*pi*x)",0); -+mgl_box(gr,1); -+mgl_mark_y(gr,y,y1,"bs"); -+mgl_delete_data(y); -+mgl_delete_data(y1); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, y1, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+y1 = mgl_create_data_size(50,1,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+call mgl_data_modify(y1,'0.5+0.3*cos(2*pi*x)',0) -+call mgl_box(gr,1) -+call mgl_mark_y(gr,y,y1,'bs') -+call mgl_delete_data(y) -+call mgl_delete_data(y1) -+@end verbatim -+@strong{Python} -+@verbatim -+y, y1 = mglData(50,3), mglData(50); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+gr.Box(); -+gr.Mark(y,y1,"bs"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node TextMark sample, Tube sample, Mark sample, 1D plotting samples -+@subsection TextMark sample -+@cindex TextMark -+ -+@float -+@image{png/textmark, 7cm} -+@caption{Example of TextMark. @tdref{textmark}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3), y1(50); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+gr->Box(); -+gr->TextMark(y,y1,"\\gamma"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+new y1 50 -+modify y1 '0.5+0.3*cos(2*pi*x)' -+box -+textmark y y1 '\gamma' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y, y1; -+y = mgl_create_data_size(50,3,1); -+y1 = mgl_create_data_size(50,1,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+mgl_data_modify(y1,"0.5+0.3*cos(2*pi*x)",0); -+mgl_box(gr,1); -+mgl_textmark_yr(gr,y,y1,"\\gamma",""); -+mgl_delete_data(y); -+mgl_delete_data(y1); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, y1, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+y1 = mgl_create_data_size(50,1,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+call mgl_data_modify(y1,'0.5+0.3*cos(2*pi*x)',0) -+call mgl_box(gr,1) -+call mgl_textmark_yr(gr,y,y1,'\gamma','') -+call mgl_delete_data(y) -+call mgl_delete_data(y1) -+@end verbatim -+@strong{Python} -+@verbatim -+y, y1 = mglData(50,3), mglData(50); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+gr.Box(); -+gr.TextMark(y,y1,"\\gamma"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Tube sample, Text sample, TextMark sample, 1D plotting samples -+@subsection Tube sample -+@cindex Tube -+ -+@float -+@image{png/tube, 7cm} -+@caption{Example of Tube. @tdref{tube}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Tube(y,0.05); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+ -+rotate 40 60 -+light on -+box -+tube y 0.05 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,3,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_tube(gr,y,0.05,NULL); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_tube(gr,y,0.05,'') -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(50,3); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Tube(y,0.05); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Text sample, Torus sample, Tube sample, 1D plotting samples -+@subsection Text sample -+@cindex Text -+ -+@float -+@image{png/text, 7cm} -+@caption{Example of Text. @tdref{text}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+gr->Box(); -+gr->Plot(y.SubData(-1,0)); -+gr->Text(y,"This is very long string drawn along a curve",":k"); -+gr->Text(y,"Another string drawn above a curve","T:r"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+box -+plot y(:,0) -+text y 'This is very long string drawn along a curve' ':k' -+text y 'Another string drawn above a curve' 'T:r' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,1,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_box(gr,1); -+mgl_plot(gr,y,NULL); -+mgl_text_y(gr,y,"This is very long string drawn along a curve",":k",-1.); -+mgl_text_y(gr,y,"Another string drawn above a curve","T:r",-1.); -+mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y, mgl_create_data_size -+y = mgl_create_data_size(50,1,1) -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_box(gr,1) -+call mgl_plot(gr,y,'') -+call mgl_text_y(gr,y,'This is very long string drawn along a curve',':k',-1.) -+call mgl_text_y(gr,y,'Another string drawn above a curve','T:r',-1.) -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+y = mglData(50,3); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); -+gr.Box(); -+gr.Plot(y.SubData(-1,0)); -+gr.Text(y,"This is very long string drawn along a curve",":k"); -+gr.Text(y,"Another string drawn above a curve","T:r"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Torus sample, Chart sample, Text sample, 1D plotting samples -+@subsection Torus sample -+@cindex Torus -+ -+@float -+@image{png/torus, 7cm} -+@caption{Example of Torus. @tdref{torus}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y1(50), y2(50); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+y2.Modify("0.3*sin(2*pi*x)"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Torus(y1,y2,"pz"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y1 50 -+new y2 50 -+modify y1 '0.5+0.3*cos(2*pi*x)' -+modify y2 '0.3*sin(2*pi*x)' -+ -+rotate 40 60 -+light on -+box -+torus y1 y2 'pz' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y1 = mgl_create_data_size(50,1,1); -+HMDT y2 = mgl_create_data_size(50,1,1); -+mgl_data_modify(y1,"0.5+0.3*cos(2*pi*x)",0); -+mgl_data_modify(y2,"0.3*sin(2*pi*x)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_torus(gr,y1,y2,"pz"); -+mgl_delete_data(y1); -+mgl_delete_data(y2); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y1, y2, mgl_create_data_size -+y1 = mgl_create_data_size(50,1,1); -+y2 = mgl_create_data_size(50,1,1); -+call mgl_data_modify(y1,"0.5+0.3*cos(2*pi*x)",0); -+call mgl_data_modify(y2,"0.3*sin(2*pi*x)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_torus(gr,y1,y2,'pz') -+call mgl_delete_data(y1) -+call mgl_delete_data(y2) -+@end verbatim -+@strong{Python} -+@verbatim -+y1, y2 = mglData(50), mglData(50); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+y2.Modify("0.3*sin(2*pi*x)"); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.Torus(y1,y2,"pz"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Chart sample, Pie chart sample, Torus sample, 1D plotting samples -+@subsection Chart sample -+@cindex Chart -+ -+@float -+@image{png/chart, 7cm} -+@caption{Example of Chart. @tdref{chart}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData ch(7,2); -+ch.Modify("rnd+0.1"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Chart(ch,"#"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new ch 7 2 -+modify ch 'rnd+0.1' -+ -+rotate 40 60 -+light on -+box -+chart ch -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT ch = mgl_create_data_size(7,2,1); -+mgl_data_modify(ch,"rnd+0.1",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_chart(gr,ch,"#"); -+mgl_delete_data(ch); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer ch, mgl_create_data_size -+ch = mgl_create_data_size(7,2,1) -+call mgl_data_modify(ch,'rnd+0.1',0) -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_chart(gr,ch,'#') -+call mgl_delete_data(ch) -+@end verbatim -+@strong{Python} -+@verbatim -+ch = mglData(7,2); ch.Modify("rnd+0.1"); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.Chart(ch,"#"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Pie chart sample, , Chart sample, 1D plotting samples -+@subsection Pie chart sample -+@cindex Chart -+@cindex Axis -+ -+@float -+@image{png/pie_chart, 7cm} -+@caption{Example of Chart in cylindrical coordinates. @tdref{pie_chart}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData ch(7,2); -+ch.Modify("rnd+0.1"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Axis("(y+1)/2*cos(pi*x)","(y+1)/2*sin(pi*x)",0); -+gr->Box(); -+gr->Chart(ch,"bgr cmy#"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new ch 7 2 -+modify ch 'rnd+0.1' -+ -+rotate 40 60 -+light on -+axis '(y+1)/2*cos(pi*x)' '(y+1)/2*sin(pi*x)' '' -+box -+chart ch 'bgr cmy#' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT ch = mgl_create_data_size(7,2,1); -+mgl_data_modify(ch,"rnd+0.1",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_func(gr,"(y+1)/2*cos(pi*x)","(y+1)/2*sin(pi*x)",0); -+mgl_box(gr,1); -+mgl_chart(gr,ch,"bgr cmy#"); -+mgl_delete_data(ch); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer ch, mgl_create_data_size -+ch = mgl_create_data_size(7,2,1) -+call mgl_data_modify(ch,'rnd+0.1',0) -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_func(gr,'(y+1)/2*cos(pi*x)','(y+1)/2*sin(pi*x)',''); -+call mgl_box(gr,1) -+call mgl_chart(gr,ch,'bgr cmy#') -+call mgl_delete_data(ch) -+@end verbatim -+@strong{Python} -+@verbatim -+ch = mglData(7,2); ch.Modify("rnd+0.1"); -+gr.Rotate(40,60); gr.Light(True); -+gr.SetFunc("(y+1)/2*cos(pi*x)","(y+1)/2*sin(pi*x)"); -+gr.Box(); -+gr.Chart(ch,"bgr cmy#"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node 2D plotting samples, 3D plotting samples, 1D plotting samples, Samples -+@section 2D plotting samples -+ -+@menu -+* Surf sample:: -+* Transparent surface sample:: -+* Surface in fog sample:: -+* Sharp colors sample:: -+* Mesh sample:: -+* Fall sample:: -+* Belt sample:: -+* Tile sample:: -+* Boxs sample:: -+* Dens sample:: -+* Cont sample:: -+* ContF sample:: -+* ContD sample:: -+* Axial sample:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Surf sample, Transparent surface sample, , 2D plotting samples -+@subsection Surf sample -+@cindex Surf -+ -+@float -+@image{png/surf, 7cm} -+@caption{Example of Surf. @tdref{surf}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Surf(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+box -+surf a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_surf(gr,a,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_surf(gr,a,'') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Surf(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Transparent surface sample, Surface in fog sample, Surf sample, 2D plotting samples -+@subsection Transparent surface sample -+@cindex Surf -+@cindex Alpha -+ -+@float -+@image{png/surf_alpha, 7cm} -+@caption{Example of Surf & Alpha. @tdref{surf_alpha}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->Box(); -+gr->Surf(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+alpha on -+box -+surf a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_surf(gr,a,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+call mgl_box(gr,1) -+call mgl_surf(gr,a,'') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Alpha(True); -+gr.Surf(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Surface in fog sample, Sharp colors sample, Transparent surface sample, 2D plotting samples -+@subsection Surface in fog sample -+@cindex Surf -+@cindex Fog -+ -+@float -+@image{png/surf_fog, 7cm} -+@caption{Example of Surf & Fog. @tdref{surf_fog}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Fog(1); -+gr->Box(); -+gr->Surf(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+fog 1 -+box -+surf a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_fog(gr,1.,0.25); -+mgl_box(gr,1); -+mgl_surf(gr,a,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_fog(gr,1.,0.25) -+call mgl_box(gr,1) -+call mgl_surf(gr,a,'') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Fog(1); -+gr.Surf(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Sharp colors sample, Mesh sample, Surface in fog sample, 2D plotting samples -+@subsection Sharp colors sample -+@cindex Surf -+ -+@float -+@image{png/surf_sl, 7cm} -+@caption{Example of sharp color scheme. @tdref{surf_sl}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Surf(a,"BbcyrR|"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+box -+surf a 'BbcyrR|' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_surf(gr,a,"BbcyrR|"); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_surf(gr,a,'BbcyrR|') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Surf(a,"BbcyrR|"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Mesh sample, Fall sample, Sharp colors sample, 2D plotting samples -+@subsection Mesh sample -+@cindex Mesh -+ -+@float -+@image{png/mesh, 7cm} -+@caption{Example of Mesh. @tdref{mesh}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Box(); -+gr->Mesh(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+box -+mesh a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_mesh(gr,a,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+call mgl_mesh(gr,a,'') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Mesh(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Fall sample, Belt sample, Mesh sample, 2D plotting samples -+@subsection Fall sample -+@cindex Fall -+ -+@float -+@image{png/fall, 7cm} -+@caption{Example of Fall. @tdref{fall}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Box(); -+gr->Fall(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+box -+fall a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_fall(gr,a,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+call mgl_fall(gr,a,'') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Fall(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Belt sample, Tile sample, Fall sample, 2D plotting samples -+@subsection Belt sample -+@cindex Belt -+ -+@float -+@image{png/belt, 7cm} -+@caption{Example of Belt. @tdref{belt}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Belt(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+box -+belt a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_belt(gr,a,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_belt(gr,a,'') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Belt(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Tile sample, Boxs sample, Belt sample, 2D plotting samples -+@subsection Tile sample -+@cindex Tile -+ -+@float -+@image{png/tile, 7cm} -+@caption{Example of Tile. @tdref{tile}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Tile(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+box -+tile a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_tile(gr,a,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_tile(gr,a,'') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Tile(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Boxs sample, Dens sample, Tile sample, 2D plotting samples -+@subsection Boxs sample -+@cindex Boxs -+ -+@float -+@image{png/boxs, 7cm} -+@caption{Example of Boxs. @tdref{boxs}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+gr->Rotate(40,60); gr->Light(true); -+gr->Org = mglPoint(0,0,0); -+gr->Box(); -+gr->Boxs(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+rotate 40 60 -+light on -+origin 0 0 0 -+box -+boxs a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_origin(gr,0.,0.,0.); -+mgl_box(gr,1); -+mgl_boxs(gr,a,0,0.); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_origin(gr,0.,0.,0.); -+call mgl_box(gr,1) -+call mgl_boxs(gr,a,'',0.) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); -+gr.SetOrigin(0.,0.,0.); gr.Box(); -+gr.Boxs(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Dens sample, Cont sample, Boxs sample, 2D plotting samples -+@subsection Dens sample -+@cindex Dens -+@cindex Colorbar -+ -+@float -+@image{png/dens, 7cm} -+@caption{Example of Dens & Colorbar. @tdref{dens}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+gr->Box(); -+gr->Dens(a); -+gr->Colorbar(); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+box -+dens a -+colorbar -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_box(gr,1); -+mgl_dens(gr,a,0,0); -+mgl_colorbar(gr,"",0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_box(gr,1) -+call mgl_dens(gr,a,'',0) -+call mgl_colorbar(gr,'',0) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Box(); -+gr.Dens(a); -+gr.Colorbar(); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Cont sample, ContF sample, Dens sample, 2D plotting samples -+@subsection Cont sample -+@cindex Cont -+ -+@float -+@image{png/cont, 7cm} -+@caption{Example of Cont. @tdref{cont}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+gr->Rotate(40,60); -+gr->Box(); -+gr->Cont(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+rotate 40 60 -+box -+cont a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_cont(gr,a,0,7,NAN); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+real zero, nan -+! I don't know the NaN symbol in Fortran. So I produce it as zero/zero -+zero = 0; nan = zero/zero -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+call mgl_cont(gr,a,'',7,nan) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); -+gr.Box(); -+gr.Cont(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node ContF sample, ContD sample, Cont sample, 2D plotting samples -+@subsection ContF sample -+@cindex ContF -+ -+@float -+@image{png/contf, 7cm} -+@caption{Example of ContF. @tdref{contf}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); gr->Light(true); -+gr->Box(); -+gr->ContF(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+box -+contf a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_contf(gr,a,0,7,NAN); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+real zero, nan -+! I don't know the NaN symbol in Fortran. So I produce it as zero/zero -+zero = 0; nan = zero/zero -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_contf(gr,a,'',7,nan) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.ContF(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node ContD sample, Axial sample, ContF sample, 2D plotting samples -+@subsection ContD sample -+@cindex ContD -+ -+@float -+@image{png/contd, 7cm} -+@caption{Example of ContD. @tdref{contd}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40), v(9); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+v.Fill(-1,1); -+gr->Box(); -+gr->ContD(v,a); -+gr->Colorbar(v); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+var v 9 -1 1 -+box -+contd v a -+colorbar v -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+HMDT v = mgl_create_data_size(9,1,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_fill(v,-1.,1.,'x'); -+mgl_box(gr,1); -+mgl_contd_val(gr,v,a,0,0); -+mgl_colorbar_val(gr,v,NULL,0); -+mgl_delete_data(a); -+mgl_delete_data(v); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, v, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+v = mgl_create_data_size(9,1,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_fill(v,-1.,1.,'x'); -+call mgl_box(gr,1) -+call mgl_contd_val(gr,v,a,'',0); -+call mgl_colorbar_val(gr,v,NULL,0); -+call mgl_delete_data(a) -+call mgl_delete_data(v) -+@end verbatim -+@strong{Python} -+@verbatim -+a, v = mglData(50,40), mglData(9); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+v.Fill(-1,1); -+gr.Box(); -+gr.ContD(v,a); -+gr.Colorbar(v); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Axial sample, , ContD sample, 2D plotting samples -+@subsection Axial sample -+@cindex Axial -+ -+@float -+@image{png/axial, 7cm} -+@caption{Example of Axial. @tdref{axial}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->Box(); -+gr->Axial(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+alpha on -+box -+axial a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_axial(gr,a,"",3); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+call mgl_box(gr,1) -+call mgl_axial(gr,a,'',3) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Alpha(True); -+gr.Box(); -+gr.Axial(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node 3D plotting samples, Dual plotting samples, 2D plotting samples, Samples -+@section 3D plotting samples -+ -+@menu -+* Surf3 sample:: -+* CloudQ sample:: -+* CloudP sample:: -+* Dens3 sample:: -+* Cont3 sample:: -+* ContF3 sample:: -+* Cont projection sample:: -+* Dens projection sample:: -+* CutMinMax sample:: -+* ``Isocaps'' sample:: -+* CutOff sample:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Surf3 sample, CloudQ sample, , 3D plotting samples -+@subsection Surf3 sample -+@cindex Surf3 -+ -+@float -+@image{png/surf3, 7cm} -+@caption{Example of Surf3. @tdref{surf3}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->Box(); -+gr->Surf3(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+light on -+alpha on -+box -+surf3 a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_surf3(gr,a,0,3); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+call mgl_box(gr,1) -+call mgl_surf3(gr,a,'',3) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Light(True); gr.Alpha(True); -+gr.Box(); -+gr.Surf3(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node CloudQ sample, CloudP sample, Surf3 sample, 3D plotting samples -+@subsection CloudQ sample -+@cindex CloudQ -+ -+@float -+@image{png/cloudq, 7cm} -+@caption{Example of CloudQ. @tdref{cloudq}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Alpha(true); -+gr->Box(); -+gr->CloudQ(a,"wyrRk"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+alpha on -+box -+cloud a 'wyrRk' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_cloudq(gr,a,"wyrRk",1.); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_alpha(gr,1) -+call mgl_box(gr,1) -+call mgl_cloudq(gr,a,'wyrRk',1.) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Alpha(True); -+gr.Box(); -+gr.Cloud(a,"wyrRk"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node CloudP sample, Dens3 sample, CloudQ sample, 3D plotting samples -+@subsection CloudP sample -+@cindex CloudP -+ -+@float -+@image{png/cloudp, 7cm} -+@caption{Example of CloudP. @tdref{cloudp}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Alpha(true); -+gr->Box(); -+gr->CloudP(a,"wyrRk"); -+@end verbatim -+@strong{MGL code} -+ -+Not available. -+ -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_cloudp(gr,a,"wyrRk",1.); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_alpha(gr,1) -+call mgl_box(gr,1) -+call mgl_cloudp(gr,a,'wyrRk',1.) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+ -+Not available. -+ -+ -+@c ------------------------------------------------------------------ -+@node Dens3 sample, Cont3 sample, CloudP sample, 3D plotting samples -+@subsection Dens3 sample -+@cindex Dens3 -+@cindex Axis -+ -+@float -+@image{png/densa, 7cm} -+@caption{Example of Dens3. @tdref{densa}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); gr->Alpha(true); gr->Org = mglPoint(0,0,0); -+gr->Box(); -+gr->DensA(a); -+gr->Axis(); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+alpha on -+origin 0 0 0 -+box -+densa a -+axis -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_alpha(gr,1); -+mgl_set_origin(gr,0.,0.,0.); -+mgl_box(gr,1); -+mgl_dens3_all(gr,a,0); -+mgl_axis(gr,"xyz"); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_alpha(gr,1) -+call mgl_set_origin(gr,0.,0.,0.); -+call mgl_box(gr,1) -+call mgl_dens3_all(gr,a,'') -+call mgl_axis(gr,"xyz") -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Alpha(True); -+gr.SetOrigin(0,0,0); gr.Box(); -+gr.Axis(); -+gr.DensA(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Cont3 sample, ContF3 sample, Dens3 sample, 3D plotting samples -+@subsection Cont3 sample -+@cindex Cont3 -+ -+@float -+@image{png/conta, 7cm} -+@caption{Example of Cont3. @tdref{conta}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Box(); -+gr->ContA(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+box -+conta a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_cont_all(gr,a,0,7); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+call mgl_cont_all(gr,a,'',7) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); -+gr.Box(); -+gr.ContA(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node ContF3 sample, Cont projection sample, Cont3 sample, 3D plotting samples -+@subsection ContF3 sample -+@cindex ContF3 -+ -+@float -+@image{png/contfa, 7cm} -+@caption{Example of ContF3. @tdref{contfa}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); gr->Light(true); -+gr->Box(); -+gr->ContFA(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+light on -+box -+contfa a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_contf_all(gr,a,0,7); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_contf_all(gr,a,'',7) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.ContFA(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Cont projection sample, Dens projection sample, ContF3 sample, 3D plotting samples -+@subsection Cont projection sample -+@cindex ContX -+@cindex ContY -+@cindex ContZ -+ -+@float -+@image{png/cont_xyz, 7cm} -+@caption{Example of projection by Cont[XYZ]. @tdref{cont_xyz}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Box(); -+gr->ContX(a.Sum("x"),"",-1); -+gr->ContY(a.Sum("y"),"",1); -+gr->ContZ(a.Sum("z"),"",-1); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+box -+sum s a 'x' -+contx s '' -1 -+sum s a 'y' -+conty s '' 1 -+sum s a 'z' -+contz s '' -1 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40), s; -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+s=mgl_data_sum(a,"x"); mgl_cont_x(gr,s,0,-1.,7); mgl_delete_data(s); -+s=mgl_data_sum(a,"y"); mgl_cont_y(gr,s,0,1.,7); mgl_delete_data(s); -+s=mgl_data_sum(a,"z"); mgl_cont_z(gr,s,0,-1.,7); mgl_delete_data(s); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,s, mgl_create_data_size, mgl_data_sum -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+s=mgl_data_sum(a,'x') -+call mgl_cont_x(gr,s,'',-1.,7) -+call mgl_delete_data(s) -+s=mgl_data_sum(a,'y') -+call mgl_cont_y(gr,s,'',1.,7) -+call mgl_delete_data(s) -+s=mgl_data_sum(a,'z') -+call mgl_cont_z(gr,s,'',-1.,7) -+call mgl_delete_data(s) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Box(); -+gr.ContX(a.Sum("x"),"",-1); -+gr.ContY(a.Sum("y"),"",1); -+gr.ContZ(a.Sum("z"),"",-1); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Dens projection sample, CutMinMax sample, Cont projection sample, 3D plotting samples -+@subsection Dens projection sample -+@cindex DensX -+@cindex DensY -+@cindex DensZ -+ -+@float -+@image{png/dens_xyz, 7cm} -+@caption{Example of projection by Dens[XYZ]. @tdref{dens_xyz}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Box(); -+gr->DensX(a.Sum("x"),"",-1); -+gr->DensY(a.Sum("y"),"",1); -+gr->DensZ(a.Sum("z"),"",-1); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+box -+sum s a 'x' -+densx s '' -1 -+sum s a 'y' -+densy s '' 1 -+sum s a 'z' -+densz s '' -1 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a, s; a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+s=mgl_data_sum(a,"x"); mgl_dens_x(gr,s,0,-1.); mgl_delete_data(s); -+s=mgl_data_sum(a,"y"); mgl_dens_y(gr,s,0,1.); mgl_delete_data(s); -+s=mgl_data_sum(a,"z"); mgl_dens_z(gr,s,0,-1.); mgl_delete_data(s); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,s, mgl_create_data_size, mgl_data_sum -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+s=mgl_data_sum(a,'x') -+call mgl_dens_x(gr,s,'',-1.) -+call mgl_delete_data(s) -+s=mgl_data_sum(a,'y') -+call mgl_dens_y(gr,s,'',1.) -+call mgl_delete_data(s) -+s=mgl_data_sum(a,'z') -+call mgl_dens_z(gr,s,'',-1.) -+call mgl_delete_data(s) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Box(); -+gr.DensX(a.Sum("x"),"",-1); -+gr.DensY(a.Sum("y"),"",1); -+gr.DensZ(a.Sum("z"),"",-1); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node CutMinMax sample, ``Isocaps'' sample, Dens projection sample, 3D plotting samples -+@subsection CutMinMax sample -+@cindex Surf3 -+@cindex CutMin -+@cindex CutMax -+ -+@float -+@image{png/cutminmax, 7cm} -+@caption{Example of Surf3 & CutMin, CutMax. @tdref{cutminmax}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->CutMin = mglPoint(0,-1,-1); gr->CutMax = mglPoint(1,0,1); -+gr->Box(); -+gr->Surf3(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+light on -+alpha on -+cut 0 -1 -1 1 0 1 -+box -+surf3 a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_set_cut_box(gr,0.,-1.,-1.,1.,0.,1.); -+mgl_box(gr,1); -+mgl_surf3(gr,a,0,3); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+call mgl_set_cut_box(gr,0.,-1.,-1.,1.,0.,1.); -+call mgl_box(gr,1) -+call mgl_surf3(gr,a,'',3) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Light(True); gr.Alpha(True); -+gr.SetCutBox(0,-1,-1,1,0,1); gr.Box(); -+gr.Surf3(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node ``Isocaps'' sample, CutOff sample, CutMinMax sample, 3D plotting samples -+@subsection ``Isocaps'' sample -+@cindex Surf3 -+@cindex ContF3 -+@cindex CutMin -+@cindex CutMax -+ -+@float -+@image{png/cutminmax2, 7cm} -+@caption{Example of ``Isocaps''. @tdref{cutminmax2}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(61,51,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->CutMin = mglPoint(0,-1,-1); gr->CutMax = mglPoint(1,0,1.1); -+gr->Box(); -+gr->Surf3(-1,a); -+gr->ContF3(a,'x',-1); gr->ContF3(a,'y',-1); -+gr->ContF3(a,'z', 0); gr->ContF3(a,'z',39); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 61 51 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+light on -+cut 0 -1 -1 1 0 1.1 -+box -+surf3 a -1 -+contf3 a 'x' -1 -+contf3 a 'y' -1 -+contf3 a 'z' 0 -+contf3 a 'z' 39 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(61,51,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_cut_box(gr,0.,-1.,-1.,1.,0.,1.1); -+mgl_box(gr,1); -+mgl_surf3_val(gr,-1.,a,0); -+mgl_contf3(gr,a,'x',-1, "", 7); -+mgl_contf3(gr,a,'y',-1, "", 7); -+mgl_contf3(gr,a,'z', 0, "", 7); -+mgl_contf3(gr,a,'z',39, "", 7); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+a = mgl_create_data_size(61,51,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_cut_box(gr,0.,-1.,-1.,1.,0.,1.1); -+call mgl_box(gr,1) -+call mgl_surf3_val(gr,-1.,a,'') -+call mgl_contf3(gr,a,'x',-1, '', 7); -+call mgl_contf3(gr,a,'y',-1, '', 7); -+call mgl_contf3(gr,a,'z', 0, '', 7); -+call mgl_contf3(gr,a,'z',39, '', 7); -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(61,51,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Light(True); -+gr.SetCutBox(0,-1,-1,1,0,1.1); gr.Box(); -+gr.Surf3(-1,a); -+gr.ContF3(a,"x",-1); gr.ContF3(a,"y",-1); -+gr.ContF3(a,"z",0); gr.ContF3(a,"z",39); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node CutOff sample, , ``Isocaps'' sample, 3D plotting samples -+@subsection CutOff sample -+@cindex Surf3 -+@cindex CutOff -+ -+@float -+@image{png/surf3_cutoff, 7cm} -+@caption{Example of Surf3 & CutOff. @tdref{surf3_cutoff}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->CutOff("(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)"); -+gr->Box(); -+gr->Surf3(a); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+light on -+alpha on -+cut '(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)' -+box -+surf3 a -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_set_cutoff(gr,"(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)"); -+mgl_box(gr,1); -+mgl_surf3(gr,a,0,3); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,'-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)',0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+call mgl_set_cutoff(gr,'(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)') -+call mgl_box(gr,1) -+call mgl_surf3(gr,a,'',3) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(61,51,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+gr.Rotate(40,60); gr.Light(True); gr.Alpha(True); -+gr.CutOff("(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)"); -+gr.Box(); -+gr.Surf3(a); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Dual plotting samples, Additional features, 3D plotting samples, Samples -+@section Dual plotting samples -+ -+@menu -+* SurfC sample:: -+* SurfA sample:: -+* TileS sample:: -+* Map sample:: -+* Traj sample:: -+* Vect sample:: -+* VectL sample:: -+* VectC sample:: -+* Flow sample:: -+* Pipe sample:: -+* Dew sample:: -+* Surf3C sample:: -+* Surf3A sample:: -+* Vect 3D sample:: -+* VectL 3D sample:: -+* VectC 3D sample:: -+* Flow 3D sample:: -+* Pipe 3D sample:: -+* Crust sample:: -+* Dots sample:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node SurfC sample, SurfA sample, , Dual plotting samples -+@subsection SurfC sample -+@cindex SurfC -+ -+@float -+@image{png/surfc, 7cm} -+@caption{Example of SurfC. @tdref{surfc}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40), b(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->SurfC(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+new b 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+box -+surfc a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+HMDT b = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_surfc(gr,a,b,0); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_surfc(gr,a,b,'') -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(50,40), mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.SurfC(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node SurfA sample, TileS sample, SurfC sample, Dual plotting samples -+@subsection SurfA sample -+@cindex SurfA -+ -+@float -+@image{png/surfa, 7cm} -+@caption{Example of SurfA. @tdref{surfa}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40), b(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->Box(); -+gr->SurfA(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+new b 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+alpha on -+box -+surfa a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a, b; -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_surfa(gr,a,b,0); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1); -+call mgl_box(gr,1) -+call mgl_surfa(gr,a,b,'') -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(50,40), mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); gr.Alpha(True); -+gr.Box(); -+gr.SurfC(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node TileS sample, Map sample, SurfA sample, Dual plotting samples -+@subsection Tiles sample -+@cindex TileS -+ -+@float -+@image{png/tiler, 7cm} -+@caption{Example of TileS. @tdref{tiler}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40), b(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Box(); -+gr->TileS(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+new b 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+box -+tile a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a, b; -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_box(gr,1); -+mgl_tiles(gr,a,b,0); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_box(gr,1) -+call mgl_tiles(gr,a,b,'') -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(50,40), mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Box(); -+gr.TileS(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Map sample, Traj sample, TileS sample, Dual plotting samples -+@subsection Map sample -+@cindex Map -+ -+@float -+@image{png/map, 7cm} -+@caption{Example of Map. @tdref{map}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50, 40), b(50, 40); -+gr->Puts(mglPoint(0, 0), "\\to", "", -1.4); -+gr->Axis(mglPoint(-1,-1,-2),mglPoint(1,1,2)); -+ -+gr->SubPlot(2, 1, 0); -+a.Fill("x", gr->Min, gr->Max); b.Fill("y", gr->Min, gr->Max); -+gr->Puts(mglPoint(0, 1.1), "\\{x, y\\}", "C", -2); gr->Box(); -+gr->Map(a, b, "brgk", 0, false); -+ -+gr->SubPlot(2, 1, 1); -+a.Fill("(x^3+y^3)/2", gr->Min, gr->Max); -+b.Fill("(x-y)/2", gr->Min, gr->Max); -+gr->Puts(mglPoint(0, 1.1), "\\{\\frac{x^3+y^3}{2}, \\frac{x-y}{2}\\}", "C", -2); -+gr->Box(); -+gr->Map(a, b, "brgk", 0, false); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+new b 50 40 -+text 0 0 '\to' -+zrange -2 2 -+ -+subplot 2 1 0 -+text 0 1.1 '\{x, y\}' '' -2 -+box -+fill a 'x' -+fill b 'y' -+map a b 'brgk' 0 0 -+ -+subplot 2 1 1 -+text 0 1.1 '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}' '' -2 -+box -+fill a '(x^3+y^3)/2' -+fill b '(x-y)/2' -+map a b 'brgk' 0 0 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+HMDT b = mgl_create_data_size(50,40,1); -+mgl_puts_ext(gr, 0.,0.,0., "\\to", "", -1.4, 't'); -+mgl_set_axis_3d(gr,-1.,-1.,-2.,1.,1.,2.); -+ -+mgl_subplot(gr, 2, 1, 0); -+mgl_data_fill_eq(gr, a, "x", 0, 0); -+mgl_data_fill_eq(gr, b, "y", 0, 0); -+mgl_puts_ext(gr, 0.,1.1,0., "\\{x, y\\}", "C", -2., 't'); -+mgl_box(gr,1); -+mgl_map(gr, a, b, "brgk", 0, 0); -+ -+mgl_subplot(gr, 2, 1, 1); -+mgl_data_fill_eq(gr, a, "(x^3+y^3)/2", 0, 0); -+mgl_data_fill_eq(gr, b, "(x-y)/2", 0, 0); -+mgl_puts_ext(gr, 0.,1.1,0., "\\{\\frac{x^3+y^3}{2}, \\frac{x-y}{2}\\}", "C", -2., 't'); -+mgl_box(gr,1); -+mgl_map(gr, a, b, "brgk", 0, 0); -+ -+mgl_box(gr,1); -+mgl_map(gr,a,b,0,0,1); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+call mgl_puts_ext(gr, 0.,0.,0., '\to', '', -1.4, 't'); -+call mgl_set_axis_3d(gr,-1.,-1.,-2.,1.,1.,2.); -+ -+call mgl_subplot(gr, 2, 1, 0); -+call mgl_data_fill_eq(gr, a, 'x', 0, 0); -+call mgl_data_fill_eq(gr, b, 'y', 0, 0); -+call mgl_puts_ext(gr, 0.,1.1,0., '\{x, y\}', 'C', -2., 't'); -+call mgl_box(gr,1); -+call mgl_map(gr, a, b, 'brgk', 0, 0); -+ -+call mgl_subplot(gr, 2, 1, 1); -+call mgl_data_fill_eq(gr, a, '(x^3+y^3)/2', 0, 0); -+call mgl_data_fill_eq(gr, b, '(x-y)/2', 0, 0); -+call mgl_puts_ext(gr, 0.,1.1,0., '\{\frac{x^3+y^3}{2}, \frac{x-y}{2}\}', 'C', -2., 't'); -+call mgl_box(gr,1); -+call mgl_map(gr, a, b, 'brgk', 0, 0); -+call mgl_box(gr,1); -+call mgl_map(gr,a,b,0,0,1); -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(50,40), mglData(50,40); -+gr.Puts(0, 0, 0, "\\to", "", -1.4); -+gr.SetRanges(-1,1,-1,1,-2,2); -+ -+gr.SubPlot(2, 1, 0); -+gr.Fill(a, "x"); gr.Fill(b, "y"); -+gr.Puts(0, 1.1, 0, "\\{x, y\\}", "C", -2); -+gr.Box(); -+gr.Map(a, b, "brgk", 0, 0); -+ -+gr.SubPlot(2, 1, 1); -+gr.Fill(a, "(x^3+y^3)/2"); gr.Fill(b, "(x-y)/2"); -+gr.Puts(0, 1.1, 0, "\\{\\frac{x^3+y^3}{2}, \\frac{x-y}{2}\\}", "C", -2); -+gr.Box(); -+gr.Map(a, b, "brgk", 0, 0); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Traj sample, Vect sample, Map sample, Dual plotting samples -+@subsection Traj sample -+@cindex Traj -+ -+@float -+@image{png/traj, 7cm} -+@caption{Example of Plot. @tdref{traj}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y(50,3), x(50), y1(50), y2(50); -+y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+y2.Modify("0.3*sin(2*pi*x)"); -+x.Fill(-1,1,'x'); -+ -+gr->Box(); -+gr->Plot(x,y); -+gr->Traj(x,y,y1,y2); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y 50 3 -+new x 50 -+new y1 50 -+new y2 50 -+modify y '0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)' -+modify y 'sin(2*pi*x)' 1 -+modify y 'cos(2*pi*x)' 2 -+fill x -1 1 -+modify y1 '0.5+0.3*cos(2*pi*x)' -+modify y2 '0.3*sin(2*pi*x)' -+box -+plot x y -+traj x y y1 y2 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y = mgl_create_data_size(50,3,1); -+HMDT x= mgl_create_data_size(50,1,1); -+HMDT y1 = mgl_create_data_size(50,1,1); -+HMDT y2 = mgl_create_data_size(50,1,1); -+mgl_data_modify(y,"0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+mgl_data_modify(y,"sin(2*pi*x)",1); -+mgl_data_modify(y,"cos(2*pi*x)",2); -+mgl_data_modify(x,"2*x-1",0); -+mgl_data_modify(y1,"0.5+0.3*cos(2*pi*x)",0); -+mgl_data_modify(y2,"0.3*sin(2*pi*x)",0); -+mgl_box(gr,1); -+mgl_plot_xy(gr,x,y,NULL); -+mgl_traj_xy(gr,yx,y,y1,y2,NULL,0,0); -+mgl_delete_data(y); mgl_delete_data(y1); -+mgl_delete_data(x); mgl_delete_data(y2); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer x,y,y1,y2, mgl_create_data_size -+y = mgl_create_data_size(50,3,1) -+x= mgl_create_data_size(50,1,1); -+y1 = mgl_create_data_size(50,1,1); -+y2 = mgl_create_data_size(50,1,1); -+call mgl_data_modify(y,'0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)',0) -+call mgl_data_modify(y,'sin(2*pi*x)',1) -+call mgl_data_modify(y,'cos(2*pi*x)',2) -+call mgl_data_modify(x,'2*x-1',0); -+call mgl_data_modify(y1,'0.5+0.3*cos(2*pi*x)',0); -+call mgl_data_modify(y2,'0.3*sin(2*pi*x)',0); -+call mgl_box(gr,1) -+call mgl_plot_xy(gr,x,y,NULL); -+call mgl_traj_xy(gr,yx,y,y1,y2,NULL,0,0); -+call mgl_delete_data(y) -+call mgl_delete_data(x) -+call mgl_delete_data(y1) -+call mgl_delete_data(y2) -+@end verbatim -+@strong{Python} -+@verbatim -+x,y,y1,y2 = mglData(50), mglData(50,3), mglData(50), mglData(50); -+y.Modify("0.7*sin(2*pi*x)+0.5*cos(3*pi*x)+0.2*sin(pi*x)",0); -+y.Modify("sin(2*pi*x)",1); -+y.Modify("cos(2*pi*x)",2); -+y1.Modify("0.5+0.3*cos(2*pi*x)"); -+y2.Modify("0.3*sin(2*pi*x)"); -+x.Fill(-1,1,'x'); -+gr.Box(); -+gr.Plot(x,y); -+gr.Traj(x,y,y1,y2); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Vect sample, VectL sample, Traj sample, Dual plotting samples -+@subsection Vect sample -+@cindex Vect -+ -+@float -+@image{png/vect, 7cm} -+@caption{Example of Vect. @tdref{vect}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(20,30), b(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Box(); -+gr->Vect(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 20 30 -+new b 20 30 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+box -+vect a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(20,30,1); -+HMDT b = mgl_create_data_size(20,30,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_box(gr,1); -+mgl_vect_2d(gr,a,b,0,0.); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_box(gr,1) -+call mgl_vect_2d(gr,a,b,'',0.) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(20,30), mglData(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Box(); -+gr.Vect(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node VectL sample, VectC sample, Vect sample, Dual plotting samples -+@subsection VectL sample -+@cindex VectL -+ -+@float -+@image{png/vectl, 7cm} -+@caption{Example of VectL. @tdref{vectl}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(20,30), b(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Box(); -+gr->VectL(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 20 30 -+new b 20 30 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+box -+vectl a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a, b; -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_box(gr,1); -+mgl_vectl_2d(gr,a,b,0,0.); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_box(gr,1) -+call mgl_vectl_2d(gr,a,b,'',0.) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(20,30), mglData(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Box(); -+gr.VectL(a,b); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node VectC sample, Flow sample, VectL sample, Dual plotting samples -+@subsection VectC sample -+@cindex VectC -+ -+@float -+@image{png/vectc, 7cm} -+@caption{Example of VectC. @tdref{vectc}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(20,30), b(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Box(); -+gr->VectC(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 20 30 -+new b 20 30 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+box -+vectc a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a, b; -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_box(gr,1); -+mgl_vectc_2d(gr,a,b,0,0.); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_box(gr,1) -+call mgl_vectc_2d(gr,a,b,'',0.) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(20,30), mglData(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Box(); -+gr.VectC(a,b); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Flow sample, Pipe sample, VectC sample, Dual plotting samples -+@subsection Flow sample -+@cindex Flow -+ -+@float -+@image{png/flow, 7cm} -+@caption{Example of Flow. @tdref{flow}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(20,30), b(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Box(); -+gr->Flow(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 20 30 -+new b 20 30 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+box -+flow a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(20,30,1); -+HMDT b = mgl_create_data_size(20,30,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_box(gr,1); -+mgl_flow_2d(gr,a,b,0,5,1,0.); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_box(gr,1) -+call mgl_flow_2d(gr,a,b,'',5,1,0.) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(20,30), mglData(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Box(); -+gr.Flow(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Pipe sample, Dew sample, Flow sample, Dual plotting samples -+@subsection Pipe sample -+@cindex Pipe -+ -+@float -+@image{png/pipe, 7cm} -+@caption{Example of Pipe. @tdref{pipe}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(20,30), b(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+gr->Light(true); -+gr->Box(); -+gr->Pipe(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 20 30 -+new b 20 30 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+light on -+box -+pipe a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(20,30,1); -+HMDT b = mgl_create_data_size(20,30,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_pipe_2d(gr,a,b,0,0.05,5,1,0.); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_pipe_2d(gr,a,b,'',0.05,5,1,0.) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(20,30), mglData(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Light(True); gr.Box(); -+gr.Pipe(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Dew sample, Surf3C sample, Pipe sample, Dual plotting samples -+@subsection Dew sample -+@cindex Dew -+ -+@float -+@image{png/dew, 7cm} -+@caption{Example of Dew. @tdref{dew}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(20,30), b(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+gr->Box(); -+gr->Light(true); -+gr->Dew(a,b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 20 30 -+new b 20 30 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+box -+light on -+dew a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(20,30,1); -+HMDT b = mgl_create_data_size(20,30,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_box(gr,1); -+mgl_set_light(gr,1); -+mgl_dew_2d(gr,a,b,0,0.); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(20,30,1); -+b = mgl_create_data_size(20,30,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_box(gr,1) -+call mgl_set_light(gr,1); -+call mgl_dew_2d(gr,a,b,'',0.) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(20,30), mglData(20,30); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Light(True); gr.Box(); -+gr.Dew(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Surf3C sample, Surf3A sample, Dew sample, Dual plotting samples -+@subsection Surf3C sample -+@cindex Surf3C -+ -+@float -+@image{png/surf3c, 7cm} -+@caption{Example of Surf3C. @tdref{surf3c}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40), b(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+b.Modify("1-2*tanh(4*(x+y-1)^2)"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->Box(); -+gr->Surf3C(a, b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+new b 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+modify b '1-2*tanh(4*(x+y-1)^2)' -+ -+rotate 40 60 -+light on -+alpha on -+box -+surf3c a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+HMDT b = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+mgl_data_modify(b,"1-2*tanh(4*(x+y-1)^2)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_surf3c(gr,a,b,0,3); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+b = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+call mgl_data_modify(b,"1-2*tanh(4*(x+y-1)^2)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+call mgl_box(gr,1) -+call mgl_surf3c(gr,a,b,'',3) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(60,50,40), mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2+(2*y-1)^2+(2*z-1)^4-(2*z-1)^2-0.1)"); -+b.Modify("1-2*tanh(4*(x+y-1)^2)"); -+gr.Rotate(40,60); gr.Light(True); gr.Alpha(True); -+gr.Box(); -+gr.Surf3C(a,b); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Surf3A sample, Vect 3D sample, Surf3C sample, Dual plotting samples -+@subsection Surf3A sample -+@cindex Surf3A -+ -+@float -+@image{png/surf3a, 7cm} -+@caption{Example of Surf3A. @tdref{surf3a}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40), b(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+b.Modify("1-2*tanh(4*(x+y-1)^2)"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Alpha(true); -+gr->Box(); -+gr->Surf3A(a, b); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+new b 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+modify b '1-2*tanh(4*(x+y-1)^2)' -+ -+rotate 40 60 -+light on -+alpha on -+box -+surf3a a b -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a, b; a = mgl_create_data_size(60,50,40); -+b = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+mgl_data_modify(b,"1-2*tanh(4*(x+y-1)^2)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+mgl_box(gr,1); -+mgl_surf3a(gr,a,b,0,3); -+mgl_delete_data(a); mgl_delete_data(b); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+b = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+call mgl_data_modify(b,"1-2*tanh(4*(x+y-1)^2)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+call mgl_box(gr,1) -+call mgl_surf3a(gr,a,b,'',3) -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(60,50,40), mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2+(2*y-1)^2+(2*z-1)^4-(2*z-1)^2-0.1)"); -+b.Modify("1-2*tanh(4*(x+y-1)^2)"); -+gr.Rotate(40,60); gr.Light(True); gr.Alpha(True); -+gr.Box(); -+gr.Surf3A(a,b); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Vect 3D sample, VectL 3D sample, Surf3A sample, Dual plotting samples -+@subsection Vect 3D sample -+@cindex Vect -+ -+@float -+@image{png/vect3, 7cm} -+@caption{Example of Vect in 3D. @tdref{vect3}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData ex(10,10,10), ey(10,10,10), ez(10,10,10); -+ex.Fill("0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ey.Fill("0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ez.Fill("0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+gr->Rotate(40,60); -+gr->Box(); -+gr->Vect(ex, ey, ez, "bwr"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new ex 10 10 10 -+new ey 10 10 10 -+new ez 10 10 10 -+fill ex '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ey '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ez '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)' -+ -+rotate 40 60 -+box -+vect ex ey ez 'bwr' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT ex, ey, ez; -+ex = mgl_create_data_size(10,10,10); -+ey = mgl_create_data_size(10,10,10); -+ez = mgl_create_data_size(10,10,10); -+mgl_data_fill_eq(gr, ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_vect_3d(gr,ex,ey,ez,"bwr"); -+mgl_delete_data(ex); mgl_delete_data(ey); mgl_delete_data(ez); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer ex,ey,ez, mgl_create_data_size -+ex = mgl_create_data_size(10,10,10) -+ey = mgl_create_data_size(10,10,10) -+ez = mgl_create_data_size(10,10,10) -+call mgl_data_fill_eq(gr, ex, '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ey, '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ez, '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1); -+call mgl_vect_3d(gr,ex,ey,ez,'bwr') -+call mgl_delete_data(ex) -+call mgl_delete_data(ey) -+call mgl_delete_data(ez) -+@end verbatim -+@strong{Python} -+@verbatim -+ex, ey, ez = mglData(10,10,10), mglData(10,10,10), mglData(10,10,10); -+gr.Fill(ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Rotate(40,60); gr.Box(); -+gr.Vect(ex,ey,ez,"bwr"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node VectL 3D sample, VectC 3D sample, Vect 3D sample, Dual plotting samples -+@subsection VectL 3D sample -+@cindex VectL -+ -+@float -+@image{png/vectl3, 7cm} -+@caption{Example of VectL in 3D. @tdref{vectl3}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData ex(10,10,10), ey(10,10,10), ez(10,10,10); -+ex.Fill("0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ey.Fill("0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ez.Fill("0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+gr->Rotate(40,60); -+gr->Box(); -+gr->VectL(ex, ey, ez, "bwr"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new ex 10 10 10 -+new ey 10 10 10 -+new ez 10 10 10 -+fill ex '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ey '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ez '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)' -+ -+rotate 40 60 -+box -+vectl ex ey ez 'bwr' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT ex, ey, ez; -+ex = mgl_create_data_size(10,10,10); -+ey = mgl_create_data_size(10,10,10); -+ez = mgl_create_data_size(10,10,10); -+mgl_data_fill_eq(gr, ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_vectl_3d(gr,ex,ey,ez,"bwr"); -+mgl_delete_data(ex); mgl_delete_data(ey); mgl_delete_data(ez); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer ex,ey,ez, mgl_create_data_size -+ex = mgl_create_data_size(10,10,10) -+ey = mgl_create_data_size(10,10,10) -+ez = mgl_create_data_size(10,10,10) -+call mgl_data_fill_eq(gr, ex, '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ey, '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ez, '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1); -+call mgl_vectl_3d(gr,ex,ey,ez,'bwr') -+call mgl_delete_data(ex) -+call mgl_delete_data(ey) -+call mgl_delete_data(ez) -+@end verbatim -+@strong{Python} -+@verbatim -+ex, ey, ez = mglData(10,10,10), mglData(10,10,10), mglData(10,10,10); -+gr.Fill(ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Rotate(40,60); gr.Box(); -+gr.VectL(ex,ey,ez,"bwr"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node VectC 3D sample, Flow 3D sample, VectL 3D sample, Dual plotting samples -+@subsection VectC 3D sample -+@cindex VectC -+ -+@float -+@image{png/vectc3, 7cm} -+@caption{Example of VectC in 3D. @tdref{vectc3}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData ex(10,10,10), ey(10,10,10), ez(10,10,10); -+ex.Fill("0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ey.Fill("0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ez.Fill("0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+gr->Rotate(40,60); -+gr->Box(); -+gr->VectC(ex, ey, ez, "bwr"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new ex 10 10 10 -+new ey 10 10 10 -+new ez 10 10 10 -+fill ex '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ey '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ez '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)' -+ -+rotate 40 60 -+box -+vectc ex ey ez 'bwr' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT ex, ey, ez; -+ex = mgl_create_data_size(10,10,10); -+ey = mgl_create_data_size(10,10,10); -+ez = mgl_create_data_size(10,10,10); -+mgl_data_fill_eq(gr, ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_vectc_3d(gr,ex,ey,ez,"bwr"); -+mgl_delete_data(ex); mgl_delete_data(ey); mgl_delete_data(ez); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer ex,ey,ez, mgl_create_data_size -+ex = mgl_create_data_size(10,10,10) -+ey = mgl_create_data_size(10,10,10) -+ez = mgl_create_data_size(10,10,10) -+call mgl_data_fill_eq(gr, ex, '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ey, '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ez, '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1); -+call mgl_vectc_3d(gr,ex,ey,ez,'bwr') -+call mgl_delete_data(ex) -+call mgl_delete_data(ey) -+call mgl_delete_data(ez) -+@end verbatim -+@strong{Python} -+@verbatim -+ex, ey, ez = mglData(10,10,10), mglData(10,10,10), mglData(10,10,10); -+gr.Fill(ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Rotate(40,60); gr.Box(); -+gr.VectC(ex,ey,ez,"bwr"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Flow 3D sample, Pipe 3D sample, VectC 3D sample, Dual plotting samples -+@subsection Flow 3D sample -+@cindex Flow -+ -+@float -+@image{png/flow3, 7cm} -+@caption{Example of Flow in 3D. @tdref{flow3}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData ex(30,30,30), ey(30,30,30), ez(30,30,30); -+ex.Fill("0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ey.Fill("0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ez.Fill("0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+gr->Rotate(40,60); -+gr->Box(); -+gr->Flow(ex, ey, ez, "bwr"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new ex 30 30 30 -+new ey 30 30 30 -+new ez 30 30 30 -+fill ex '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ey '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ez '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)' -+ -+rotate 40 60 -+box -+flow ex ey ez 'bwr' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT ex, ey, ez; -+ex = mgl_create_data_size(30,30,30); -+ey = mgl_create_data_size(30,30,30); -+ez = mgl_create_data_size(30,30,30); -+mgl_data_fill_eq(gr, ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_flow_3d(gr,ex,ey,ez,"bwr",3,1); -+mgl_delete_data(ex); mgl_delete_data(ey); mgl_delete_data(ez); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer ex,ey,ez, mgl_create_data_size -+ex = mgl_create_data_size(30,30,30) -+ey = mgl_create_data_size(30,30,30) -+ez = mgl_create_data_size(30,30,30) -+call mgl_data_fill_eq(gr, ex, '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ey, '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ez, '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1); -+call mgl_flow_3d(gr,ex,ey,ez,'bwr',3,1) -+call mgl_delete_data(ex) -+call mgl_delete_data(ey) -+call mgl_delete_data(ez) -+@end verbatim -+@strong{Python} -+@verbatim -+ex, ey, ez = mglData(10,10,10), mglData(10,10,10), mglData(10,10,10); -+gr.Fill(ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Rotate(40,60); gr.Box(); -+gr.Flow(ex,ey,ez,"bwr"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Pipe 3D sample, Crust sample, Flow 3D sample, Dual plotting samples -+@subsection Pipe 3D sample -+@cindex Pipe -+ -+@float -+@image{png/pipe3, 7cm} -+@caption{Example of Pipe in 3D. @tdref{pipe3}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData ex(10,10,10), ey(10,10,10), ez(10,10,10); -+ex.Fill("0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ey.Fill("0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+ez.Fill("0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)", gr->Min, gr->Max); -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Pipe(ex, ey, ez, "bwr"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new ex 10 10 10 -+new ey 10 10 10 -+new ez 10 10 10 -+fill ex '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ey '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)' -+fill ez '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)' -+ -+rotate 40 60 -+light on -+box -+pipe ex ey ez 'bwr' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT ex, ey, ez; -+ex = mgl_create_data_size(10,10,10); -+ey = mgl_create_data_size(10,10,10); -+ez = mgl_create_data_size(10,10,10); -+mgl_data_fill_eq(gr, ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+mgl_data_fill_eq(gr, ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)",0,0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_pipe_3d(gr,ex,ey,ez,"bwr",0.05,3,1); -+mgl_delete_data(ex); mgl_delete_data(ey); mgl_delete_data(ez); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer ex,ey,ez, mgl_create_data_size -+ex = mgl_create_data_size(10,10,10) -+ey = mgl_create_data_size(10,10,10) -+ez = mgl_create_data_size(10,10,10) -+call mgl_data_fill_eq(gr, ex, '0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ey, '0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+call mgl_data_fill_eq(gr, ez, '0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - & -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)',0,0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1); -+call mgl_box(gr,1); -+call mgl_pipe_3d(gr,ex,ey,ez,'bwr',0.05,3,1) -+call mgl_delete_data(ex) -+call mgl_delete_data(ey) -+call mgl_delete_data(ez) -+@end verbatim -+@strong{Python} -+@verbatim -+ex, ey, ez = mglData(10,10,10), mglData(10,10,10), mglData(10,10,10); -+gr.Fill(ex, "0.2*x/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*x/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ey, "0.2*y/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*y/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Fill(ez, "0.2*(z-0.3)/pow(x^2+y^2+(z-0.3)^2,1.5) - \ -+ 0.2*(z+0.3)/pow(x^2+y^2+(z+0.3)^2,1.5)"); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Pipe(ex,ey,ez,"bwr"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Crust sample, Dots sample, Pipe 3D sample, Dual plotting samples -+@subsection Crust sample -+@cindex Crust -+ -+@float -+@image{png/crust, 7cm} -+@caption{Example of Crust. @tdref{crust}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a("hotdogs.pts"); -+a.Norm(-1,1,true); -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Crust(a,"p"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+read a 'hotdogs.pts' -+norm a -1 1 on -+rotate 40 60 -+light on -+box -+crust a 'p' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_file("hotdogs.pts"); -+mgl_data_norm(a,-1.,1.,1,0); -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_crust_tr(gr,a,"p",0.); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_file -+a = mgl_create_data_file("hotdogs.pts") -+call mgl_data_norm(a,-1.,1.,1,0) -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_crust_tr(gr,a,"p",0.) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData("hotdogs.pts"); -+a.Norm(-1,1,True); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.Crust(a); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Dots sample, , Crust sample, Dual plotting samples -+@subsection Dots sample -+@cindex Dots -+ -+@float -+@image{png/dots, 7cm} -+@caption{Example of Dots. @tdref{dots}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a("hotdogs.pts"); -+a.Norm(-1,1,true); -+gr->Rotate(40,60); -+gr->Box(); -+gr->Dots(a,"p"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+read a 'hotdogs.pts' -+norm a -1 1 on -+rotate 40 60 -+box -+dots a 'p' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_file("hotdogs.pts"); -+mgl_data_norm(a,-1.,1.,1,0); -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_dots_tr(gr,a,"p"); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_file -+a = mgl_create_data_file("hotdogs.pts") -+call mgl_data_norm(a,-1.,1.,1,0) -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+call mgl_dots_tr(gr,a,"p") -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData("hotdogs.pts"); -+a.Norm(-1,1,True); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.Dots(a); -+@end verbatim -+ -+ -+ -+@c ------------------------------------------------------------------ -+@node Additional features, Advanced features, Dual plotting samples, Samples -+@section Additional features -+ -+@menu -+* Legend sample:: -+* Adding mesh sample:: -+* Surf & Cont sample:: -+* Flow & Dens sample:: -+* Several light sample:: -+* Mirrored surface sample:: -+* Cont with labels sample:: -+* Ternary plot sample:: -+* Coloring by coordinates sample:: -+* Drops sample:: -+* Molecules drawing sample:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Legend sample, Adding mesh sample, , Additional features -+@subsection Legend sample -+@cindex Plot -+@cindex Legend -+@cindex AddLegend -+ -+@float -+@image{png/legend, 7cm} -+@caption{Example of Legend usage. @tdref{legend}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData f(50,3); -+f.Modify("sin(2*pi*x*x)",0); -+f.Modify("sin(2*pi*x)",1); -+f.Modify("sin(2*pi*sqrt(x))",2); -+gr->Axis(mglPoint(0,-1),mglPoint(1,1)); -+gr->Box(); gr->Plot(f); gr->Axis(); -+gr->AddLegend("sin(\\pi {x^2})","b"); -+gr->AddLegend("sin(\\pi x)","g*"); -+gr->AddLegend("sin(\\pi \\sqrt{\\a x})","r+"); -+gr->Legend(); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new f 50 3 -+modify f 'sin(2*pi*x*x)' -+modify f 'sin(2*pi*x)' 1 -+modify f 'sin(2*pi*sqrt(x))' 2 -+ -+axis 0 -1 1 1 -+box -+plot f -+axis -+addlegend 'sin(\pi {x^2})' 'b' -+addlegend 'sin(\pi x)' 'g*' -+addlegend 'sin(\pi \sqrt{\a x})' 'r+' -+legend -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT f = mgl_create_data_size(50,3,1); -+mgl_data_modify(f,"sin(2*pi*x*x)",0); -+mgl_data_modify(f,"sin(2*pi*x)",1); -+mgl_data_modify(f,"sin(2*pi*sqrt(x))",2); -+mgl_set_axis(gr, 0.,-1.,0., 1.,1.,1., 0.,0.,0.); -+mgl_box(gr,1); -+mgl_plot(gr,f,NULL); -+mgl_axis(gr,"xy"); -+mgl_add_legend(gr,"sin(\\pi {x^2})","b"); -+mgl_add_legend(gr,"sin(\\pi x)","g*"); -+mgl_add_legend(gr,"sin(\\pi \\sqrt{\\a x})","r+"); -+mgl_legend(gr,3,"rL",-1.,0.1); -+mgl_delete_data(f); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer f, mgl_create_data_size -+f = mgl_create_data_size(50,3,1) -+call mgl_data_modify(f,'sin(2*pi*x*x)',0) -+call mgl_data_modify(f,'sin(2*pi*x)',1) -+call mgl_data_modify(f,'sin(2*pi*sqrt(x))',2) -+ -+call mgl_set_axis(gr, 0.,-1.,0., 1.,1.,1., 0.,0.,0.) -+call mgl_box(gr,1) -+call mgl_plot(gr,f,'') -+call mgl_axis(gr,'xy') -+call mgl_add_legend(gr,'sin(\pi {x^2})','b'); -+call mgl_add_legend(gr,'sin(\pi x)','g*'); -+call mgl_add_legend(gr,'sin(\pi \sqrt{\a x})','r+'); -+call mgl_legend(gr,3,'rL',-1.,0.1); -+call mgl_delete_data(f) -+@end verbatim -+@strong{Python} -+@verbatim -+f = mglData(50,3); -+f.Modify("sin(2*pi*x*x)",0); f.Modify("sin(2*pi*x)",1); f.Modify("sin(2*pi*sqrt(x))",2); -+gr.SetRanges(0,1,-1,1); gr.Box(); gr.Axis(); gr.Plot(f); -+gr.AddLegend("sin(\\pi x^2)","b"); -+gr.AddLegend("sin(\\pi x)","g*"); -+gr.AddLegend("sin(\\pi\\sqrt{\\a x})","r+"); -+gr.Legend(); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Adding mesh sample, Surf & Cont sample, Legend sample, Additional features -+@subsection Adding mesh sample -+@cindex SubPlot -+@cindex Surf -+@cindex Dens -+@cindex Cont -+@cindex Axial -+ -+@float -+@image{png/samplea, 7cm} -+@caption{Example of adding mesh. @tdref{samplea}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+gr->Light(true); -+gr->Alpha(true); -+ -+gr->SubPlot(2,2,0); gr->Rotate(40,60); -+gr->Surf(a,"BbcyrR#"); gr->Box(); -+gr->SubPlot(2,2,1); gr->Rotate(40,60); -+gr->Dens(a,"BbcyrR#"); gr->Box(); -+gr->SubPlot(2,2,2); gr->Rotate(40,60); -+gr->Cont(a,"BbcyrR#"); gr->Box(); -+gr->SubPlot(2,2,3); gr->Rotate(40,60); -+gr->Axial(a,"BbcyrR#"); gr->Box(); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+alpha on -+light on -+ -+subplot 2 2 0 -+rotate 40 60 -+surf a 'BbcyrR#' -+box -+subplot 2 2 1 -+rotate 40 60 -+dens a 'BbcyrR#' -+box -+subplot 2 2 2 -+rotate 40 60 -+cont a 'BbcyrR#' -+box -+subplot 2 2 3 -+rotate 40 60 -+axial a 'BbcyrR#' -+box -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_set_alpha(gr,1); -+mgl_set_light(gr,1); -+ -+mgl_subplot(gr,2,2,0); mgl_rotate(gr,40.,60.,0.); -+mgl_surf(gr,a,"BbcyrR#"); mgl_box(gr,1); -+mgl_subplot(gr,2,2,1); mgl_rotate(gr,40.,60.,0.); -+mgl_dens(gr,a,"BbcyrR#",-1.); mgl_box(gr,1); -+mgl_subplot(gr,2,2,2); mgl_rotate(gr,40.,60.,0.); -+mgl_cont(gr,a,"BbcyrR#",7,NAN); mgl_box(gr,1); -+mgl_subplot(gr,2,2,3); mgl_rotate(gr,40.,60.,0.); -+mgl_axial(gr,a,"BbcyrR#",3); mgl_box(gr,1); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+real zero, nan -+zero=0; nan=zero/zero -+a = mgl_create_data_size(50,40,1) -+call mgl_data_modify(a,'0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))',0) -+call mgl_set_alpha(gr,1) -+call mgl_set_light(gr,1) -+ -+call mgl_subplot(gr,2,2,0) -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_surf(gr,a,'BbcyrR#') -+call mgl_box(gr,1) -+call mgl_subplot(gr,2,2,1) -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_dens(gr,a,'BbcyrR#',-1.) -+call mgl_box(gr,1) -+call mgl_subplot(gr,2,2,2) -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_cont(gr,a,'BbcyrR#',7,nan) -+call mgl_box(gr,1) -+call mgl_subplot(gr,2,2,3) -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_axial(gr,a,'BbcyrR#',3) -+call mgl_box(gr,1) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Light(True); gr.Alpha(True); -+gr.SubPlot(2,2,0); -+gr.Rotate(40,60); gr.Surf(a,"BbcyrR#"); gr.Box(); -+gr.SubPlot(2,2,1); -+gr.Rotate(40,60); gr.Dens(a,"BbcyrR#"); gr.Box(); -+gr.SubPlot(2,2,2); -+gr.Rotate(40,60); gr.Cont(a,"BbcyrR#"); gr.Box(); -+gr.SubPlot(2,2,3); -+gr.Rotate(40,60); gr.Axial(a,"BbcyrR#"); gr.Box(); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Surf & Cont sample, Flow & Dens sample, Adding mesh sample, Additional features -+@subsection Surf & Cont sample -+@cindex Surf -+@cindex Cont -+ -+@float -+@image{png/surf_cont_y, 7cm} -+@caption{Example of Surf & Cont. @tdref{surf_cont_y}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Surf(a); -+gr->Cont(a,"y"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+box -+surf a -+cont a 'y' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_surf(gr,a,0); -+mgl_cont(gr,a,"y",7,NAN); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+real zero, nan -+zero = 0; nan = zero/zero -+a = mgl_create_data_size(50,40,1) -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0) -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_surf(gr,a,'') -+call mgl_cont(gr,a,'y',7,nan) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); -+gr.Box(); -+gr.Surf(a); gr.Cont(a,"y"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Flow & Dens sample, Several light sample, Surf & Cont sample, Additional features -+@subsection Flow & Dens sample -+@cindex Flow -+@cindex Dens -+ -+@float -+@image{png/flow_dens, 7cm} -+@caption{Example of Flow & Dens. @tdref{flow_dens}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40), b(50,40), d(a); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+d.Modify("sqrt(v^2+w^2)",a,b); -+gr->Box(); -+gr->Flow(a,b,"br"); gr->Dens(d,"BbcyrR"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+new b 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+modify b '0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+copy d a -+modify d 'sqrt(v^2+w^2)' a b -+box -+flow a b 'br' -+dens d 'BbcyrR' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a, b, d; -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+d = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_data_modify(d,"sqrt(v^2+w^2)",a,b); -+ -+mgl_box(gr,1); -+mgl_flow_2d(gr,a,b,"br",5,1,0.); -+mgl_dens(gr,d,"BbcyrR",-1.); -+mgl_delete_data(a); mgl_delete_data(b); mgl_delete_data(d); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b,d, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+b = mgl_create_data_size(50,40,1); -+d = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(b,"0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+call mgl_data_modify(d,"sqrt(v^2+w^2)",a,b); -+ -+call mgl_box(gr,1) -+call mgl_flow_2d(gr,a,b,'br',5,1,0.) -+call mgl_dens(gr,d,'BbcyrR',-1.); -+call mgl_delete_data(a) -+call mgl_delete_data(b) -+call mgl_delete_data(d) -+@end verbatim -+@strong{Python} -+@verbatim -+a, b= mglData(50,40), mglData(50,40); d = mglData(a) -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+d.Modify("sqrt(v^2+w^2)",a,b); -+gr.Box(); -+gr.Flow(a,b,"br"); gr.Dens(d,"BbcyrR"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Several light sample, Mirrored surface sample, Flow & Dens sample, Additional features -+@subsection Several light sample -+@cindex Surf -+@cindex Light -+ -+@float -+@image{png/several_light, 7cm} -+@caption{Example of Surf with several light. @tdref{several_light}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Light(1,mglPoint(0,1,0),'c'); -+gr->Light(2,mglPoint(1,0,0),'y'); -+gr->Light(3,mglPoint(0,-1,0),'m'); -+gr->Box(); -+gr->Surf(a,"h"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+ -+rotate 40 60 -+light on -+light 1 0 1 0 'c' -+light 2 1 0 0 'y' -+light 3 0 -1 0 'm' -+ -+box -+surf a 'h' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_add_light_rgb(gr,1,0.,1.,0.,1, 0.,1.,1.,0.5); -+mgl_add_light_rgb(gr,2,1.,0.,0.,1, 1.,1.,0.,0.5); -+mgl_add_light_rgb(gr,3,0.,-1.,0.,1, 1.,0.,1.,0.5); -+ -+mgl_box(gr,1); -+mgl_surf(gr,a,"h"); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_add_light_rgb(gr,1,0.,1.,0.,1, 0.,1.,1.,0.5) -+call mgl_add_light_rgb(gr,2,1.,0.,0.,1, 1.,1.,0.,0.5) -+call mgl_add_light_rgb(gr,3,0.,-1.,0.,1, 1.,0.,1.,0.5) -+ -+call mgl_box(gr,1) -+call mgl_surf(gr,a,'h') -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Rotate(40,60); gr.Light(True); -+gr.AddLight(1,0,1,0,"c"); -+gr.AddLight(2,1,0,0,"y"); -+gr.AddLight(3,0,-1,0,"m"); -+gr.Box(); -+gr.Surf(a,"h") -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Mirrored surface sample, Cont with labels sample, Several light sample, Additional features -+@subsection Mirrored surface sample -+@cindex Surf -+ -+@float -+@image{png/mirror, 7cm} -+@caption{Example of mirrored surface. @tdref{mirror}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(30,40),x(30),y1(40),y2(40); -+a.Modify("pi*(1-2*x)*exp(-4*y^2-4*(2*x-1)^2)"); -+x.Fill(-1,1); y1.Fill(0,1); y2.Fill(0,-1); -+ -+gr->Rotate(40,60); -+gr->Light(true); -+gr->Box(); -+gr->Surf(x,y1,a,"r"); gr->Surf(x,y2,a,"b"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 30 40 -+modify a 'pi*(1-2*x)*exp(-4*y^2-4*(2*x-1)^2)' -+ -+rotate 40 60 -+light on -+surf a 'r'; yrange 0 1 -+surf a 'b'; yrange 0 -1 -+box -+@end verbatim -+or -+@verbatim -+new a 30 40 -+var x 30 -1 1 -+var y1 40 0 1 -+var y2 40 0 -1 -+modify a 'pi*(1-2*x)*exp(-4*y^2-4*(2*x-1)^2)' -+ -+rotate 40 60 -+light on -+surf x y1 a 'r' -+surf x y2 a 'b' -+box -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a,x,y1,y2; -+a = mgl_create_data_size(30,40,1); -+x = mgl_create_data_size(30,1,1); -+y1 = mgl_create_data_size(40,1,1); -+y2 = mgl_create_data_size(40,1,1); -+mgl_data_modify(a,"pi*(1-2*x)*exp(-4*y^2-4*(2*x-1)^2)",0); -+mgl_data_fill(x,-1.,1.,'x'); -+mgl_data_fill(y1,0.,1.,'x'); -+mgl_data_fill(y2,0.,-1.,'x'); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_box(gr,1); -+mgl_surf_xy(gr,x,y1,a,"r"); mgl_surf_xy(gr,x,y2,a,"b"); -+mgl_delete_data(a); mgl_delete_data(y1); -+mgl_delete_data(x); mgl_delete_data(y2); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,x,y1,y2, mgl_create_data_size -+a = mgl_create_data_size(30,40,1) -+x = mgl_create_data_size(30,1,1) -+y1 = mgl_create_data_size(40,1,1) -+y2 = mgl_create_data_size(40,1,1) -+call mgl_data_modify(a,'pi*(1-2*x)*exp(-4*y^2-4*(2*x-1)^2)',0) -+call mgl_data_fill(x,-1.,1.,'x') -+call mgl_data_fill(y1,0.,1.,'x') -+call mgl_data_fill(y2,0.,-1.,'x') -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_box(gr,1) -+call mgl_surf_xy(gr,x,y1,a,'r') -+call mgl_surf_xy(gr,x,y2,a,'b') -+call mgl_delete_data(a) -+call mgl_delete_data(y1) -+call mgl_delete_data(x) -+call mgl_delete_data(y2) -+@end verbatim -+@strong{Python} -+@verbatim -+a, x, y1, y2 = mglData(30,40), mglData(30), mglData(40), mglData(40); -+a.Modify("pi*(1-2*x)*exp(-4*y^2-4*(2*x-1)^2)"); -+x.Fill(-1,1); y1.Fill(0,1); y2.Fill(0,-1); -+gr.Rotate(40,60); gr.Light(True); gr.Box(); -+gr.Surf(x,y1,a,"r"); gr.Surf(x,y2,a,"b"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Cont with labels sample, Ternary plot sample, Mirrored surface sample, Additional features -+@subsection Cont with labels sample -+@cindex Cont -+ -+@float -+@image{png/contt, 7cm} -+@caption{Example of Cont with labels. @tdref{contt}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+gr->Box(); -+gr->Cont(a,"BbcyrRt"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 50 40 -+modify a '0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))' -+box -+cont a 'BbcyrRt' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(50,40,1); -+mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+mgl_box(gr,1); -+mgl_cont(gr,a,"BbcyrRt",7,0); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(50,40,1); -+call mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+call mgl_box(gr,1) -+call mgl_cont(gr,a,'BbcyrRt',7,0) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(50,40); -+a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+gr.Box(); -+gr.Cont(a,"BbcyrRt"); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Ternary plot sample, Coloring by coordinates sample, Cont with labels sample, Additional features -+@subsection Ternary plot sample -+@cindex Ternary -+ -+@float -+@image{png/ternary, 7cm} -+@caption{Example of Ternary plot. @tdref{ternary}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData x(50),y(50),rx(10),ry(10), a(20,30); -+a.Modify("4*x*y"); -+x.Modify("0.25*(1+cos(2*pi*x))"); -+y.Modify("0.25*(1+sin(2*pi*x))"); -+rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx); -+ -+gr->Text(mglPoint(-0.8,1.3), "Ternary plot (x+y+t=1)"); -+gr->Ternary(true); -+gr->Plot(x,y,"r2"); -+gr->Plot(rx,ry,"q^ "); -+gr->Cont(a); -+gr->Line(mglPoint(0.5,0), mglPoint(0,0.75), "g2"); -+gr->Axis(); gr->Grid("xyz","B;"); -+gr->Label('x',"x comp."); -+gr->Label('y',"y comp."); -+gr->Label('t',"t comp."); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new rx 10 -+new ry 10 -+new x 50 -+new y 50 -+new a 20 30 -+modify a '4*x*y' -+modify x '0.25*(1+cos(2*pi*x))' -+modify y '0.25*(1+sin(2*pi*x))' -+modify rx 'rnd' -+modify ry 'rnd*(1-v)' rx -+text -0.8 1.3 'Ternary plot (x+y+t=1)' -+ternary on -+plot x y 'r2' -+plot rx ry 'q^ ' -+cont a -+line 0.5 0 0 0.75 'g2' -+axis -+grid 'xyz' 'B;' -+xlabel 'x comp.' -+ylabel 'y comp.' -+tlabel 't comp.' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT x,y,rx,ry,a; -+x = mgl_create_data_size(50,1,1); -+y = mgl_create_data_size(50,1,1); -+rx = mgl_create_data_size(50,1,1); -+ry = mgl_create_data_size(50,1,1); -+a = mgl_create_data_size(20,30,1); -+mgl_data_modify(x,"0.25*(1+cos(2*pi*x))",0); -+mgl_data_modify(y,"0.25*(1+sin(2*pi*x))",0); -+mgl_data_modify(rx,"rnd",0); -+mgl_data_modify_vw(ry,"(1-v)*rnd",rx,0); -+mgl_data_modify(a,"4*x*y",0); -+ -+mgl_puts_ext(gr,-0.8,1.3,0.,"Ternary plot (x+y+t=1)","C",-1.4,'t'); -+mgl_set_ternary(gr,1); -+mgl_plot_xy(gr,x,y,"r2"); -+mgl_plot_xy(gr,rx,ry,"q^ "); -+mgl_cont(gr,a,"",7,0.); -+ -+mgl_line(gr,0.5,0.,0.,0.,0.75,0.,"g2",2); -+mgl_axis(gr,"xyz"); -+mgl_axis_grid(gr,"xyz","B:"); -+mgl_label(gr,'x',"x comp"); -+mgl_label(gr,'y',"y comp"); -+mgl_label(gr,'t',"t comp"); -+mgl_delete_data(a); -+mgl_delete_data(x); mgl_delete_data(y); -+mgl_delete_data(rx); mgl_delete_data(ry); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,x,y,rx,ry, mgl_create_data_size -+x = mgl_create_data_size(50,1,1) -+y = mgl_create_data_size(50,1,1) -+rx = mgl_create_data_size(50,1,1) -+ry = mgl_create_data_size(50,1,1) -+a = mgl_create_data_size(20,30,1) -+call mgl_data_modify(x,'0.25*(1+cos(2*pi*x))',0) -+call mgl_data_modify(y,'0.25*(1+sin(2*pi*x))',0) -+call mgl_data_modify(rx,'rnd',0) -+call mgl_data_modify_vw(ry,'(1-v)*rnd',rx,rx) -+call mgl_data_modify(a,'4*x*y',0) -+ -+call mgl_puts_ext(gr,-0.8,1.3,0.,'Ternary plot (x+y+t=1)','C',-1.4,'t') -+call mgl_set_ternary(gr,1) -+call mgl_plot_xy(gr,x,y,'r2') -+call mgl_plot_xy(gr,rx,ry,'q^ ') -+call mgl_cont(gr,a,'',7,0.) -+ -+call mgl_line(gr,0.5,0.,0.,0.,0.75,0.,'g2',2) -+call mgl_axis(gr,'xyz') -+call mgl_axis_grid(gr,'xyz','B:') -+call mgl_label(gr,'x','x comp') -+call mgl_label(gr,'y','y comp') -+call mgl_label(gr,'t','t comp') -+call mgl_delete_data(a) -+call mgl_delete_data(x) -+call mgl_delete_data(y) -+call mgl_delete_data(rx) -+call mgl_delete_data(ry) -+@end verbatim -+@strong{Python} -+@verbatim -+x, y, rx, ry, a = mglData(50), mglData(50), mglData(10), mglData(10), mglData(20,30); -+a.Modify("4*x*y"); -+x.Modify("0.25*(1+cos(2*pi*x))"); y.Modify("0.25*(1+sin(2*pi*x))"); -+rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx); -+gr.Puts(-0.8,1.3,0,"Ternary plot (x+y+t=1)","C",-1.4); -+gr.Ternary(True); -+gr.Plot(x,y,"r2"); gr.Plot(rx,ry,"q^ "); gr.Cont(a); -+gr.Line(0.5,0,0,0,0.75,0,"g2"); -+gr.Axis(); gr.Grid("xyz","B;"); -+gr.Label("x","x comp."); -+gr.Label("y","y comp."); -+gr.Label("t","t comp."); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Coloring by coordinates sample, Drops sample, Ternary plot sample, Additional features -+@subsection Coloring by coordinates sample -+@cindex Surf3 -+ -+@float -+@image{png/surf3_rgbd, 7cm} -+@caption{Example of Surf3 colored by coordinates. @tdref{surf3_rgbd}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(60,50,40); -+a.Modify("-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)"); -+ -+gr->Rotate(40,60); -+gr->Box(); -+gr->Surf3(a,"bgrd"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 60 50 40 -+modify a '-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)' -+ -+rotate 40 60 -+box -+surf3 a 'bgrd' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(60,50,40); -+mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+mgl_rotate(gr,40.,60.,0.); -+mgl_box(gr,1); -+mgl_surf3(gr,a,"bgrd",3); -+mgl_delete_data(a); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(60,50,40); -+call mgl_data_modify(a,"-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1)",0); -+ -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_box(gr,1) -+call mgl_surf3(gr,a,'bgrd',3) -+call mgl_delete_data(a) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(60,50,40); -+a.Modify("-2*((2*x-1)^2+(2*y-1)^2+(2*z-1)^4-(2*z-1)^2-0.1)"); -+gr.Rotate(40,60); gr.Box(); -+gr.Surf3(a,"bgrd"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Drops sample, Molecules drawing sample, Coloring by coordinates sample, Additional features -+@subsection Drops sample -+@cindex Drop -+ -+@float -+@image{png/drops, 7cm} -+@caption{Example of Drop(s). @tdref{drops}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+gr->Light(true); -+gr->Puts(mglPoint(-1,1.2),"sh=0"); -+gr->Drop(mglPoint(-1,0),mglPoint(0,1),0.5,"r",0); -+gr->Puts(mglPoint(-0.33,1.2),"sh=0.33"); -+gr->Drop(mglPoint(-0.33,0),mglPoint(0,1),0.5,"r",0.33); -+gr->Puts(mglPoint(0.33,1.2),"sh=0.67"); -+gr->Drop(mglPoint(0.33,0),mglPoint(0,1),0.5,"r",0.67); -+gr->Puts(mglPoint(1,1.2),"sh=1"); -+gr->Drop(mglPoint(1,0),mglPoint(0,1),0.5,"r",1); -+gr->Ball(mglPoint(-1,0,1),'k'); -+gr->Ball(mglPoint(-0.33,0,1),'k'); -+gr->Ball(mglPoint(0.33,0,1),'k'); -+gr->Ball(mglPoint(1,0,1),'k'); -+gr->Line(mglPoint(-1,0,1),mglPoint(1,0,1),"b"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+light on -+text -1 1.2 'sh=0' -+drop -1 0 0 1 0.5 'r' 0 -+text -0.33 1.2 'sh=0.33' -+drop -0.33 0 0 1 0.5 'r' 0.33 -+text 0.33 1.2 'sh=0.67' -+drop 0.33 0 0 1 0.5 'r' 0.67 -+text 1 1.2 'sh=1' -+drop 1 0 0 1 0.5 'r' 1 -+ball -1 0 1 'k' -+ball -0.33 0 1 'k' -+ball 0.33 0 1 'k' -+ball 1 0 1 'k' -+line -1 0 1 1 0 1 'b' -+ -+new h 100 -+modify h '0.25*(1+x)^2' -+plot h 'k|' -+text -1 0.6 'h\sim(1+sh)^2' 'rL' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+mgl_set_light(gr,1); -+mgl_puts(gr,-1.,1.2,0.,"sh=0"); -+mgl_drop(gr,-1.,0.,0.,0.,1.,0.,0.5,"r",0.,1.); -+mgl_puts(gr,-0.33,1.2,0.,"sh=0.33"); -+mgl_drop(gr,-0.33,0.,0.,0.,1.,0.,0.5,"r",0.33,1.); -+mgl_puts(gr,0.33,1.2,0.,"sh=0.67"); -+mgl_drop(gr,0.33,0.,0.,0.,1.,0.,0.5,"r",0.67,1.); -+mgl_puts(gr,1.,1.2,0.,"sh=1"); -+mgl_drop(gr,1.,0.,0.,0.,1.,0.,0.5,"r",1.,1.); -+mgl_ball_str(gr,-1.,0.,1.,"k"); -+mgl_ball_str(gr,-0.33,0.,1.,"k"); -+mgl_ball_str(gr,0.33,0.,1.,"k"); -+mgl_ball_str(gr,1.,0.,1.,"k"); -+mgl_line(gr,-1.,0.,1.,1.,0.,1.,"b",2); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+call mgl_set_light(gr,1); -+call mgl_puts(gr,-1.,1.2,0.,"sh=0"); -+call mgl_drop(gr,-1.,0.,0.,0.,1.,0.,0.5,"r",0.,1.); -+call mgl_puts(gr,-0.33,1.2,0.,"sh=0.33"); -+call mgl_drop(gr,-0.33,0.,0.,0.,1.,0.,0.5,"r",0.33,1.); -+call mgl_puts(gr,0.33,1.2,0.,"sh=0.67"); -+call mgl_drop(gr,0.33,0.,0.,0.,1.,0.,0.5,"r",0.67,1.); -+call mgl_puts(gr,1.,1.2,0.,"sh=1"); -+call mgl_drop(gr,1.,0.,0.,0.,1.,0.,0.5,"r",1.,1.); -+call mgl_ball_str(gr,-1.,0.,1.,"k"); -+call mgl_ball_str(gr,-0.33,0.,1.,"k"); -+call mgl_ball_str(gr,0.33,0.,1.,"k"); -+call mgl_ball_str(gr,1.,0.,1.,"k"); -+call mgl_line(gr,-1.,0.,1.,1.,0.,1.,"b",2); -+@end verbatim -+@strong{Python} -+@verbatim -+gr.Light(True); -+gr.Puts(-1,1.2,0,"sh=0","rC"); -+gr.Drop(-1,0,0,0,1,0,0.5,"r",0); -+gr.Puts(-0.33,1.2,0,"sh=0.33","rC"); -+gr.Drop(-0.33,0,0,0,1,0,0.5,"r",0.33); -+gr.Puts(0.33,1.2,0,"sh=0.67","rC"); -+gr.Drop(0.33,0,0,0,1,0,0.5,"r",0.67); -+gr.Puts(1,1.2,0,"sh=1","rC"); -+gr.Drop(1,0,0,0,1,0,0.5,"r",1); -+gr.Ball(-1,0,1,"k"); gr.Ball(-0.33,0,1,"k"); -+gr.Ball(0.33,0,1,"k"); gr.Ball(1,0,1,"k"); -+gr.Line(-1,0,1,1,0,1,"b"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Molecules drawing sample, , Drops sample, Additional features -+@subsection Molecules drawing sample -+@cindex Drop -+@cindex Sphere -+ -+@float -+@image{png/molecule, 7cm} -+@caption{Example of molecules drawing. @tdref{molecule}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+gr->Alpha(true); gr->Light(true); -+ -+gr->SubPlot(2,2,0); -+gr->Text(mglPoint(0,1.2),"Methane, CH_4",0,-3); gr->Rotate(60,120); -+gr->Sphere(mglPoint(0,0,0),0.25,"k"); -+gr->Drop(mglPoint(0,0,0),mglPoint(0,0,1),0.35,"h",1,2); -+gr->Sphere(mglPoint(0,0,0.7),0.25,"g"); -+gr->Drop(mglPoint(0,0,0),mglPoint(-0.94,0,-0.33),0.35,"h",1,2); -+gr->Sphere(mglPoint(-0.66,0,-0.23),0.25,"g"); -+gr->Drop(mglPoint(0,0,0),mglPoint(0.47,0.82,-0.33),0.35,"h",1,2); -+gr->Sphere(mglPoint(0.33,0.57,-0.23),0.25,"g"); -+gr->Drop(mglPoint(0,0,0),mglPoint(0.47,-0.82,-0.33),0.35,"h",1,2); -+gr->Sphere(mglPoint(0.33,-0.57,-0.23),0.25,"g"); -+ -+gr->SubPlot(2,2,1); -+gr->Text(mglPoint(0,1.2),"Water, H{_2}O",0,-3); gr->Rotate(60,100); -+gr->Sphere(mglPoint(0,0,0),0.25,"r"); -+gr->Drop(mglPoint(0,0,0),mglPoint(0.3,0.5,0),0.3,"m",1,2); -+gr->Sphere(mglPoint(0.3,0.5,0),0.25,"g"); -+gr->Drop(mglPoint(0,0,0),mglPoint(0.3,-0.5,0),0.3,"m",1,2); -+gr->Sphere(mglPoint(0.3,-0.5,0),0.25,"g"); -+ -+gr->SubPlot(2,2,2); -+gr->Text(mglPoint(0,1.2),"Oxygen, O_2",0,-3); gr->Rotate(60,120); -+gr->Drop(mglPoint(0,0.5,0),mglPoint(0,-0.3,0),0.3,"m",1,2); -+gr->Sphere(mglPoint(0,0.5,0),0.25,"r"); -+gr->Drop(mglPoint(0,-0.5,0),mglPoint(0,0.3,0),0.3,"m",1,2); -+gr->Sphere(mglPoint(0,-0.5,0),0.25,"r"); -+ -+gr->SubPlot(2,2,3); -+gr->Text(mglPoint(0,1.2),"Ammonia, NH_3",0,-3); gr->Rotate(60,120); -+gr->Sphere(mglPoint(0,0,0),0.25,"b"); -+gr->Drop(mglPoint(0,0,0),mglPoint(0.33,0.57,0),0.32,"n",1,2); -+gr->Sphere(mglPoint(0.33,0.57,0),0.25,"g"); -+gr->Drop(mglPoint(0,0,0),mglPoint(0.33,-0.57,0),0.32,"n",1,2); -+gr->Sphere(mglPoint(0.33,-0.57,0),0.25,"g"); -+gr->Drop(mglPoint(0,0,0),mglPoint(-0.65,0,0),0.32,"n",1,2); -+gr->Sphere(mglPoint(-0.65,0,0),0.25,"g"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+alpha on -+light on -+ -+subplot 2 2 0 -+text 0 1.2 'Methane, CH_4' '' -3 -+rotate 60 120 -+sphere 0 0 0 0.25 'k' -+drop 0 0 0 0 0 1 0.35 'h' 1 2 -+sphere 0 0 0.7 0.25 'g' -+drop 0 0 0 -0.94 0 -0.33 0.35 'h' 1 2 -+sphere -0.66 0 -0.23 0.25 'g' -+drop 0 0 0 0.47 0.82 -0.33 0.35 'h' 1 2 -+sphere 0.33 0.57 -0.23 0.25 'g' -+drop 0 0 0 0.47 -0.82 -0.33 0.35 'h' 1 2 -+sphere 0.33 -0.57 -0.23 0.25 'g' -+ -+subplot 2 2 1 -+text 0 1.2 'Water, H{_2}O' '' -3 -+rotate 60 100 -+sphere 0 0 0 0.25 'r' -+drop 0 0 0 0.3 0.5 0 0.3 'm' 1 2 -+sphere 0.3 0.5 0 0.25 'g' -+drop 0 0 0 0.3 -0.5 0 0.3 'm' 1 2 -+sphere 0.3 -0.5 0 0.25 'g' -+ -+subplot 2 2 2 -+text 0 1.2 'Oxygen, O_2' '' -3 -+rotate 60 120 -+drop 0 0.5 0 0 -0.3 0 0.3 'm' 1 2 -+sphere 0 0.5 0 0.25 'r' -+drop 0 -0.5 0 0 0.3 0 0.3 'm' 1 2 -+sphere 0 -0.5 0 0.25 'r' -+ -+subplot 2 2 3 -+text 0 1.2 0 'Ammonia, NH_3' '' -3 -+rotate 60 120 -+sphere 0 0 0 0.25 'b' -+drop 0 0 0 0.33 0.57 0 0.32 'n' 1 2 -+sphere 0.33 0.57 0 0.25 'g' -+drop 0 0 0 0.33 -0.57 0 0.32 'n' 1 2 -+sphere 0.33 -0.57 0 0.25 'g' -+drop 0 0 0 -0.65 0 0 0.32 'n' 1 2 -+sphere -0.65 0 0 0.25 'g' -+@end verbatim -+@c @strong{Pure C code} -+@c @verbatim -+@c TO BE DONE -+@c @end verbatim -+@c @strong{Fortran code} -+@c @verbatim -+@c TO BE DONE -+@c @end verbatim -+@c @strong{Python} -+@c @verbatim -+@c TO BE DONE -+@c @end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Advanced features, , Additional features, Samples -+@section Advanced features -+ -+@c ------------------------------------------------------------------ -+@menu -+* Curvelinear coorinates sample:: -+* 2-axes sample:: -+* Semi-log sample:: -+* Log-log sample:: -+* Fitting sample:: -+* Envelop sample:: -+* Sew sample:: -+* STFA sample:: -+* PDE sample:: -+* Beam tracing sample:: -+* Parser sample:: -+* Manual ticks sample:: -+* ColumnPlot sample:: -+@end menu -+ -+@node Curvelinear coorinates sample, 2-axes sample, , Advanced features -+@subsection Curvelinear coorinates sample -+@cindex Axis -+ -+@float -+@image{png/sample3, 7cm} -+@caption{Example of curvelinear coorinates usage. @tdref{sample3}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+gr->Org = mglPoint(-1,1,-1); -+ -+gr->SubPlot(2,2,0); gr->Rotate(60,40); -+gr->Line(mglPoint(-1,0.5,0),mglPoint(1,0.5,0),"r2",100); -+gr->Axis(); gr->Grid(); -+gr->Text(mglPoint(0,1.3,1),"Cartesian"); -+ -+gr->SubPlot(2,2,1); gr->Rotate(60,40); -+gr->Axis("y*sin(pi*x)","y*cos(pi*x)",0); -+gr->Line(mglPoint(-1,0.5,0),mglPoint(1,0.5,0),"r2",100); -+gr->Axis(); gr->Grid(); -+gr->Text(mglPoint(0,1.3,1),"Cylindrical"); -+ -+gr->SubPlot(2,2,2); gr->Rotate(60,40); -+gr->Axis("2*y*x","y*y - x*x",0); -+gr->Line(mglPoint(-1,0.5,0),mglPoint(1,0.5,0),"r2",100); -+gr->Axis(); gr->Grid(); -+gr->Text(mglPoint(0,1.3,1),"Parabolic"); -+ -+gr->SubPlot(2,2,3); gr->Rotate(60,40); -+gr->Axis("y*sin(pi*x)","y*cos(pi*x)","x+z"); -+gr->Line(mglPoint(-1,0.5,0),mglPoint(1,0.5,0),"r2",100); -+gr->Axis(); gr->Grid(); -+gr->Text(mglPoint(0,1.3,1),"Spiral"); -+gr->Axis(0,0,0); // set to default Cartesian -+@end verbatim -+@strong{MGL code} -+@verbatim -+origin -1 1 -1 -+ -+subplot 2 2 0 -+rotate 60 40 -+line -1 0.5 0 1 0.5 0 'r2' -+axis -+grid -+text 0 1.3 1 'Cartesian' -+ -+subplot 2 2 1 -+rotate 60 40 -+axis 'y*sin(pi*x)' 'y*cos(pi*x)' '' -+line -1 0.5 0 1 0.5 0 'r2' -+axis -+grid -+text 0 1.3 1 'Cylindrical' -+ -+subplot 2 2 2 -+rotate 60 40 -+axis '2*y*x' 'y*y - x*x' '' -+line -1 0.5 0 1 0.5 0 'r2' -+axis -+grid -+text 0 1.3 1 'Parabolic' -+ -+subplot 2 2 3 -+rotate 60 40 -+axis 'y*sin(pi*x)' 'y*cos(pi*x)' 'x+z' -+line -1 0.5 0 1 0.5 0 'r2' -+axis -+grid -+text 0 1.3 1 'Spiral' -+axis '' '' '' # set to default Cartesian -+@end verbatim -+@strong{Pure C code} -+@verbatim -+mgl_set_origin(gr,-1,1,-1); -+mgl_subplot(gr,2,2,0); mgl_rotate(gr,60,40,0); -+mgl_line(gr,-1,0.5,0,1,0.5,0,"r2",100); -+mgl_axis(gr,"xyz"); mgl_axis_grid(gr,"xyz","B"); -+mgl_text(gr,0,1.3,1,"Cartesian"); -+ -+mgl_subplot(gr,2,2,1); mgl_rotate(gr,60,40,0); -+mgl_set_func(gr,"y*sin(pi*x)","y*cos(pi*x)",0); -+mgl_line(gr,-1,0.5,0,1,0.5,0,"r2",100); -+mgl_axis(gr,"xyz"); mgl_axis_grid(gr,"xyz","B"); -+mgl_text(gr,0,1.3,1,"Cylindrical"); -+ -+mgl_subplot(gr,2,2,2); mgl_rotate(gr,60,40,0); -+mgl_set_func(gr,"2*y*x","y*y - x*x",""); -+mgl_line(gr,-1,0.5,0,1,0.5,0,"r2",100); -+mgl_axis(gr,"xyz"); mgl_axis_grid(gr,"xyz","B"); -+mgl_text(gr,0,1.3,1,"Parabolic"); -+ -+mgl_subplot(gr,2,2,3); mgl_rotate(gr,60,40,0); -+mgl_set_func(gr,"y*sin(pi*x)","y*cos(pi*x)","x+z"); -+mgl_line(gr,-1,0.5,0,1,0.5,0,"r2",100); -+mgl_axis(gr,"xyz"); mgl_axis_grid(gr,"xyz","B"); -+mgl_text(gr,0,1.3,1,"Spiral"); -+mgl_set_func(gr,0,0,0); /* set to default Cartesian */ -+@end verbatim -+@strong{Fortran code} -+@verbatim -+call mgl_set_origin(gr,-1.,1.,-1.) -+ -+call mgl_subplot(gr,2,2,0) -+call mgl_rotate(gr,60.,40.,0.) -+call mgl_line(gr,-1.,0.5,0.,1.,0.5,0.,'r2',100) -+call mgl_axis(gr,'xyz') -+call mgl_axis_grid(gr,'xyz','B') -+call mgl_text(gr,0.,1.3,1.,'Cartesian') -+ -+call mgl_subplot(gr,2,2,1) -+call mgl_rotate(gr,60.,40.,0.) -+call mgl_set_func(gr,'y*sin(pi*x)','y*cos(pi*x)','') -+call mgl_line(gr,-1.,0.5,0.,1.,0.5,0.,'r2',100) -+call mgl_axis(gr,'xyz') -+call mgl_axis_grid(gr,'xyz','B') -+call mgl_text(gr,0.,1.3,1.,'Cylindrical') -+ -+call mgl_subplot(gr,2,2,2) -+call mgl_rotate(gr,60.,40.,0.) -+call mgl_set_func(gr,'2*y*x','y*y - x*x','') -+call mgl_line(gr,-1.,0.5,0.,1.,0.5,0.,'r2',100) -+call mgl_axis(gr,'xyz') -+call mgl_axis_grid(gr,'xyz','B') -+call mgl_text(gr,0.,1.3,1.,"Parabolic") -+ -+call mgl_subplot(gr,2,2,3) -+call mgl_rotate(gr,60.,40.,0.) -+call mgl_set_func(gr,'y*sin(pi*x)','y*cos(pi*x)','x+z') -+call mgl_line(gr,-1.,0.5,0.,1.,0.5,0.,'r2',100) -+call mgl_axis(gr,'xyz') -+call mgl_axis_grid(gr,'xyz','B') -+call mgl_text(gr,0.,1.3,1.,'Spiral') -+call mgl_set_func(gr,'','','') ! set to default Cartesian -+@end verbatim -+@strong{Python} -+@verbatim -+gr.SetOrigin(-1,1,-1); -+ -+gr.SubPlot(2,2,0); gr.Rotate(60,40); -+gr.Line(-1,0.5,0,1,0.5,0,"r2",100); -+gr.Axis(); gr.Grid(); -+gr.Puts(0,1.3,1,"Gartesian","rC",-1.5); -+ -+gr.SubPlot(2,2,1); gr.Rotate(60,40); -+gr.SetFunc("y*sin(pi*x)","y*cos(pi*x)",""); -+gr.Line(-1,0.5,0,1,0.5,0,"r2",100); -+gr.Axis(); gr.Grid(); -+gr.Puts(0,1.3,1,"Cylindrical","rC",-1.5); -+ -+gr.SubPlot(2,2,2); gr.Rotate(60,40); -+gr.SetFunc("2*y*x","y*y-x*x",""); -+gr.Line(-1,0.5,0,1,0.5,0,"r2",100); -+gr.Axis(); gr.Grid(); -+gr.Puts(0,1.3,1,"Parabolic","rC",-1.5); -+ -+gr.SubPlot(2,2,3); gr.Rotate(60,40); -+gr.SetFunc("y*sin(pi*x)","y*cos(pi*x)","x+z"); -+gr.Line(-1,0.5,0,1,0.5,0,"r2",100); -+gr.Axis(); gr.Grid(); -+gr.Puts(0,1.3,1,"Spiral","rC",-1.5); -+gr.SetFunc("","",""); # set to default Gartesian -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node 2-axes sample, Semi-log sample, Curvelinear coorinates sample, Advanced features -+@subsection 2-axes sample -+@cindex Axis -+ -+@float -+@image{png/2_axis, 7cm} -+@caption{Example of 2 axes on the plot. @tdref{2_axis}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData y1(50), y2(50); -+y1.Modify("0.3*sin(2*pi*x)"); y2.Modify("0.5+0.3*cos(2*pi*x)"); -+gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,-1,-1)); -+gr->Axis(); gr->Label('y',"axis 1",0); -+gr->Plot(y1,"b"); -+gr->Axis(mglPoint(0,0,0),mglPoint(1,1,1),mglPoint(1,1,1)); -+gr->Axis(); gr->Label('y',"axis 2",0); -+gr->Stem(y2,"r"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new y1 50 -+new y2 50 -+modify y1 '0.3*sin(2*pi*x)' -+modify y2 '0.5+0.3*cos(2*pi*x)' -+axis -1 -1 -1 1 1 1 -+origin -1 -1 -1 -+axis -+ylabel 'axis 1' 0 -+plot y1 'b' -+axis 0 0 0 1 1 1 -+origin 1 1 1 -+axis -+ylabel 'axis 2' 0 -+stem y2 'r' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT y1 = mgl_create_data_size(50,1,1); -+HMDT y2 = mgl_create_data_size(50,1,1); -+mgl_data_modify(y1,"0.3*sin(2*pi*x)",0); -+mgl_data_modify(y2,"0.5+0.3*cos(2*pi*x)",0); -+mgl_set_axis_2d(gr,-1.,1.,-1.,1.); -+mgl_set_origin(gr,-1.,-1.,-1.); -+mgl_axis(gr,"xyz"); -+mgl_label_ext(gr,'y',"axis 1",0,-1.4,0.); -+mgl_plot(gr,y1,"b"); -+ -+mgl_set_axis_2d(gr,0.,0.,1.,1.); -+mgl_set_origin(gr,1.,1.,1.); -+mgl_axis(gr,"xyz"); -+mgl_label_ext(gr,'y',"axis 2",0,-1.4,0.); -+mgl_stem(gr,y2,"r"); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer y1,y2, mgl_create_data_size -+y1 = mgl_create_data_size(50,1,1) -+y2 = mgl_create_data_size(50,1,1) -+call mgl_data_modify(y1,'0.3*sin(2*pi*x)',0) -+call mgl_data_modify(y2,'0.5+0.3*cos(2*pi*x)',0) -+call mgl_set_axis_2d(gr,-1.,1.,-1.,1.) -+call mgl_set_origin(gr,-1.,-1.,-1.) -+call mgl_axis(gr,'xyz') -+call mgl_label_ext(gr,'y','axis 1',0,-1.4,0.) -+call mgl_plot(gr,y1,'b') -+ -+call mgl_set_axis_2d(gr,0.,0.,1.,1.) -+call mgl_set_origin(gr,1.,1.,1.) -+call mgl_axis(gr,'xyz') -+call mgl_label_ext(gr,'y','axis 2',0,-1.4,0.) -+call mgl_stem(gr,y2,'r') -+@end verbatim -+@strong{Python} -+@verbatim -+y1, y2 = mglData(50), mglData(50); -+y1.Modify("0.3*sin(2*pi*x)"); y2.Modify("0.5+0.3*cos(2*pi*x)"); -+gr.SetRanges(-1,1,-1,1); gr.SetOrigin(-1,-1); -+gr.Axis(); gr.Label("y","axis 1",0); -+gr.Plot(y1,"b"); -+ -+gr.SetRanges(0,1,0,1); gr.SetOrigin(1,1); -+gr.Axis(); gr.Label("y","axis 2",0); -+gr.Stem(y2,"r"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Semi-log sample, Log-log sample, 2-axes sample, Advanced features -+@subsection Semi-log sample -+@cindex Axis -+@cindex SetTicks -+@cindex Plot -+ -+@float -+@image{png/semilog, 7cm} -+@caption{Example of semi-log plot. @tdref{semilog}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData x(2000), y(2000); -+x.Modify("0.01/(x+10^(-5))"); y.Modify("sin(1/v)",x); -+ -+gr->Axis(mglPoint(0.01,-1),mglPoint(1000,1),mglPoint(0.01,-1)); -+gr->Axis("lg(x)",0,0); gr->SetTicks('x',0); -+ -+gr->Box(); -+gr->Plot(x,y,"b2"); -+gr->Axis(); gr->Grid("xy","g"); -+gr->Label('x',"x",0); gr->Label('y', "y = sin 1/x",0); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new x 2000 -+new y 2000 -+modify x '0.01/(x+10^(-5))' -+modify y 'sin(1/v)' x -+ -+xrange 0.01 1000 -+origin 0.01 -1 0 -+xtick 0 -+axis 'lg(x)' '' '' -+ -+plot x y 'b2' -+axis -+grid 'xy' 'g' -+xlabel 'x' 0 -+ylabel 'y = sin 1/x' 0 -+box -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT x = mgl_create_data_size(2000,1,1); -+HMDT y = mgl_create_data_size(2000,1,1); -+mgl_data_modify(x,"0.01/(x+10^(-5))",0); -+mgl_data_modify_vw(y,"sin(1/v)",x,0); -+ -+mgl_set_axis(gr,0.01,-1.,0.,1000.,1.,0.,0.01,-1.,0.); -+mgl_set_func(gr,"lg(x)",0,0); -+mgl_set_ticks(gr,0.,-5.,-5.); -+ -+mgl_box(gr,1); -+mgl_plot_xy(gr,x,y,"b2"); -+mgl_axis(gr,"xy"); mgl_axis_grid(gr,"xy","g"); -+mgl_label_ext(gr,'x',"x",0,-1.4,0); -+mgl_label_ext(gr,'y', "y = sin 1/x",0,-1.4,0); -+mgl_delete_data(x); mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer x,y, mgl_create_data_size -+x = mgl_create_data_size(2000,1,1) -+y = mgl_create_data_size(2000,1,1) -+call mgl_data_modify(x,'0.01/(x+10^(-5))',0) -+call mgl_data_modify_vw(y,'sin(1/v)',x,x) -+ -+call mgl_set_axis(gr,0.01,-1.,0.,1000.,1.,0.,0.01,-1.,0.) -+call mgl_set_func(gr,'lg(x)','','') -+call mgl_set_ticks(gr,0.,-5.,-5.) -+ -+call mgl_box(gr,1) -+call mgl_plot_xy(gr,x,y,'b2') -+call mgl_axis(gr,'xy') -+call mgl_axis_grid(gr,'xy','g') -+call mgl_label_ext(gr,'x','x',0.,-1.4,0.) -+call mgl_label_ext(gr,'y', 'y = sin 1/x',0.,-1.4,0.) -+call mgl_delete_data(x) -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+TO BE DONE -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Log-log sample, Fitting sample, Semi-log sample, Advanced features -+@subsection Log-log sample -+@cindex Axis -+@cindex SetTicks -+@cindex Plot -+ -+@float -+@image{png/loglog, 7cm} -+@caption{Example of log-log plot. @tdref{loglog}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData x(100), y(100); -+x.Modify("pow(10,6*x-3)"); y.Modify("sqrt(1+v^2)",x); -+ -+gr->Axis(mglPoint(0.001,0.1),mglPoint(1000,1000),mglPoint(0.001,0.1)); -+gr->Axis("lg(x)","lg(y)",0); -+gr->SetTicks('x',0); gr->SetTicks('y',0); -+ -+gr->Box(); -+gr->Plot(x,y,"b2"); -+gr->Axis(); gr->Grid("xy","g;"); -+gr->Label('x',"x",0); gr->Label('y', "y=\\sqrt{1+x^2}",0); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new x 100 -+new y 100 -+modify x 'pow(10,6*x-3)' -+modify y 'sqrt(1+v^2)' x -+ -+axis 0.001 0.1 1000 1000 -+xtick 0 -+ytick 0 -+axis 'lg(x)' 'lg(y)' '' -+ -+plot x y 'b2' -+axis -+grid 'xy' 'g;' -+xlabel 'x' 0 -+ylabel 'y=\sqrt{1+x^2}' 0 -+box -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT x = mgl_create_data_size(100,1,1); -+HMDT y = mgl_create_data_size(100,1,1); -+mgl_data_modify(x,"pow(10,6*x-3)",0); -+mgl_data_modify_vw(y,"sqrt(1+v^2)",x,0); -+ -+mgl_set_axis(gr,0.001,0.1,0.,1000.,1000.,0.,0.001,0.1,0.); -+mgl_set_func(gr,"lg(x)","lg(y)",0); -+mgl_set_ticks(gr,0.,0.,-5.); -+ -+mgl_box(gr,1); -+mgl_plot_xy(gr,x,y,"b2"); -+mgl_axis(gr,"xy"); mgl_axis_grid(gr,"xy","g;"); -+mgl_label_ext(gr,'x',"x",0,-1.4,0); -+mgl_label_ext(gr,'y', "y=\\sqrt{1+x^2}",0,-1.4,0); -+mgl_delete_data(x); mgl_delete_data(y); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer x,y, mgl_create_data_size -+x = mgl_create_data_size(100,1,1) -+y = mgl_create_data_size(100,1,1) -+call mgl_data_modify(x,'pow(10,6*x-3)',0) -+call mgl_data_modify_vw(y,'sqrt(1+v^2)',x,x) -+ -+call mgl_set_axis(gr,0.001,0.1,0.,1000.,1000.,0.,0.001,0.1,0.) -+call mgl_set_func(gr,'lg(x)','lg(y)','') -+call mgl_set_ticks(gr,0.,0.,-5.) -+ -+call mgl_box(gr,1) -+call mgl_plot_xy(gr,x,y,'b2') -+call mgl_axis(gr,'xy') -+call mgl_axis_grid(gr,'xy','g;') -+call mgl_label_ext(gr,'x','x',0.,-1.4,0) -+call mgl_label_ext(gr,'y', 'y=\sqrt{1+x^2}',0.,-1.4,0) -+call mgl_delete_data(x) -+call mgl_delete_data(y) -+@end verbatim -+@strong{Python} -+@verbatim -+x, y = mglData(100), mglData(100); -+x.Modify("pow(10,6*x-3)"); y.Modify("sqrt(1+v^2)",x); -+gr.SetRanges(0.001,1000,0.1,1000); gr.SetOrigin(0.001,0.1); -+gr.SetFunc("lg(x)","lg(y)",""); -+gr.SetTicks("x",0); gr.SetTicks("y",0); -+gr.Box(); gr.Plot(x,y,"b2"); -+gr.Axis(); gr.Grid("xy","g;"); -+gr.Label("x","x",0); gr.Label("y","y=\\sqrt{1+x^2}",0); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Fitting sample, Envelop sample, Log-log sample, Advanced features -+@subsection Fitting sample -+@cindex Fit -+@cindex PutsFit -+ -+@float -+@image{png/fit, 7cm} -+@caption{Example of nonlinear fitting. @tdref{fit}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData rnd(100), in(100), res; -+rnd.Fill("0.4*rnd+0.1+sin(2*pi*x)", gr->Min, gr->Max); -+in.Fill("0.3+sin(2*pi*x)", gr->Min, gr->Max); -+ -+gr->Axis(mglPoint(-1,-2), mglPoint(1,2)); -+gr->Plot(rnd, ". "); -+gr->Box(); -+ -+float ini[3] = {1,1,3}; -+gr->Fit(res, rnd, "a+b*sin(c*x)", "abc", ini); -+gr->Plot(res, "r"); -+gr->Plot(in, "b"); -+gr->Text(mglPoint(-1, -1.3), "fitted:", "L:r", -1); -+gr->PutsFit(mglPoint(0, -1.8), "y = ", "C:r", -1); -+gr->Text(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "C:b", -1); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new rnd 100 -+fill rnd '0.4*rnd+0.1+sin(2*pi*x)' -+new in 100 -+fill in '0.3+sin(2*pi*x)' -+ -+yrange -2 2 -+plot rnd '. ' -+box -+ -+list ini 1 1 3 -+fit res rnd 'a+b*sin(c*x)' 'abc' ini -+plot res 'r' -+plot in 'b' -+text -1 -1.3 'fitted:' 'L:r' -1 -+putsfit 0 -1.8 'y = ' 'C:r' -+text 0 2.2 'initial: y = 0.3+sin(2\pi x)' 'C:b' -1 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT rnd,in,res; -+float ini[3] = {1,1,3}; -+rnd = mgl_create_data_size(100,1,1); -+in = mgl_create_data_size(100,1,1); -+res = mgl_create_data(); -+mgl_data_modify(rnd,"0.4*rnd+0.1+sin(4*pi*x)",0); -+mgl_data_modify(in,"0.3+sin(4*pi*x)",0); -+mgl_set_axis_2d(gr,-1.,-2.,1.,2.); -+mgl_plot(gr,rnd,". "); -+mgl_box(gr,1); -+ -+mgl_fit_1(gr,res,rnd,"a+b*sin(c*x)","abc",ini); -+mgl_plot(gr,res,"r"); mgl_plot(gr,in,"b"); -+mgl_puts_ext(gr,-1.,-1.3,0.,"fitted:","L:r",-1.,'t'); -+mgl_puts_fit(gr,0.,-1.8,0.,"y = ","C:r",-1.); -+mgl_puts_ext(gr,0.,2.2,0.,"initial: y = 0.3+sin(2\\pi x)","C:b", -1., 't'); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer rnd,in,res, mgl_create_data_size -+real ini(3) -+ini(1)=1; ini(2)=1; ini(3)=3; -+rnd = mgl_create_data_size(100,1,1); -+in = mgl_create_data_size(100,1,1); -+res = mgl_create_data(); -+call mgl_data_modify(rnd,"0.4*rnd+0.1+sin(4*pi*x)",0); -+call mgl_data_modify(in,"0.3+sin(4*pi*x)",0); -+call mgl_set_axis_2d(gr,-1.,-2.,1.,2.); -+call mgl_plot(gr,rnd,". "); -+call mgl_box(gr,1); -+ -+call mgl_fit_1(gr,res,rnd,"a+b*sin(c*x)","abc",ini); -+call mgl_plot(gr,res,"r"); -+call mgl_plot(gr,in,"b"); -+call mgl_puts_ext(gr,-1.,-1.3,0.,"fitted:","L:r",-1.,'t'); -+call mgl_puts_fit(gr,0.,-1.8,0.,"y = ","C:r",-1.); -+call mgl_puts_ext(gr,0.,2.2,0.,"initial: y = 0.3+sin(2\\pi x)","C:b", -1., 't'); -+@end verbatim -+@strong{Python} -+@verbatim -+rnd, In, res, ini = mglData(100), mglData(100), mglData(), mglData(3); -+rnd.Modify("0.4*rnd+0.1+sin(4*pi*x)"); -+In.Modify("0.3+sin(4*pi*x)"); -+gr.SetRanges(-1,1,-2,2); -+gr.Plot(rnd,". "); -+gr.Box(); -+ -+ini[0], ini[1], ini[2] = 1, 1, 3; -+gr.Fit(res,rnd,"a+b*sin(c*x)","abc",ini); -+gr.Plot(res,"r"); gr.Plot(In,"b"); -+gr.Puts(-1,-1.3,0,"fitted:","L:r",-1); -+gr.PutsFit(0,-1.8,0,"y = ","C:r",-1); -+gr.Puts(0,2.2,0,"initial: y = 0.3+sin(2\\pi x)","C:b",-1); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Envelop sample, Sew sample, Fitting sample, Advanced features -+@subsection Envelop sample -+@cindex Envelop -+ -+@float -+@image{png/envelop, 7cm} -+@caption{Example of envelop reconstruction.}@c @tdref{envelop}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(1000); -+a.Fill("exp(-8*x^2)*sin(10*pi*x)", gr->Min, gr->Max); -+gr->Plot(a, "b"); -+a.Envelop('x'); -+gr->Plot(a, "r"); -+gr->Axis(); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 1000 -+fill a 'exp(-8*x^2)*sin(10*pi*x)' -+plot a 'b' -+envelop a -+plot a 'r' -+axis -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(1000,1,1); -+mgl_data_fill_eq(gr,a, "exp(-8*x^2)*sin(10*pi*x)", 0,0); -+mgl_plot(gr,a,"b"); -+mgl_data_envelop(a,'x'); -+mgl_plot(gr,a,"r"); -+mgl_axis(gr,"xyz"); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(1000,1,1) -+call mgl_data_fill_eq(gr,a, 'exp(-8*x^2)*sin(10*pi*x)', 0,0) -+call mgl_plot(gr,a,'b') -+call mgl_data_envelop(a,'x') -+call mgl_plot(gr,a,'r') -+call mgl_axis(gr,'xyz') -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(1000); -+gr.Fill(a, "exp(-8*x^2)*sin(10*pi*x)"); -+gr.Plot(a,"b"); -+a.Envelop("x"); -+gr.Plot(a,"r"); -+gr.Axis(); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Sew sample, STFA sample, Envelop sample, Advanced features -+@subsection Sew sample -+@cindex Sew -+ -+@float -+@image{png/sew, 7cm} -+@caption{Example of phase ``sewing''.}@c @tdref{sew}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(100, 100); -+a.Modify("mod((y^2-(1-x)^2)/2,0.1)"); -+gr->Rotate(40, 60); -+gr->Light(true); -+gr->Alpha(true); -+gr->Surf(a, "b"); -+a.Sew("xy", 0.1); -+gr->Surf(a, "r"); -+gr->Box(); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 100 100 -+modify a 'mod((y^2-(1-x)^2)/2,0.1)' -+rotate 40 60 -+light on -+alpha on -+surf a 'b' -+sew a 'xy' 0.1 -+surf a 'r' -+box -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(100,100,1); -+mgl_data_modify(a, "mod((y^2-(1-x)^2)/2, 0.1)", 0); -+mgl_rotate(gr,40.,60.,0.); -+mgl_set_light(gr,1); -+mgl_set_alpha(gr,1); -+ -+mgl_surf(gr,a,"b"); -+mgl_data_sew(a,"xy",0.1); -+mgl_surf(gr,a,"r"); -+mgl_box(gr,1); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a, mgl_create_data_size -+a = mgl_create_data_size(100,100,1) -+call mgl_data_modify(a, 'mod((y^2-(1-x)^2)/2, 0.1)', 0) -+call mgl_rotate(gr,40.,60.,0.) -+call mgl_set_light(gr,1) -+call mgl_set_alpha(gr,1) -+ -+call mgl_surf(gr,a,'b') -+call mgl_data_sew(a,'xy',0.1) -+call mgl_surf(gr,a,'r') -+call mgl_box(gr,1) -+@end verbatim -+@strong{Python} -+@verbatim -+a = mglData(100, 100); -+a.Modify("mod((y^2-(1-x)^2)/2, 0.1)"); -+gr.Rotate(40, 60); gr.Light(True); gr.Alpha(True); -+gr.Surf(a, "b"); -+a.Sew("xy", 0.1); -+gr.Surf(a, "r"); -+gr.Box(); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node STFA sample, PDE sample, Sew sample, Advanced features -+@subsection STFA sample -+@cindex STFA -+ -+@float -+@image{png/stfa, 7cm} -+@caption{Example of Short Time Fourier Analysis.}@c @tdref{stfa}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a(2000), b(2000); -+a.Fill("cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+ \ -+ cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)", -+ gr->Min, gr->Max); -+gr->SubPlot(1, 2, 0); -+gr->Plot(a); -+gr->Axis(); -+gr->Label('x', "\\i t"); -+ -+gr->SubPlot(1, 2, 1); -+gr->STFA(a, b, 64); -+gr->Axis(); -+gr->Label('x', "\\i t"); -+gr->Label('y', "\\omega", 0); -+@end verbatim -+@strong{MGL code} -+@verbatim -+new a 2000 -+new b 2000 -+fill a 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+ -+ cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)' -+subplot 1 2 0 -+plot a -+axis -+xlabel '\i t' -+subplot 1 2 1 -+stfa a b 64 '' -+axis -+ylabel '\omega' 0 -+xlabel '\i t' -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data_size(2000,1,1); -+HMDT b = mgl_create_data_size(2000,1,1); -+mgl_data_fill_eq(gr, a, "cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+ \ -+ cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)",0,0); -+mgl_subplot(gr,1,2,0); -+mgl_plot(gr,a,""); -+mgl_axis(gr,"xy"); -+mgl_label(gr,'x', "\\i t"); -+ -+mgl_subplot(gr,1,2,1); -+mgl_stfa(gr,a,b,64,"",0.); -+mgl_axis(gr,"xy"); -+mgl_label(gr,'x', "\\i t"); -+mgl_label(gr,'y', "\\omega"); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,b, mgl_create_data_size -+a = mgl_create_data_size(2000,1,1) -+b = mgl_create_data_size(2000,1,1) -+call mgl_data_fill_eq(gr, a, 'cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+ & -+ cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)',0,0) -+call mgl_subplot(gr,1,2,0) -+call mgl_plot(gr,a,'') -+call mgl_axis(gr,'xy') -+call mgl_label(gr,'x', '\i t') -+ -+call mgl_subplot(gr,1,2,1) -+call mgl_stfa(gr,a,b,64,'',0.) -+call mgl_axis(gr,'xy') -+call mgl_label(gr,'x', '\i t') -+call mgl_label(gr,'y', '\omega') -+@end verbatim -+@strong{Python} -+@verbatim -+a, b = mglData(2000), mglData(2000); -+gr.Fill(a,"cos(50*pi*x)*(x<-.5)+cos(100*pi*x)*(x<0)*(x>-.5)+ \ -+ cos(200*pi*x)*(x<.5)*(x>0)+cos(400*pi*x)*(x>.5)"); -+gr.SubPlot(1, 2, 0); -+gr.Plot(a); -+gr.Axis(); -+gr.Label('x', "\\i t"); -+ -+gr.SubPlot(1, 2, 1); -+gr.STFA(a, b, 64); -+gr.Axis(); -+gr.Label('x', "\\i t"); -+gr.Label('y', "\\omega", 0); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node PDE sample, Beam tracing sample, STFA sample, Advanced features -+@subsection PDE sample -+@cindex mglPDE -+@cindex mglRay -+ -+@float -+@image{png/pde, 7cm} -+@caption{Example of Partial Differential Eduation solving.}@c @tdref{pde}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData a,re(128),im(128); -+gr->Axis(); -+gr->Label('x', "\\i x"); -+gr->Label('y', "\\i z"); -+ -+re.Fill("exp(-48*(x+0.7)^2)", gr->Min, gr->Max); -+a = mglPDE("p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, gr->Min, gr->Max, 0.01, 30); -+a.Transpose("yxz"); -+gr->CAxis(0, 1); -+gr->Dens(a,"wyrRk"); -+gr->Plot("-x", "k|"); -+gr->Puts(mglPoint(0, 0.85), "absorption: (x+z)/2 for x+z>0"); -+gr->Title("\\r{Equation:} ik_0\\partial_zu + \\Delta u + x\\cdot u + \ -+i \\frac{x+z}{2}\\cdot u = 0", "iC", -1.5); -+@end verbatim -+@strong{MGL code} -+@verbatim -+axis -+xlabel '\i x' -+ylabel '\i z' -+ -+new re 128 -+new im 128 -+fill re 'exp(-48*(x+0.7)^2)' -+pde a 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)' re im 0.01 30 -+transpose a -+ -+crange 0 1 -+dens a 'wyrRk' -+fplot '-x' 'k|' -+text 0 0.85 'absorption: (x+z)/2 for x+z>0' '' -1 -+title 'Equation: ik_0\partial_zu + \Delta u + x\cdot u + i \frac{x+z}{2}\cdot u = 0' 'iC' -1.5 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+HMDT a = mgl_create_data(); -+HMDT re = mgl_create_data_size(128,1,1); -+HMDT im = mgl_create_data_size(128,1,1); -+mgl_axis(gr,"xyz"); -+mgl_label(gr,'x', "\\i x"); -+mgl_label(gr,'y', "\\i z"); -+ -+mgl_data_fill_eq(gr,re,"exp(-48*(x+0.7)^2)", 0, 0); -+a = mgl_pde_solve(gr, "p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, 0.01, 30.); -+mgl_data_transpose(a, "yxz"); -+mgl_set_caxis(gr, 0, 1); -+mgl_dens(gr, a,"wyrRk", -1.); -+mgl_fplot(gr, "-x", "k|", 100); -+mgl_puts(gr, 0., 0.85, 0., "absorption: (x+z)/2 for x+z>0"); -+mgl_title(gr, "\\r{Equation:} ik_0\\partial_zu + \\Delta u + x\\cdot u + \ -+i \\frac{x+z}{2}\\cdot u = 0", "iC", -1.5); -+mgl_delete_data(a); -+mgl_delete_data(im); -+mgl_delete_data(re); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer a,re,im, mgl_create_data_size -+a = mgl_create_data() -+re = mgl_create_data_size(128,1,1) -+im = mgl_create_data_size(128,1,1) -+call mgl_axis(gr,'xyz') -+call mgl_label(gr,'x', '\i x') -+call mgl_label(gr,'y', '\i z') -+ -+call mgl_data_fill_eq(gr,re,'exp(-48*(x+0.7)^2)', 0, 0) -+a = mgl_pde_solve(gr, 'p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)', re, im, 0.01, 30.) -+call mgl_data_transpose(a, 'yxz') -+call mgl_set_caxis(gr, 0., 1.) -+call mgl_dens(gr, a,'wyrRk', -1.) -+call mgl_fplot(gr, '-x', 'k|', 100) -+call mgl_puts(gr, 0., 0.85, 0., 'absorption: (x+z)/2 for x+z>0') -+call mgl_title(gr, '\r{Equation:} ik_0\partial_zu + \Delta u + x\cdot u + & -+i \frac{x+z}{2}\cdot u = 0', 'iC', -1.5) -+call mgl_delete_data(a) -+call mgl_delete_data(im) -+call mgl_delete_data(re) -+@end verbatim -+@strong{Python} -+@verbatim -+a, re, im = mglData(), mglData(128), mglData(128); -+gr.Axis(); -+gr.Label('x', "\\i x"); -+gr.Label('y', "\\i z"); -+ -+gr.Fill(re,"exp(-48*(x+0.7)^2)"); -+a = gr.PDE("p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, 0.01, 30); -+a.Transpose("yxz"); -+gr.SetCRange(0, 1); -+gr.Dens(a,"wyrRk"); -+gr.Plot("-x", "k|"); -+gr.Puts(0, 0.85, 0., "absorption: (x+z)/2 for x+z>0"); -+gr.Title("\\r{Equation:} ik_0\\partial_zu + \\Delta u + x\\cdot u + \ -+i \\frac{x+z}{2}\\cdot u = 0", "iC", -1.5); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Beam tracing sample, Parser sample, PDE sample, Advanced features -+@subsection Beam tracing sample -+@cindex mglQO2d -+@cindex mglRay -+ -+@float -+@image{png/qo2d, 7cm} -+@caption{Example of ray and beam tracing. Compare with @ref{PDE sample}.}@c @tdref{qo2d}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+mglData r, xx, yy, a, im(128), re(128); -+const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)"; -+r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2); -+gr->Plot(r.SubData(0), r.SubData(1), "k"); -+gr->Axis(); gr->Label('x', "\\i x"); gr->Label('y', "\\i z"); -+// now start beam tracing -+re.Fill("exp(-48*x^2)", gr->Min, gr->Max); -+a = mglQO2d(ham, re, im, r, 1, 30, &xx, &yy); -+gr->CAxis(0, 1); -+gr->Dens(xx, yy, a, "wyrRk"); -+gr->Plot("-x", "k|"); -+gr->Puts(mglPoint(0, 0.85), "absorption: (x+y)/2 for x+y>0"); -+gr->Puts(mglPoint(0.7, -0.05), "central ray"); -+gr->Title("Beam and ray tracing", "C", -1.5); -+@end verbatim -+@strong{MGL code} -+@verbatim -+define $1 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)' -+ray r $1 -0.7 -1 0 0 0.5 0 0.02 2 -+plot r(0) r(1) 'k' -+axis -+xlabel '\i x' -+ylabel '\i z' -+ -+new re 128 -+new im 128 -+new xx -+new yy -+fill re 'exp(-48*x^2)' -+qo2d a $1 re im r 1 30 xx yy -+ -+crange 0 1 -+dens xx yy a 'wyrRk' -+fplot '-x' 'k|' -+text -0.8 0.85 'absorption: (x+y)/2 for x+y>0' 'L' -1 -+text 0.5 -0.05 'central ray' 'L' -1 -+title 'Beam and ray tracing' 'C' -1.5 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)"; -+HMDT r, xx, yy, a, im, re; -+im = mgl_create_data_size(128,1,1); -+re = mgl_create_data_size(128,1,1); -+r = mgl_ray_trace(ham, -0.7, -1., 0., 0., 0.5, 0., 0.02, 2.); -+xx = mgl_data_subdata(r,0,-1,-1); -+yy = mgl_data_subdata(r,1,-1,-1); -+mgl_plot_xy(gr, xx, yy, "k"); -+mgl_axis(gr,"xyz"); -+mgl_label(gr,'x',"\\i x"); -+mgl_label(gr,'y',"\\i z"); -+ -+mgl_data_fill_eq(gr,re,"exp(-48*x^2)", 0, 0); -+a = mgl_qo2d_solve(ham, re, im, r, 1, 30, xx, yy); -+mgl_set_caxis(gr,0.,1.); -+mgl_dens_xy(gr,xx, yy, a, "wyrRk", -1.); -+mgl_fplot(gr,"-x", "k|",100); -+mgl_puts(gr, 0., 0.85, 0., "absorption: (x+y)/2 for x+y>0"); -+mgl_puts(gr, 0.7, -0.05, 0., "central ray"); -+mgl_title(gr, "Beam and ray tracing", "C", -1.5); -+mgl_delete_data(a); mgl_delete_data(r); -+mgl_delete_data(xx); mgl_delete_data(yy); -+mgl_delete_data(im); mgl_delete_data(re); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer r, xx, yy, a, im, re, mgl_create_data_size -+integer mgl_data_subdata, mgl_ray_trace, mgl_qo2d_solve -+character*64 ham -+ham = 'p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)' -+ -+im = mgl_create_data_size(128,1,1) -+re = mgl_create_data_size(128,1,1) -+r = mgl_ray_trace(ham, -0.7, -1., 0., 0., 0.5, 0., 0.02, 2.) -+xx = mgl_data_subdata(r,0,-1,-1) -+yy = mgl_data_subdata(r,1,-1,-1) -+call mgl_plot_xy(gr, xx, yy, 'k') -+call mgl_axis(gr,'xyz') -+call mgl_label(gr,'x','\i x') -+call mgl_label(gr,'y','\i z') -+ -+call mgl_data_fill_eq(gr,re,'exp(-48*x^2)', 0, 0) -+a = mgl_qo2d_solve(ham, re, im, r, 1., 30., xx, yy) -+call mgl_set_caxis(gr,0.,1.) -+call mgl_dens_xy(gr,xx, yy, a, 'wyrRk', -1.) -+call mgl_fplot(gr,'-x', 'k|',100) -+call mgl_puts(gr, 0., 0.85, 0., 'absorption: (x+y)/2 for x+y>0') -+call mgl_puts(gr, 0.7, -0.05, 0., 'central ray') -+call mgl_title(gr, 'Beam and ray tracing', 'C', -1.5) -+call mgl_delete_data(a) -+call mgl_delete_data(r) -+call mgl_delete_data(xx) -+call mgl_delete_data(yy) -+call mgl_delete_data(im) -+call mgl_delete_data(re) -+@end verbatim -+@strong{Python} -+@verbatim -+ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)"; -+r, xx, yy, a = mglData(), mglData(), mglData(), mglData(); -+im, re = mglData(128), mglData(128); -+r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2); -+ -+gr.Plot(r.SubData(0), r.SubData(1), "k"); -+gr.Axis(); gr.Label('x', "\\i x"); gr.Label('y', "\\i z"); -+ -+gr.Fill(re,"exp(-48*x^2)"); -+a = mglQO2d(ham, re, im, r, 1, 30, xx, yy); -+gr.SetCRange(0, 1); -+gr.Dens(xx, yy, a, "wyrRk"); -+gr.Plot("-x", "k|"); -+gr.Puts(0, 0.85, 0, "absorption: (x+y)/2 for x+y>0"); -+gr.Puts(0.7, -0.05, 0, "central ray"); -+gr.Title("Beam and ray tracing", "C", -1.5); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Parser sample, Manual ticks sample, Beam tracing sample, Advanced features -+@subsection Parser sample -+@cindex mglParse -+ -+@float -+@image{png/parser, 7cm} -+@caption{Example of MGL parsing.}@c @tdref{parser}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+float a[100]; // let a_i = sin(4*pi*x), x=0...1 -+for(int i=0;i<100;i++) a[i]=sin(4*M_PI*i/99); -+mglParse *parser = new mglParse; -+mglData &d = (parser->AddVar("dat"))->d; -+d.Set(a,100); // set data to variable -+parser->Execute(gr, "plot dat; xrange 0 1\nbox\naxis"); -+// you may break script at any line do something -+// and continue after that -+parser->Execute(gr, "xlabel 'x'\nylabel 'y'\nbox"); -+// also you may use cycles or conditions in script -+parser->Execute(gr, "for $0 -1 1 0.1\nline 0 0 -1 $0 'r'\nnext"); -+@end verbatim -+@strong{MGL code} -+@verbatim -+NOT AVAILABLE -+@end verbatim -+@strong{Pure C code} -+@verbatim -+float a[100]; /* let a_i = sin(4*pi*x), x=0...1 */ -+int i; -+for(i=0;i<100;i++) a[i]=sin(4*M_PI*i/99); -+HMPR parser = mgl_create_parser(); -+HMDT d = mgl_add_var(parser, "dat"); -+mgl_data_set_float(d,a,100,1,1); /* set data to variable */ -+mgl_parse_text(gr, parser, "plot dat; xrange 0 1\nbox\naxis"); -+/* you may break script at any line do something -+ and continue after that */ -+mgl_parse_text(gr, parser, "xlabel 'x'\nylabel 'y'"); -+/* also you may use cycles or conditions in script */ -+mgl_parse_text(gr, parser, "for $0 -1 1 0.1\nline 0 0 -1 $0 'r'\nnext"); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+integer i,parser,d, mgl_create_data_size, mgl_create_parser -+real a(100) -+! let a_i = sin(4*pi*x), x=0...1 -+do i = 1,100 -+ a(i)=sin(4*3.1415926*(i-1)/99) -+end do -+parser = mgl_create_parser() -+d = mgl_add_var(parser, "dat") -+call mgl_data_set_real(d,a,100,1,1) ! set data to variable -+! I don't know how put new line ('\n') into fortran string -+! So call mgl_parse_text() for each string :( -+call mgl_parse_text(gr, parser, "plot dat; xrange 0 1") -+call mgl_parse_text(gr, parser, "box") -+call mgl_parse_text(gr, parser, "axis") -+! you may break script at any line do something -+! and continue after that -+call mgl_parse_text(gr, parser, "xlabel 'x'") -+call mgl_parse_text(gr, parser, "ylabel 'y'") -+! there is now conditions because I don't know -+! how to send several string into parser at once :( -+!! also you may use cycles or conditions in script -+!call mgl_parse_text(gr, parser, "for $0 -1 1 0.1\nline 0 0 -1 $0 'r'\nnext") -+@end verbatim -+@strong{Python} -+You may need to use @code{from numpy import *} for defining functions like @code{sin()}. -+@verbatim -+parser = mglParse(); -+dat = parser.AddVar("dat"); -+dat.Create(100); -+for i in range(100): -+ dat[i] = sin(4*pi*i/99); -+parser.Execute(gr, "plot dat; xrange 0 1\nbox\naxis"); -+# you may break script at any line do something -+# and continue after that -+parser.Execute(gr, "xlabel 'x'\nylabel 'y'"); -+# also you may use cycles or conditions in script -+parser.Execute(gr, "for $0 -1 1 0.1\nline 0 0 -1 $0 'r'\nnext"); -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Manual ticks sample, ColumnPlot sample, Parser sample, Advanced features -+@subsection Tick values sample -+@cindex SetTicksVal -+ -+@float -+@image{png/tval, 7cm} -+@caption{Example of MGL parsing.}@c @tdref{tval}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+gr->Axis(mglPoint(-M_PI, 0), mglPoint(M_PI, 2)); -+gr->SetTicksVal('x', 6, -M_PI, "-\\pi", -M_PI/2, "-\\pi/2", 0., "0", -+ 0.886, "x^*", M_PI/2, "\\pi/2", M_PI, "\\pi"); -+gr->Axis(); gr->Grid(); -+gr->Plot("2*cos(x^2)^2", "r2", NAN, 300); -+@end verbatim -+@strong{MGL code} -+@verbatim -+axis -pi 0 pi 2 -+xtick -pi '-\pi' -1.571 '-\pi/2' 0 '0' 0.886 'x^*' 1.571 '\pi/2' pi '\pi' -+axis -+grid -+fplot '2*cos(x^2)^2' 'r2' nan 300 -+@end verbatim -+@strong{Pure C code} -+@verbatim -+mgl_set_axis_2d(gr, -M_PI, 0, M_PI, 2); -+mgl_set_ticks_val(gr, 'x', 6, -M_PI, "-\\pi", -M_PI/2, "-\\pi/2", -+ 0., "0", 0.886, "x^*", M_PI/2, "\\pi/2", M_PI, "\\pi"); -+mgl_axis(gr,"xyz"); -+mgl_axis_grid(gr,"xyz", "B-"); -+mgl_fplot(gr, "2*cos(x^2)^2", "r2", 300); -+@end verbatim -+@strong{Fortran code} -+@verbatim -+NOT AVAILABLE -+@end verbatim -+@strong{Python} -+@verbatim -+gr.SetRanges(-pi, pi, 0, 2); -+parser = mglParse(); -+# very "stupid" way because SWIG not support variable arguments -+parser.Execute(gr, "xtick -pi '-\pi' -1.571 '-\pi/2' 0 '0' " -+ "0.886 'x^*' 1.571 '\pi/2' pi '\pi'"); -+gr.Axis(); gr.Grid(); -+gr.Plot("2*cos(x^2)^2", "r2", 300); -+@end verbatim -+ -+ -+ -+ -+ -+@c ------------------------------------------------------------------ -+@node ColumnPlot sample, , Manual ticks sample, Advanced features -+@subsection ColumnPlot sample -+@cindex SetTicksVal -+ -+@float -+@image{png/column, 7cm} -+@caption{Example of MGL parsing.}@c @tdref{tval}} -+@end float -+ -+@strong{C++ code} -+@verbatim -+char str[32]; -+for(int i=0;i<4;i++) -+{ -+ gr->ColumnPlot(4,i); -+ gr->Box(); -+ sprintf(str,"Plot %d of 4",i); -+ gr->Text(mglPoint(-0.5,0.5),str); -+ sprintf(str,"sin(pi*x+pi*%d/2)",i); -+ gr->Plot(str); -+} -+@end verbatim -+@strong{MGL code} -+@verbatim -+for $1 0 3 -+columnplot 4 $1 -+box -+text -0.5 0.5 'Plot $1 of 4' -+fplot 'sin(pi*x+pi*$1/2)' -+next -+@end verbatim -+@strong{Pure C code} -+@verbatim -+int i; -+char str[32]; -+for(i=0;i<4;i++) -+{ -+ mgl_columnplot(gr,4,i); -+ mgl_box(gr,1); -+ sprintf(str,"Plot %d of 4",i); -+ mgl_text(gr,-0.5,0.5,0.,str); -+ sprintf(str,"sin(pi*x+pi*%d/2)",i); -+ mgl_fplot(gr,str,"",100); -+} -+@end verbatim -+@strong{Fortran code} -+@verbatim -+NOT AVAILABLE -+@end verbatim -+@strong{Python} -+@verbatim -+ -+@end verbatim ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/example.texi -@@ -0,0 +1,1210 @@ -+@c ------------------------------------------------------------------ -+@node Examples, MathGL core, Overview, Top -+@chapter MathGL examples -+ -+This chapter contain information about basic and advanced MathGL, hints and samples for all types of graphics. I recommend you read first 2 sections one after another and at least look on ``Hints'' section. Also I recommend you to look at @ref{General concepts} and @ref{FAQ}. Sample code for some of these examples can be found in @uref{http://mathgl.sf.net/pictures.html} and in @ref{Samples}. -+ -+@menu -+* Basic usage:: -+* Advanced usage:: -+* Data handling:: -+* Data plotting:: -+* C/Fortran interface:: -+* Hints:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Basic usage, Advanced usage, , Examples -+@section Basic usage -+ -+MathGL library can be used by several manners. Each has positive and negative sides: -+@itemize @bullet -+@item -+@emph{The using of MathGL library features for creating graphical window (requires FLTK or GLUT libraries).} -+ -+Positive side is the possibility to view the plot at once and to modify it (rotate, zoom or switch on transparency or lighting) by hand or by mouse. Negative sides are: the need of X-terminal and limitation consisting in working with the only one set of data at a time. -+@item -+@emph{Direct writing to file in bitmap or vector format without creation of graphical window.} -+ -+Positive aspects are: batch processing of similar data set (for example, a set of resulting data files for different calculation parameters), running from the console program (including the cluster calculation), fast and automated drawing, saving pictures for further analysis (or demonstration). Negative sides are: the usage of the external program for picture viewing. Also, the data plotting is non-visual. So, you have to imagine the picture (view angles, lighting and so on) before the plotting. I recommend to use graphical window for determining the optimal parameters of plotting on the base of some typical data set. And later use these parameters for batch processing in console program. -+@item -+@emph{Drawing in memory with the following displaying by other graphical program.} -+ -+In this case the programmer has more freedom in selecting the window libraries (not only FLTK or GLUT), in positioning and surroundings control and so on. I recommend to use such way for ``settled'' programs. -+@end itemize -+ -+Let me consider the aforesaid in more detail. -+ -+@menu -+* Using FLTK/GLUT window:: -+* Drawing to file:: -+* Drawing in memory:: -+* Using QMathGL:: -+@end menu -+ -+ -+@c ------------------------------------------------------------------ -+@node Using FLTK/GLUT window, Drawing to file, , Basic usage -+@subsection Using FLTK/GLUT window -+@cindex window -+@cindex widgets -+ -+The ``interactive'' way of drawing in MathGL consists in window creation with help of class @code{mglGraphGLUT} or @code{mglGraphGLUT} (@pxref{Widget classes}) and the following drawing in this window. There is a corresponding code: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ gr->Rotate(60,40); -+ gr->Box(); -+ return 0; -+ } -+ //----------------------------------------------------- -+ int main(int argc,char **argv) -+ { -+ mglGraphFLTK gr; -+ gr.Window(argc,argv,sample,"MathGL examples"); -+ return mglFlRun(); -+ } -+@end verbatim -+Here function @code{sample} is defined. This function does all drawing. Other function @code{main} is entry point function for console program. Arguments of @code{main} should be transfered to @code{Window()} since it may contain OS specific information (@pxref{mglGraphAB class}). -+ -+Alternatively you can create yours own class inherited from class @code{mglDraw} and reimplement the function @code{Draw()} in it: -+@verbatim -+ class Foo : public mglDraw -+ { -+ public: -+ int Draw(mglGraph *gr); -+ } foo; -+ //----------------------------------------------------- -+ int Foo::Draw(mglGraph *gr) -+ { -+ gr->Rotate(60,40); -+ gr->Box(); -+ return 0; -+ } -+ //----------------------------------------------------- -+ int main(int argc,char **argv) -+ { -+ mglGraphFLTK gr; -+ gr.Window(argc,argv,foo,"MathGL examples"); -+ return mglFlRun(); -+ } -+@end verbatim -+ -+The similar code can be written for @code{mglGraphGLUT} or for @code{mglGraphQT} window (function @code{sample()} is the same): -+@verbatim -+ int main(int argc,char **argv) -+ { -+ mglGraphGLUT gr; -+ gr.Window(argc,argv,sample,"MathGL examples"); -+ return 0; -+ } -+@end verbatim -+ -+The rotation, shift, zooming, switching on/off transparency and lighting can be done with help of tool-buttons (for @code{mglGraphFLTK} and @code{mglGraphQT}) or by hot-keys: @samp{a}, @samp{d}, @samp{w}, @samp{s} for plot rotation, @samp{r} and @samp{f} switching on/off transparency and lighting. Press @samp{x} for exit (or closing the window). -+ -+In this example function @code{sample} rotates axes (@code{Rotate()}, @pxref{Transformation matrix}) and draws the bounding box (@code{Box()}). Drawing procedure is separated in a function since it will be used on demand when window canvas needs to be redrawn. Widget classes (@code{mglGraphFLTK}, @code{mglGraphGLUT} and so on) support a delayed drawing, when all plotting functions are called once at the beginning of writing to memory lists. Further program displays the saved lists faster. Resulting redrawing will be faster but it requires sufficient memory. Several lists (frames) can be displayed one after another (by pressing @samp{,}, @samp{.}) or run as cinema. To switch these feature on one needs to modify function @code{sample}: -+@verbatim -+ int sample1(mglGraph *gr, void *) -+ { -+ gr->NewFrame(); // the first frame -+ gr->Rotate(60,40); -+ gr->Box(); -+ gr->EndFrame(); // end of the first frame -+ gr->NewFrame(); // the second frame -+ gr->Box(); -+ gr->Axis("xy"); -+ gr->EndFrame(); // end of the second frame -+ return GetNumFrame(); // returns the frame number -+ } -+@end verbatim -+First, the function creates a frame @code{NewFrame()} for rotated axes and draws the bounding box. After the frame drawing the function @code{EndFrame()} @strong{must be} called! The second frame contains the bounding box and axes @code{Axis("xy")} in the initial (unrotated) coordinates. Function @code{sample} returns the number of created frames @code{GetNumFrame()}. -+ -+@c ------------------------------------------------------------------ -+@node Drawing to file, Drawing in memory, Using FLTK/GLUT window, Basic usage -+@subsection Drawing to file -+ -+Another way of using MathGL library is the direct picture writing to file. It is most usable for plot creating during calculation or for using of small programs (like Matlab or Scilab scripts) for visualizing repetitive sets of data. But the speed of drawing is much higher in comparison with a script language. There are two classes for exporting in file: class @code{mglGraphZB} saves in bitmap format (like PNG), @code{mglGraphPS} saves in vector PostScript format (@pxref{Plotter classes}). -+ -+The following code produces a bitmap PNG picture: -+@verbatim -+ int main(int ,char **) -+ { -+ mglGraphZB gr; -+ gr.Alpha(true); -+ gr.Light(true); gr.Light(0,mglPoint(1,0,-1)); -+ sample(&gr,NULL); // The same drawing function. -+ gr.WritePNG("test.png"); // Don't forget to save the result! -+ return 0; -+ } -+@end verbatim -+The only difference from the previous (using windows) variant is manual switching the transparency @code{Alpha} and lightning @code{Light} on, if the plot requires it. The using of frames is not advisable since the whole image is prepared each time. If function @code{sample} contains frames then each frame will be saved to a separate file. In principle, one does not need to separate drawing functions in case of direct file writing in consequence of the single calling of this function for each picture. However, one may use the same drawing procedure to create a plot with changed parameters, to export in different file types, to emphasize the drawing code and so on. So, in future I will put the drawing in separate function. -+ -+The code for export in vector EPS file looks the same: -+@verbatim -+ int main(int ,char **) -+ { -+ mglGraphPS gr; -+ gr.Light(true); gr.Light(0,mglPoint(1,0,-1)); -+ sample(&gr,NULL); // The same drawing function. -+ gr.WriteEPS("test.eps"); // Don't forget to save the result! -+ return 0; -+ } -+@end verbatim -+The differences from the using of bitmap picture are: applying of the other class @code{mglGraphPS}, and writing to other format (function @code{WriteEPS()} instead of function @code{WritePNG()}). Moreover, there is no switching of the plot transparency @code{Alpha} since EPS format does not support it. Possibly I shall include transparency in future by program emulation. -+ -+Classes @code{mglGraphZB} and @code{mglGraphPS} have some merits and demerits. Class @code{mglGraphZB} draws beautiful surface with transparency, smoothed colors and lightning, but the output picture is @emph{bitmap}, that leads to a bad scalability. On the contrary, class @code{mglGraphPS} creates vector file with excellent scalability. But file has large size (especially for surfaces), it does not support transparency and color smoothing. So, vector picture looks stylish but a bit angularly. -+ -+@c ------------------------------------------------------------------ -+@node Drawing in memory, Using QMathGL, Drawing to file, Basic usage -+@subsection Drawing in memory -+ -+The last way of MathGL using is the drawing in memory. Class @code{mglGraphZB} allows one to create a bitmap picture in memory. Further this picture can be displayed in window by some window libraries (like wxWidgets, FLTK, Windows GDI and so on). For example, the code for drawing in wxWidget library looks like: -+@verbatim -+ void MyForm::OnPaint(wxPaintEvent& event) -+ { -+ int w,h,x,y; -+ GetClientSize(&w,&h); // size of the picture -+ mglGraphZB gr(w,h); -+ -+ gr.Alpha(true); // draws something using MathGL -+ gr.Light(true); gr.Light(0,mglPoint(1,0,-1)); -+ sample(&gr,NULL); -+ -+ wxImage img(w,h,gr.GetBits(),true); -+ ToolBar->GetSize(&x,&y); // gets a height of the toolbar if any -+ wxPaintDC dc(this); // and draws it -+ dc.DrawBitmap(wxBitmap(img),0,y); -+ } -+@end verbatim -+The drawing in other libraries is most the same. Moreover, I excluded the support of TIFF and JPEG files from MathGL by default for compatibility with wxWidgets library. -+ -+@c ------------------------------------------------------------------ -+@node Using QMathGL, , Drawing in memory, Basic usage -+@subsection Using QMathGL -+ -+MathGL have several interface widgets for different widget libraries. There are QMathGL for Qt, Fl_MathGL for FLTK in MathGL v.1.8. These classes provide control which display MathGL graphics. Unfortunately there is no uniform interface for widget classes because all libraries have slightly different set of functions, features and so on. However the usage of MathGL widgets is rather simple. Let me show it on the example of QMathGL. -+ -+First of all you have to define the drawing function or inherit a class from @code{mglDraw} class. After it just create a window and setup QMathGL instance as any other Qt widget: -+@verbatim -+ int main(int argc,char **argv) -+ { -+ QApplication a(argc,argv); -+ QMainWindow *Wnd = new QMainWindow; -+ Wnd->resize(650,480); // for fill up the QMGL, menu and toolbars -+ Wnd->setWindowTitle(title); -+ // here I allow to scroll QMathGL -- the case -+ // then user want to prepare huge picture -+ QScrollArea *scroll = new QScrollArea(Wnd); -+ -+ // Create and setup QMathGL -+ QMathGL *QMGL = new QMathGL(Wnd); -+ QMGL->setPopup(popup); // if you want to setup popup menu for QMGL -+ QMGL->setDraw(sample, NULL); -+ // or use QMGL->setDraw(foo); for instance of class Foo:public mglDraw -+ QMGL->update(); -+ -+ // continue other setup (menu, toolbar and so on) -+ makeMenu(); -+ scroll->setWidget(QMGL); -+ Wnd->setCentralWidget(scroll); -+ Wnd->show(); -+ return a.exec(); -+ } -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node Advanced usage, Data handling, Basic usage, Examples -+@section Advanced usage -+ -+Now I show several non-obvious features of MathGL: several subplots in a single picture, curvilinear coordinates, text printing and so on. Generally you may miss this section at first reading, but I don't recommend it. -+ -+@menu -+* Subplots:: -+* Axis and grids:: -+* Curvilinear coordinates:: -+* Text printing example:: -+* Animation:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Subplots, Axis and grids, , Advanced usage -+@subsection Subplots -+ -+Let me demonstrate possibilities of axes transformation. MathGL has the following functions: @code{SubPlot}, @code{InPlot}, @code{Aspect} and @code{Rotate} (@pxref{Transformation matrix}). The order of their calling is strictly determined. First, one changes the position of axes in image area (functions @code{SubPlot} and @code{InPlot}). After that one may rotate the plot (function @code{Rotate}). Finally, one may change aspects of axes (function @code{Aspect}). The following code illustrates the aforesaid it: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ gr->SubPlot(2,2,0); -+ gr->Box(); -+ gr->Puts(mglPoint(-1,1.1,1),"Just box","rL"); -+ gr->InPlot(0.2,0.5,0.7,1); -+ gr->Box(); -+ gr->Puts(mglPoint(0,1.2,1),"InPlot example"); -+ -+ gr->SubPlot(2,2,1); -+ gr->Rotate(60,40); -+ gr->Aspect(1,1,1); -+ gr->Box(); -+ gr->Puts(mglPoint(1,1,1.5),"Rotate only","rR"); -+ -+ gr->SubPlot(2,2,2); -+ gr->Rotate(60,40); -+ gr->Aspect(1,1,2); -+ gr->Box(); -+ gr->Puts(mglPoint(0,0,2),"Aspect and Rotate"); -+ -+ gr->SubPlot(2,2,3); -+ gr->Rotate(60,40); -+ gr->Aspect(1,2,2); -+ gr->Box(); -+ gr->Puts(mglPoint(0,0,1.5),"Aspect in other direction"); -+ return 0; -+ } -+@end verbatim -+Here I used function @code{Puts} for printing the text in arbitrary position of picture (@pxref{Text printing}). Text coordinates and size are connected with axes. However, text coordinates may be everywhere, including the outside the bounding box. I shall show its features later in @xref{Text printing example}. -+ -+@float -+@image{png/sample1, 7cm} -+@caption{Example of several subplots on the single picture.} -+@end float -+ -+@c ------------------------------------------------------------------ -+@node Axis and grids, Curvilinear coordinates, Subplots, Advanced usage -+@subsection Axis and grids -+ -+MathGL library can draw not only the bounding box but also the axes, grids, labels and so on. The limits of axes and their origin (the point of intersection) are determined by function @code{Axis()}. Also you can use @code{XRange(), YRange(), ZRange()} functions (@pxref{Ranges (bounding box)}). Ticks on axis are specified by function @code{SetTicks} (@pxref{Ticks}). First argument the direction for each change will be applied. Second argument gives the step between ticks (if positive) or gives the number of ticks on the axis (if negative) or set to use logarithmic ticks (if zero). Third argument gives numbers of sub-ticks between ticks (default is zero). Last argument define the initial ticks position. -+ -+Function @code{Axis} draws axes. Its textual string shows in which directions the axis or axes will be drawn (by default @code{"xyz"}, function draws axes in all directions). Function @code{Grid} draws grid perpendicularly to specified directions. Example of axes and grid drawing is: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ gr->SubPlot(2,2,0); -+ gr->SetTicks('x', 0.4, 3); // sets tick step to 0.5 -+ gr->SetTicks('y', 0.4, 3); // and draws 3 subticks -+ gr->Box(); // should be after the ticks change -+ gr->Axis("xy"); -+ gr->Grid(); -+ gr->Puts(mglPoint(0,1.3,1),"Axis and grid"); -+ -+ gr->SetTicks('x'); gr->SetTicks('y'); // restore back -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(0,0,0)); -+ -+ gr->SubPlot(2,2,1); -+ gr->Rotate(60,40); -+ gr->Axis(); -+ gr->Label('x',"x"); -+ gr->Label('y',"y"); -+ gr->Label('z',"z"); -+ gr->Puts(mglPoint(0,0,1.5),"Axis and labels"); -+ -+ gr->SubPlot(2,2,2); -+ gr->Rotate(60,40); -+ gr->SetTicks('x', 0.2); gr->SetTicks('y', 0.2); -+ gr->SetTicks('z', 0.2); // too low step of ticks -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,-1,-1)); -+ gr->Axis(); -+ gr->Grid(); -+ gr->Puts(mglPoint(0,0,1.5),"Shift origin and add grid"); -+ gr->Puts(mglPoint(0,0,1.2),"(note, too many ticks)"); -+ -+ gr->SubPlot(2,2,3); -+ gr->Rotate(60,40); -+ gr->SetTicks('x', -6); // decrease the number of ticks -+ gr->SetTicks('y', -6); -+ gr->Axis("yz"); -+ gr->Label('y',"Y axis",0); -+ gr->Label('z',"Z axis",0); -+ gr->Puts(mglPoint(0,0,1.5),"Remove X axis, and"); -+ gr->Puts(mglPoint(0,0,1.2),"decrease number of ticks"); -+ return 0; -+ } -+@end verbatim -+ -+This example shows the importance of the correct choosing of the number of ticks on axis. If tick step is too small then its text may overlap and becomes unreadable. This code has the example of @code{Label} function. It draws label for axis in specified direction. The text position on axis is specified by third argument of @code{Label} function. If it is positive then then text is drawn near the axis maximum, if negative then the same takes place near the minimum of axis, if zero - then at the center of axis. -+ -+@float -+@image{png/sample2, 7cm} -+@caption{Example of setting up axis range and axis ticks.} -+@end float -+ -+@c ------------------------------------------------------------------ -+@node Curvilinear coordinates, Text printing example, Axis and grids, Advanced usage -+@subsection Curvilinear coordinates -+ -+ -+Now let use curvilinear coordinates. In difference from other systems of plot creation, MathGL uses textual formulas for connection of the old (data) and new (output) coordinates. This allows one to plot in arbitrary coordinates. The following code plots the line @var{y}=0, @var{z}=0 in Cartesian, polar, parabolic and spiral coordinates: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ mglData x(50),y(50),z(50); -+ y.Fill(0.5,0.5); -+ x.Fill(-1,1); // creates data arrays -+ -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,1,-1)); -+ gr->dz = 0.5; // sets tick step to 0.5 -+ -+ gr->SubPlot(2,2,0); -+ gr->Rotate(60,40); -+ gr->Plot(x,y,z,"r2"); -+ gr->Axis(); gr->Grid(); -+ gr->Puts(mglPoint(0,1.3,1),"Cartesian"); -+ -+ gr->SubPlot(2,2,1); -+ gr->Axis("y*sin(pi*x)","y*cos(pi*x)",0); -+ gr->Rotate(60,40); -+ gr->Plot(x,y,z,"r2"); -+ gr->Axis(); gr->Grid(); -+ gr->Puts(mglPoint(0,1.3,1),"Cylindrical"); -+ -+ gr->SubPlot(2,2,2); -+ gr->Rotate(60,40); -+ gr->Axis("2*y*x","y*y - x*x",0); -+ gr->Plot(x,y,z,"r2"); -+ gr->Axis(); gr->Grid(); -+ gr->Puts(mglPoint(0,1.3,1),"Parabolic"); -+ -+ gr->SubPlot(2,2,3); -+ gr->Rotate(60,40); -+ gr->Axis("y*sin(pi*x)","y*cos(pi*x)","x+z"); -+ gr->Plot(x,y,z,"r2"); -+ gr->Axis(); gr->Grid(); -+ gr->Puts(mglPoint(0,1.3,1),"Spiral"); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/sample3, 7cm} -+@caption{Example of curvilinear coordinates} -+@end float -+ -+ -+@c ------------------------------------------------------------------ -+@node Text printing example, Animation, Curvilinear coordinates, Advanced usage -+@subsection Text printing example -+ -+MathGL prints text by vector font. There are functions for manual specifying of text position (like @code{Puts}) and for its automatic selection (like @code{Label}, @code{Legend} and so on). MathGL prints text always in specified position even if it lies outside the bounding box. The default size of font is specified by variables @var{FontSize} (@pxref{Font settings}). However, the actual size of output string depends on position of axes (depends on functions @code{SubPlot}, @code{InPlot}). The switching of the font style (italic, bold, wire and so on) can be done for the whole string (by function parameter) or inside the string. By default MathGL parses TeX-like commands for symbols and indexes (see @pxref{mglFont class}). Example of MathGL font drawing is: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ setlocale(LC_CTYPE, "ru_RU.cp1251"); -+ gr->Puts(mglPoint(0,1),"Text can be in ASCII and in Unicode"); -+ gr->Puts(mglPoint(0,0.6),"It can be \\wire{wire}, \\big{big} " -+ "or #r{colored}"); -+ gr->Puts(mglPoint(0,0.2),"One can change style in string: " -+ "\\b{bold}, \\i{italic, \\b{both}}"); -+ gr->Puts(mglPoint(0,-0.2),"Easy to \\a{overline} or " -+ "\\u{underline}"); -+ gr->Puts(mglPoint(0,-0.6),"Easy to change indexes " -+ "^{up} _{down} @{center}"); -+ gr->Puts(mglPoint(0,-1),"It parse TeX: \\int \\alpha \\cdot " -+ "\\sqrt3{sin(\\pi x)^2 + \\gamma_{i_k}} dx"); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/sample4, 7cm} -+@caption{Example of text printing with different font effects} -+@end float -+ -+Another example demonstrate the features of TeX formula parsing. -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ gr->Puts(mglPoint(0), "\\sqrt{\\frac{\\alpha^{\\gamma^2}+" -+ "\\overset 1{\\big\\infty}}{\\sqrt3{2+b}}}", 0, -4); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/samplee, 7cm} -+@caption{Example of TeX formula parsing} -+@end float -+ -+ -+@c ------------------------------------------------------------------ -+@node Animation, , Text printing example, Advanced usage -+@subsection Animation -+ -+You can make animation by several methods in MathGL: by export in animated GIF, or by save each frame in separate file (usually JPEG) and convert these files into movie. Let me show both methods. -+ -+The simplest methods is making animated GIF. There are 3 steps: (1) open GIF file by @code{StartGIF()} function; (2) create the frames by calling @code{NewFrame()} before and @code{EndFrame()} after plotting; (3) close GIF by @code{CloseGIF()} function. So the simplest code for ``running'' sinusoid will look like this: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ mglData dat(100); -+ char str[32]; -+ gr->StartGIF("sample.gif"); -+ for(int i=0;i<100;i++) -+ { -+ gr->NewFrame(); // start frame -+ gr->Box(); // some plotting -+ sprintf(str,"sin(pi*x+%g*pi)",0.02*i); -+ dat.Modify(str); -+ gr->Plot(dat,"b"); -+ gr->EndFrame(); // end frame -+ } -+ gr->CloseGIF(); -+ return 0; -+ } -+@end verbatim -+ -+The second way is saving each frame in separate file (usually JPEG) and later make the movie from them. MathGL have special function for saving frames -- it is @code{WriteFrame()}. This function save each frame with automatic name @samp{frame0001.jpg, frame0002.jpg} and so on. Here prefix @samp{frame} is defined by @var{PlotId} variable of @code{mglGraph} class. So the similar code will look like this: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ mglData dat(100); -+ char str[32]; -+ for(int i=0;i<100;i++) -+ { -+ gr->NewFrame(); // start frame -+ gr->Box(); // some plotting -+ sprintf(str,"sin(pi*x+%g*pi)",0.02*i); -+ dat.Modify(str); -+ gr->Plot(dat,"b"); -+ gr->EndFrame(); // end frame -+ gr->WriteFrame(); // save frame -+ } -+ return 0; -+ } -+@end verbatim -+ -+Created files can be converted to movie by help of a lot of programs. For example, you can use ImageMagic (command @samp{convert frame*.jpg movie.mpg}), MPEG library, GIMP and so on. -+ -+Finally, you can use @code{mgl2gif} tool for doing the same with MGL scripts (@pxref{Utilities}). -+ -+@c ------------------------------------------------------------------ -+@node Data handling, Data plotting, Advanced usage, Examples -+@section Data handling -+ -+Class @code{mglData} contains all functions for the data handling in MathGL (@pxref{mglData class}). There are several matters why I use class @code{mglData} but not a single array: it does not depend on type of data (float or double), sizes of data arrays are kept with data, memory working is simpler and safer. -+ -+@menu -+* Array creation:: -+* Data changing:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Array creation, Data changing, , Data handling -+@subsection Array creation -+ -+One can put the data in @code{mglData} instance by several ways. Let us do it for sinus function: -+@itemize @bullet -+@item -+one can create external array, fill it and put to @code{mglData} variable -+@verbatim -+ double *a = new double[50]; -+ for(int i=0;i<50;i++) a[i] = sin(M_PI*i/49.); -+ -+ mglData y; -+ y.Set(a,50); -+@end verbatim -+ -+@item -+another way is to create @code{mglData} instance of the desired size and then to work directly with data in this variable -+@verbatim -+ mglData y(50); -+ for(int i=0;i<50;i++) y.a[i] = sin(M_PI*i/49.); -+@end verbatim -+ -+@item -+next way is to fill the data in @code{mglData} instance by textual formula with the help of @code{Modify()} function -+@verbatim -+ mglData y(50); -+ y.Modify("sin(pi*x)"); -+@end verbatim -+ -+@item -+or one may fill the array in some interval and modify it later -+@verbatim -+ mglData y(50); -+ y.Fill(0,M_PI); -+ y.Modify("sin(u)"); -+@end verbatim -+ -+@item -+finally it can be loaded from file -+@verbatim -+ FILE *fp=fopen("sin.dat","wt"); // create file first -+ for(int i=0;i<50;i++) fprintf(fp,"%g\n",sin(M_PI*i/49.)); -+ fclose(fp); -+ -+ mglData y("sin.dat"); // load it -+@end verbatim -+ -+@item -+at this one can read only part of data -+@verbatim -+ FILE *fp-fopen("sin.dat","wt"); // create large file first -+ for(int i=0;i<70;i++) fprintf(fp,"%g\n",sin(M_PI*i/49.)); -+ fclose(fp); -+ -+ mglData y; -+ y.Read("sin.dat",50); // load it -+@end verbatim -+@end itemize -+ -+Creation of 2d- and 3d-arrays is mostly the same. But one should keep in mind that class @code{mglData} uses flat data representation. For example, matrix 30*40 is presented as flat (1d-) array with length 30*40=1200 (nx=30, ny=40). The element with indexes @{i,j@} is a[i+nx*j]. So for 2d array we have: -+@verbatim -+ mglData z(30,40); -+ for(int i=0;i<30;i++) for(int j=0;j<40;j++) -+ z.a[i+30*j] = sin(M_PI*i/29.)*sin(M_PI*j/39.); -+@end verbatim -+or by using @code{Modify()} function -+@verbatim -+ mglData z(30,40); -+ z.Modify("sin(pi*x)*cos(pi*y)"); -+@end verbatim -+ -+The only non-obvious thing here is using multidimensional arrays in C/C++, i.e. arrays defined like @code{float dat[40][30];}. Since, formaly this arrays element @code{dat[i]} can address the memory in arbitrary place you should use the proper function to convert such arrays to @code{mglData} object. For C++ this is functions like @code{mglData::Set(float **dat, int N1, int N2);}. For C this is functions like @code{mgl_data_set_float2(HMDT d, const float **dat, int N1, int N2);}. At this, you should keep in mind that @code{nx=N2} and @code{ny=N1} after conversion. -+ -+@c ------------------------------------------------------------------ -+@node Data changing, , Array creation, Data handling -+@subsection Data changing -+ -+MathGL has functions for data processing: differentiating, integrating, smoothing and so on (for more detail, @pxref{mglData class}). Let us consider some examples. The simplest ones are integration and differentiation. The direction in which operation will be performed is specified by textual string, which may contain symbols @samp{x}, @samp{y} or @samp{z}. For example, the call of @code{Diff("x")} will differentiate data along @samp{x} direction; the call of @code{Integral("xy")} perform the double integration of data along @samp{x} and @samp{y} directions; the call of @code{Diff2("xyz")} will apply 3d Laplace operator to data and so on. Example of this operations on 2d array a=x*y is presented in code: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ mglData a(30,40); a.Modify("x*y"); -+ gr->Axis(mglPoint(0,0,0),mglPoint(1,1,1)); -+ gr->SubPlot(2,2,0); gr->Rotate(60,40); -+ gr->Surf(a); gr->Box(); -+ gr->Puts(mglPoint(0.7,1,1.2),"a(x,y)"); -+ gr->SubPlot(2,2,1); gr->Rotate(60,40); -+ a.Diff("x"); gr->Surf(a); gr->Box(); -+ gr->Puts(mglPoint(0.7,1,1.2),"da/dx"); -+ gr->SubPlot(2,2,2); gr->Rotate(60,40); -+ a.Integral("xy"); gr->Surf(a); gr->Box(); -+ gr->Puts(mglPoint(0.7,1,1.2),"\\int da/dx dxdy"); -+ gr->SubPlot(2,2,3); gr->Rotate(60,40); -+ a.Diff2("y"); gr->Surf(a); gr->Box(); -+ gr->Puts(mglPoint(0.7,1,1.2),"\\int {d^2}a/dxdy dx"); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/sample6, 7cm} -+@caption{Example of data differentiation and integration} -+@end float -+ -+Data smoothing (function @code{Smooth()}) is more interesting and important. This function has 2 main arguments: type of smoothing and its direction. Now 4 methods are supported: @code{SMOOTH_NONE} does nothing for delta=0 or approaches data to zero with the step delta, @code{SMOOTH_LINE_3} linear averaging by 3 points, @code{SMOOTH_LINE_5} linear averaging by 5 points, @code{SMOOTH_QUAD_5} quadratic averaging by 5 points. Let me demonstrate it for 1d case: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ mglData y0(30),y1,y2,y3; -+ y0.Modify("0.4*sin(2*pi*x)+0.3*cos(3*pi*x)-0.4*sin(4*pi*x)+0.2*rnd"); -+ -+ y1=y0; y1.Smooth(SMOOTH_LINE_3); -+ y2=y0; y2.Smooth(SMOOTH_LINE_5); -+ y3=y0; y3.Smooth(SMOOTH_QUAD_5); -+ -+ gr->Plot(y0,"k"); gr->AddLegend("NONE","k"); -+ gr->Plot(y1,"r"); gr->AddLegend("LINE_3","r"); -+ gr->Plot(y2,"g"); gr->AddLegend("LINE_5","g"); -+ gr->Plot(y3,"b"); gr->AddLegend("QUAD_5","b"); -+ gr->Legend(); gr->Box(); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/sample7, 7cm} -+@caption{Example of data smoothing} -+@end float -+ -+Finally one can create new data arrays on base of the existing one: extract slice, row or column of data (@code{SubData()}), summarize along some of direction(s) (@code{Sum()}), find distribution of data elements (@code{Hist()}). Note, that all these functions are not thread-safe because they use static internal variable for output array. In particular, the using of several of them in arguments of the same function will lead to unpredictable result. -+ -+@c ------------------------------------------------------------------ -+@node Data plotting, C/Fortran interface, Data handling, Examples -+@section Data plotting -+ -+Let me now show how to plot the data. MathGL generally has 2 types of plotting functions. Simple variant requires a single data array for plotting, other data (coordinates) are considered uniformly distributed in interval @var{Min}*@var{Max}. Second variant requires data arrays for all coordinates. It allows one to plot rather complex multivalent curves and surfaces (in case of parametric dependencies). Argument setting to default values allows one to plot data in standard form. Manual arguments setting gives possibility for fine tuning of colors, positions and view of graphics. Note, that the call of drawing function adds something to picture but does not clear the previous plots (as it does in Matlab). Another difference from Matlab is that all setup (like transparency, lightning, axis borders and so on) must be specified @strong{before} plotting functions. -+ -+@menu -+* Plots for 1D data:: -+* Plots for 2D data:: -+* Plots for 3D data:: -+* Surface transparency:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Plots for 1D data, Plots for 2D data, , Data plotting -+@subsection Plots for 1D data -+ -+Term ``1D data'' means that data depend on single index (parameter) like curve in parametric form @{x(i),y(i),z(i)@}, i=1...n. There are 5 generally different types of data representations: simple line plot, line plot with filling under it, stairs plot, bar plot and vertical lines (@pxref{1D plotting}). Each type of plotting has similar interface. There are 3D version and two 2D versions. One of last requires single array. The parameters of line and marks (@pxref{Line styles}) are specified by the string argument. If the string parameter is @code{NULL} then solid line with color from palette is used (@pxref{Palette and colors}). -+ -+Below I shall show the features of 1D plotting on base of @code{Plot()} function (@pxref{Plot}). Let us start from sinus plot: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ mglData y0(50); y0.Modify("sin(pi*(2*x-1))"); -+ gr->SubPlot(2,2,0); -+ gr->Plot(y0); gr->Box(); -+@end verbatim -+Style of line is not specified in @code{Plot()} function. So MathGL uses the solid line with first color of palette (this is blue). Next subplot shows array @var{y1} with 2 rows: -+@verbatim -+ gr->SubPlot(2,2,1); -+ mglData y1(50,2); -+ y1.Modify("sin(pi*2*x-pi)"); -+ y1.Modify("cos(pi*2*x-pi)/2",1); -+ gr->Plot(y1); gr->Box(); -+@end verbatim -+As previously I did not specify the style of lines. As a result, MathGL again uses solid line with next colors in palette (there are green and red). Now let us plot a circle on the same subplot. The circle is parametric curve @math{x=cos(\pi t), y=sin(\pi t)}. I will set the color of the circle (dark yellow, @samp{Y}) and put marks @samp{+} at point position: -+@verbatim -+ mglData x(50); x.Modify("cos(pi*2*x-pi)"); -+ gr->Plot(x,y0,"Y+"); -+@end verbatim -+Note that solid line is used because I did not specify the type of line. The same picture can be achieved by @code{Plot2()} function. Let us draw ellipse by orange dash line: -+@verbatim -+ gr->Plot2(y1,"q|"); -+@end verbatim -+ -+Drawing in 3D space is mostly the same. Let us draw spiral with default line style. Now its color is 4-th color from palette (this is cyan): -+@verbatim -+ gr->SubPlot(2,2,2); gr->Rotate(60,40); -+ mglData z(50); z.Modify("2*x-1"); -+ gr->Plot(x,y0,z); gr->Box(); -+@end verbatim -+Function @code{Plot3()} does 3D curve plot but for single array. Use it to put circle marks on the previous plot: -+@verbatim -+ mglData y2(10,3); y2.Modify("cos(pi*(2*x-1+y))"); -+ y2.Modify("2*x-1",2); -+ gr->Plot3(y2,"bo "); -+@end verbatim -+Note that line style is empty @samp{ } here. Usage of other 1D plotting functions looks similar: -+@verbatim -+ gr->SubPlot(2,2,3); gr->Rotate(60,40); -+ gr->Bars(x,y0,z,"r"); gr->Box(); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/sample8, 7cm} -+@caption{Example of 1D data plot} -+@end float -+ -+@c ------------------------------------------------------------------ -+@node Plots for 2D data, Plots for 3D data, Plots for 1D data, Data plotting -+@subsection Plots for 2D data -+ -+Surfaces @code{Surf()} and other 2D plots (@pxref{2D plotting}) are drown the same simpler as 1D one. The difference is that the string parameter specifies not by line style but by the color scheme of the plot (@pxref{Color scheme}). Here I draw attention on 4 most interesting color schemes. There is gray scheme where color is changed from black to white (string @samp{kw}) or from white to black (string @samp{wk}). Another scheme is useful for accentuation of negative (by blue color) and positive (by red color) regions on plot (string @samp{"BbwrR"}). Last one is the popular ``jet'' scheme (string @samp{"BbcyrR"}). -+ -+Now I shall show the example of a surface drawing. At first let us switch lightning on -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ gr->Light(true); gr->Light(0,mglPoint(0,0,1)); -+@end verbatim -+and draw the surface, considering coordinates x,y to be uniformly distributed in interval @var{Min}*@var{Max} -+@verbatim -+ mglData a0(50,40); -+ a0.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+ gr->SubPlot(2,2,0); gr->Rotate(60,40); -+ gr->Surf(a0); gr->Box(); -+@end verbatim -+Color scheme was not specified. So previous color scheme is used. In this case it is default color scheme (``jet'') for the first plot. Next example is a sphere. The sphere is parametrically specified surface: -+@verbatim -+ mglData x(50,40),y(50,40),z(50,40); -+ x.Modify("0.8*sin(2*pi*x)*sin(pi*y)"); -+ y.Modify("0.8*cos(2*pi*x)*sin(pi*y)"); -+ z.Modify("0.8*cos(pi*y)"); -+ gr->SubPlot(2,2,1); gr->Rotate(60,40); -+ gr->Surf(x,y,z,"BbwrR");gr->Box(); -+@end verbatim -+I set color scheme to @code{"BbwrR"} that corresponds to red top and blue bottom of the sphere. -+ -+Surfaces will be plotted for each of slice of the data if @var{nz}>1. Next example draws surfaces for data arrays with @var{nz}=3: -+@verbatim -+ mglData a1(50,40,3); -+ a1.Modify("0.6*sin(2*pi*x)*sin(3*pi*y)+0.4*cos(3*pi*(x*y))"); -+ a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*sin(3*pi*(x*y))",1); -+ a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y)+0.4*cos(3*pi*(x*y))",2); -+ gr->SubPlot(2,2,2); gr->Rotate(60,40); -+ gr->Alpha(true); -+ gr->Surf(a1); gr->Box(); -+@end verbatim -+Note, that it may entail a confusion. However, if one will use density plot then the picture will look better: -+@verbatim -+ gr->SubPlot(2,2,3); gr->Rotate(60,40); -+ gr->Dens(a1); gr->Box(); -+ return 0; -+ } -+@end verbatim -+Note, that the previous color scheme is used in last plots because there are no direct specification of the one. -+ -+@float -+@image{png/sample9, 7cm} -+@caption{Example of surface plot for 2D data} -+@end float -+ -+Drawing of other 2D plots is analogous. The only peculiarity is the usage of flag @samp{#}. By default this flag switches on the drawing of a grid on plot (@code{Grid()} or @code{Mesh()} for plots in plain or in volume). However, for isosurfaces (including surfaces of rotation @code{Axial()}) this flag switches the face drawing off. Figure becomes wired. The following code gives example of flag @samp{#} using (compare with normal function drawing as in its description): -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ gr->Alpha(true); gr->Light(true); gr->Light(0,mglPoint(0,0,1)); -+ mglData a(30,20); -+ a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); -+ gr->Surf(a,"BbcyrR#"); gr->Box(); -+ gr->SubPlot(2,2,1); gr->Rotate(40,60); -+ gr->Dens(a,"BbcyrR#"); gr->Box(); -+ gr->SubPlot(2,2,2); gr->Rotate(40,60); -+ gr->Cont(a,"BbcyrR#"); gr->Box(); -+ gr->SubPlot(2,2,3); gr->Rotate(40,60); -+ gr->Axial(a,"BbcyrR#"); gr->Box(); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/samplea, 7cm} -+@caption{Example of 2D data plot with color scheme contained @samp{#} symbol} -+@end float -+ -+@c ------------------------------------------------------------------ -+@node Plots for 3D data, Surface transparency, Plots for 2D data, Data plotting -+@subsection Plots for 3D data -+ -+Drawing procedures for 3D plot looks similarly to 1D and 2D plots described above. There are 3 general types of 3D plots (@pxref{3D plotting}): (i) plots on slices or on projections, (ii) isosurfaces, (iii) cloud-like plots. Plots on slice are clear enough -- one specifies a slice (as its index or as coordinate value) and MathGL draws contour lines or density plot on slice plane. Isosurface gives more information. Isosurface is 3D analogue of the contour line @code{Cont()}. It shows the region where data array values exceed specified isosurface level. Plot becomes more informative if one adds transparency, lightning or sets color scheme depending on coordinates. Generalization of isosurface is the cloud-like plot. For this plot the darker color and less transparent regions correspond to higher values of data. Contrary, the regions with low values are transparent. For plotting of the phase of fields (or beams or pulses) one can use isosurface which transparency depends on the other data array (see function @code{Surf3A()}). As example of 3D data plots let us draw the Gaussian beam diffraction in space. Beam propagates along @var{x} axis: -+@verbatim -+ int sample(mglGraph *gr, void *) -+ { -+ gr->Alpha(true); gr->Light(true); -+ gr->Light(0,mglPoint(0,0,1)); -+ mglData a(30,30,30),b(30,30,30); -+ a.Modify("exp(-16*((z-0.5)^2+(y-0.5)^2)/(1+4*x^2))"); -+ b.Modify("16*((z-0.5)^2+(y-0.5)^2)*(x)/(1+4*x^2)"); -+ gr->CAxis(0,1); -+ -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); -+ gr->Surf3(a,"wgk"); gr->Box(); -+ gr->SubPlot(2,2,1); gr->Rotate(40,60); -+ gr->DensA(a); gr->Box(); gr->Axis(); -+ gr->SubPlot(2,2,2); gr->Rotate(40,60); -+ gr->CloudQ(a); gr->Box(); -+ gr->SubPlot(2,2,3); gr->Rotate(40,60); -+ gr->Surf3A(b,a,"q");gr->Box(); -+ return 0; -+ } -+@end verbatim -+ -+@float -+@image{png/sampleb, 7cm} -+@caption{Example of Gaussian beam diffraction (3D data)} -+@end float -+ -+ -+@c ------------------------------------------------------------------ -+@node Surface transparency, , Plots for 3D data, Data plotting -+@subsection Surface transparency -+ -+MathGL library has advanced features for setting and handling the surface transparency. The simplest way to add transparency is the using of function @code{Alpha()}. As a result, all further surfaces (and isosurfaces, density plots and so on) become transparent. However, their look can be additionally improved. -+ -+First, the selected surface will be non-transparent if one sets the flag @code{Transparent} before the surface drawing and sets it off after the drawing. -+ -+Second, the value of transparency can be different from surface to surface. To do it just change the value of @code{AlphaDef} before the drawing of the selected surface. If its value is close to 0 then the surface becomes more and more transparent. Contrary, if its value is close to 1 then the surface becomes practically non-transparent. This is some analogue of @code{Transparent=true}. -+ -+Third feature is the changing of the way how the light goes through overlapped surfaces. The variable @code{TranspType} defines it. By default the usual transparency is used (@code{TranspType=0}) -- surfaces below is less visible than the upper ones. A ``glass-like'' transparency (@code{TranspType=1}) has a different look when the surface just decreases the background light (the surfaces are commutable in this case). -+ -+A ``neon-like'' transparency (@code{TranspType=2}) has more interesting look. In this case a surface is the light source (like a lamp on the dark background) and just adds some intensity to the color. At this, the library sets automatically the black color for the background and changes the default line color to white. -+ -+As example I shall show the variant of plot from @ref{Plots for 2D data} (grid drawing is disabled) for different types of transparency. -+@float -+@image{png/type0, 7cm} -+@caption{Example of @code{TranspType=0}.} -+@end float -+@float -+@image{png/type1, 7cm} -+@caption{Example of @code{TranspType=1}.} -+@end float -+@float -+@image{png/type2, 7cm} -+@caption{Example of @code{TranspType=2}.} -+@end float -+ -+@c ------------------------------------------------------------------ -+@node C/Fortran interface, Hints, Data plotting, Examples -+@section C/Fortran interface -+ -+The usage of pure C or Fortran or any similar interfaces (@pxref{C interface}) is practically identical to classes usage. But there are some differences. C functions must have argument HMGL (for graphics) and/or HMDT (for data arrays) which specifies the object for drawing or manipulating (changing). Fortran users may regard these variables as integer. So, firstly the user has to create this object by function mgl_create_*() and has to delete it after the using by function mgl_delete_*(). -+ -+Also, all arguments of C function have to be defined. So there are several functions with practically identical names doing practically the same. But some of them have simplified interface for the quick plotting and some of them have access to all plotting parameters for manual tunning. -+ -+As an example of C function usage let me draw the plot from @ref{Plots for 2D data}. The C code which does it is shown below: -+@verbatim -+ #include -+ int main() -+ { -+ HMGL gr = mgl_create_graph_zb(600, 400); -+ mgl_set_alpha(gr, true); -+ mgl_set_light(gr, true); -+ HMDT a = mgl_create_data_size(30,20,1); -+ mgl_data_modify(a,"0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))",0); -+ -+ mgl_subplot(gr, 2,2,0); -+ mgl_rotate(gr, 40,60,0); -+ mgl_surf(gr,a,"BbcyrR#"); -+ mgl_box(gr, true); -+ mgl_subplot(gr, 2,2,1); -+ mgl_rotate(gr, 40,60,0); -+ mgl_dens(gr,a,"BbcyrR#",NAN); -+ mgl_box(gr, true); -+ mgl_subplot(gr, 2,2,2); -+ mgl_rotate(gr, 40,60,0); -+ mgl_cont(gr,a,"BbcyrR#",7,NAN); -+ mgl_box(gr, true); -+ mgl_subplot(gr, 2,2,3); -+ mgl_rotate(gr, 40,60,0); -+ mgl_axial(gr,a,"BbcyrR#",3); -+ mgl_box(gr, true); -+ -+ /* don't forgot to save graphics */ -+ mgl_write_png(gr,"sample.png",0); -+ return 0; -+ } -+@end verbatim -+ -+Practically the same simple to create a window. For example let rewrite the code from for window creation (@pxref{Using FLTK/GLUT window}): -+@verbatim -+ int sample(HMGL gr, void *) -+ { -+ mgl_rotate(gr,60,40,0); -+ mgl_box(gr,1); -+ return 0; -+ } -+ //----------------------------------------------------- -+ int main(int argc,char **argv) -+ { -+ mgl_create_graph_fltk(sample, "MathGL examples", NULL); -+ mgl_fltk_run(); -+ return 0; -+ } -+@end verbatim -+ -+The fortran code have some perculiarities. Exactly it not allow one to send arbitrary parameter (which was @code{NULL} in previous example) to function. This is limitation of Fortran language. So, the corresponding code will be @strong{NOT TESTED NOW!!!}: -+@verbatim -+ program TEST -+ integer x,f,func -+ call mgl_create_graph_fltk(sample, 'MathGL examples'); -+ call mgl_fltk_run(); -+ end program TEST -+ -+ integer function sample(gr) -+ integer*8 gr -+ call mgl_rotate(gr,60,40,0); -+ call mgl_box(gr,1); -+ sample=0 -+ return -+ end -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Hints, , C/Fortran interface, Examples -+@section Hints -+ -+In this section I have included some small hints and advices for the improving of the quality of plots and for the demonstration of some non-trivial features of MathGL library. In contrast to previous examples I showed mostly the idea but not the whole drawing function. More examples with the source code can be find at @uref{http://mathgl.sf.net/} or in section @ref{Samples}. -+ -+@menu -+* ``Compound'' graphics:: -+* Two axes in one plot:: -+* Titles for the plot:: -+* Changing of the color range:: -+* Management of the point cutting:: -+* Vector field visualization:: -+* Several light sources:: -+* CutMin and CutMax features:: -+* Mapping visualization:: -+* Log-scaled plot:: -+* ``Templates'':: -+* Nonlinear fitting hints:: -+* PDE solving hints:: -+* MGL parser using:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node ``Compound'' graphics, Two axes in one plot, , Hints -+@subsection ``Compound'' graphics -+ -+As I noted above, MathGL functions (except the special one, like Clf()) do not erase the previous plotting but just add the new one. It allows one to draw ``compound'' plots easily. For example, popular Matlab command @code{surfc} can be emulated in MathGL by 2 calls: -+@verbatim -+ Surf(a); -+ Cont(a, 0, 7, -1); // draw contours at z = -1 -+@end verbatim -+Here @var{a} is 2-dimensional data for the plotting, @code{-1} is the value of z-coordinate at which the contour should be plotted (at the bottom in this example). Analogously, one can draw density plot instead of contour lines and so on. -+ -+Another nice plot is contour lines plotted directly on the surface: -+@verbatim -+ Light(true); // switch on light for the surface -+ Surf(a, "BbcyrR"); // select 'jet' colormap for the surface -+ Cont(a, "y"); // and yellow color for contours -+@end verbatim -+The possible difficulties arise in black&white case, when the color of the surface can be close to the color of a contour line. In that case I may suggest the following code: -+@verbatim -+ Light(true); // switch on light for the surface -+ Surf(a, "kw"); // select 'gray' colormap for the surface -+ CAxis(-1,0); // first draw for darker surface colors -+ Cont(a, "w"); // white contours -+ CAxis(0,1); // now draw for brighter surface colors -+ Cont(a, "k"); // black contours -+ CAxis(-1,1); // return color range to original state -+@end verbatim -+The idea is to divide the color range on 2 parts (dark and bright) and to select the contrasting color for contour lines for each of part. -+ -+Similarly, one can plot flow thread over density plot of vector field amplitude (this is another amusing plot from Matlab) and so on. The list of compound graphics can be prolonged but I hope that the general idea is clear. -+ -+@c ------------------------------------------------------------------ -+@node Two axes in one plot, Titles for the plot, ``Compound'' graphics, Hints -+@subsection Two axes in one plot -+ -+Developing the previous hint one can make a plot with 2 or more axes. The idea is that the change of settings does not influence on the already drawn graphics. So, for 2-axes plot let us set the first axis and draw everything concerning it. Then let us setup the second axis and draw things for the second axis. The corresponding code is (@pxref{2-axes sample}): -+@verbatim -+ // set up first axis -+ Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,-1,-1)); -+ Axis(); // draw it -+ Plot(y1,"b"); // draw something in first axis -+ // set up second axis -+ Axis(mglPoint(0,0,0),mglPoint(1,1,1),mglPoint(1,1,1)); -+ Axis(); // draw it -+ Stem(y2,"r"); // draw something in second axis -+@end verbatim -+Note, that the first and the second axes look better if being placed in different corners. In the code presented above the first axis is placed in the left-bottom corner, and the second one is placed in the right-top corner. -+ -+@c ------------------------------------------------------------------ -+@node Titles for the plot, Changing of the color range, Two axes in one plot, Hints -+@subsection Titles for the plot -+ -+The printing of nice titles for the plot is not so trivial task in general case. The problem is that the rotation and aspect change lead to different looks for titles of different subplots. So, the resulting look is not so good as it could be. The solution is simple -- to print titles exactly after @code{SubPlot}() call and before any rotation, aspect change and so on! Analogously, the title for the whole picture looks better if it is printed first (before any @code{SubPlot()} calls). Alternatively you can use function @code{Title()} for plotting title for the picture at any time. -+ -+@c ------------------------------------------------------------------ -+@node Changing of the color range, Management of the point cutting, Titles for the plot, Hints -+@subsection Changing of the color range -+ -+By default (for the user comfort), the color range is set equal to z-range of the plot. However, there are different ranges. So, one can obtain amusing plot by the change of color range manually. For example, there are plots with one-color bottom (or top) or practically bi-color picture and so on. -+ -+For example, compare 2 surfaces: -+@verbatim -+ SubPlot(2,1,0) -+ Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,-1,-1)); -+ Surf(a); // usual coloring range -+ SubPlot(2,1,1) -+ CAxis(0,1); -+ Surf(a); // bottom of the surface have one-colour filling -+@end verbatim -+ -+@c ------------------------------------------------------------------ -+@node Management of the point cutting, Vector field visualization, Changing of the color range, Hints -+@subsection Management of the point cutting -+ -+Sometimes an experimental or numerical surface has outstanding points. Visualization of such surface will lead to the hole(s) in place of such points. The standard method of ``fighting'' -- to change data values -- is not always good and is not so convenient. MathGL library has another method -- to set variable @code{Cut=false}. As a consequence, all outstanding points will be projected on the bounding box. -+ -+Such method is good not only for outstanding points but also for the case when one need to plane the bottom or the top of the plot. Exactly such case is demonstrated in the code: -+@verbatim -+ mglData a(20,30); // create some data -+ a.a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ // set lower border above the data minimal value -+ Axis(mglPoint(-1,-1,0),mglPoint(1,1,1)); -+ Cut = false; // set off cutting flag -+` Surf(a); // and draw the surface -+@end verbatim -+It is an interesting result, is not it? -+ -+@c ------------------------------------------------------------------ -+@node Vector field visualization, Several light sources, Management of the point cutting, Hints -+@subsection Vector field visualization -+ -+Vector field visualization (especially in 3d case @code{Vect3} or @code{VectC}) may look tangly -- there are too many overlapping lines. I may suggest 2 ways to solve this problem. The first one is to change @code{MeshNum} for decreasing the number of hachures. The second way is to use the flow thread chart @code{Flow}. Unfortunately, I don't know any other methods to visualize 3d vector field. If you know any, e-mail me and I shall add it to MatGL. -+ -+@c ------------------------------------------------------------------ -+@node Several light sources, CutMin and CutMax features, Vector field visualization, Hints -+@subsection Several light sources -+ -+In contrast to the most of other programs, MathGL supports several (up to 10) light sources. Moreover, the color each of them can be different: white (this is usual), yellow, red, cyan, green and so on. The use of several light sources may be interesting for the highlighting of some peculiarities of the plot or just to make an amusing picture. Note, each light source can be switched on/off individually (@pxref{Several light sample}). -+ -+@c ------------------------------------------------------------------ -+@node CutMin and CutMax features, Mapping visualization, Several light sources, Hints -+@subsection CutMin and CutMax features -+ -+MathGL library has a feature for cutting of points in some region @var{CutMin*CutMax}. Such an excision can be used to improve the look of the graphics. Moreover, this cutting may help to show an internal structure of an object (like @code{isocaps} plot in Matlab). For example, let us use the standard 3D data array and show its interior (@pxref{CutMinMax sample}). -+ -+@verbatim -+ mglData c(61,51,40); // create the data -+ mglData v(10); v.Fill(-0.5,1); -+ c.Modify("(-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1))"); -+ gr->CutMin = mglPoint(0,-1,-1); gr->CutMax = mglPoint(1,0,1.1); -+ gr->Surf3(-0.5,c,"BbcyrR"); -+ gr->ContF3(v,c,'x',-1,"BbcyrR"); gr->ContF3(v,c,'y',-1,"BbcyrR"); -+ gr->ContF3(v,c,'z',0,"BbcyrR"); gr->ContF3(v,c,'z',39,"BbcyrR"); -+@end verbatim -+ -+One can also exclude points from arbitrary area in space. This area defined by textual formula @code{CutOff()} (@pxref{Cutting}). The algorithm is the same as shown for ``rectangular cutting''. -+ -+@c ------------------------------------------------------------------ -+@node Mapping visualization, Log-scaled plot, CutMin and CutMax features, Hints -+@subsection Mapping visualization -+ -+Sometime ago I worked with mapping and have a question about its visualization. Let me remember you that mapping is some transformation rule for one set of number to another one. The 1d mapping is just an ordinary function -- it takes a number and transforms it to another one. The 2d mapping (which I used) is a pair of functions which take 2 numbers and transform them to another 2 ones. Except general plots (like @code{SurfC}, @code{SurfA}) there is a special plot -- Arnold diagram. It shows the area which is the result of mapping of some initial area (usually square). -+ -+I tried to make such plot in @code{Map}. It shows the set of points or set of faces, which final position is the result of mapping. At this, the color gives information about their initial position and the height describes Jacobian value of the transformation. Unfortunately, it looks good only for the simplest mapping but for the real multivalent quasi-chaotic mapping it produces a confusion. So, use it if you like :). -+ -+@c ------------------------------------------------------------------ -+@node Log-scaled plot, ``Templates'', Mapping visualization, Hints -+@subsection Log-scaled plot -+ -+Log-scaled plot can be drawn by 2 steps. First, one should change the scale of axis by call @code{Axis("lg(x)", "lg(y)", 0);} (in this example, x- and y-axis will be log-scaled). Second, one should set logarithmic scale for axis ticks by changing variables: @code{SetTicks('x',0); SetTicks('y',0);}. Finally, one should check (or change) the axis ranges and origin so that their values to be positive. For example of log-log plot @pxref{Log-log sample}. -+ -+@c ------------------------------------------------------------------ -+@node ``Templates'', Nonlinear fitting hints, Log-scaled plot, Hints -+@subsection ``Templates'' -+ -+As I have noted before, the change of settings will influence only for the further plotting commands. This allows one to create template function which will contain settings and primitive drawing for often used plots. Correspondingly one may call this template-function for drawing simplification. -+ -+For example, let one has a set of points (experimental or numerical) and wants to compare it with theoretical law (for example, with exponent law @math{\exp(-x/2), x \in [0, 20]}). The template-function for this task is: -+@verbatim -+ void template(mglGraph *gr) -+ { -+ mglData law(100); // create the law -+ law.Modify("exp(-10*x)"); -+ gr->Axis(mglPoint(0,0.0001), mglPoint(20,1), mglPoint(0,0.0001)); -+ gr->Axis(0,"lg(y)",0); gr->dy = 0; -+ gr->Plot(law,"r2"); -+ gr->Text(mglPoint(10,0.2),"Theoretical law: e^x","rL"); -+ gr->Label('x',"x val."); gr->Label('y',"y val."); -+ gr->Axis(); gr->Grid("xy","g;"); gr->Box(); -+ } -+@end verbatim -+At this, one will only write a few lines for data drawing: -+@verbatim -+ template(gr); // apply settings and default drawing from template -+ mglData dat("fname.dat"); // load the data -+ // and draw it (suppose that data file have 2 columns) -+ gr->Plot(dat.SubData(0),dat.SubData(1),"bx "); -+@end verbatim -+A template-function can also contain settings for font, transparency, lightning, color scheme and so on. -+ -+@c ------------------------------------------------------------------ -+@node Nonlinear fitting hints, , ``Templates'', Hints -+@subsection Nonlinear fitting hints -+ -+Nonlinear fitting is rather simple. All that you need is the data to fit, the approximation formula and the list of coefficients to fit (better with its initial guess values). Let me demonstrate it on the following simple example (@pxref{Fitting sample}). First, let us use sin function with some random noise: -+@verbatim -+ mglData rnd(100), idl(50); //data to be fitted and ideal data -+ rnd.Modify("0.4*rnd+0.1+sin(4*pi*x)"); -+ idl.Modify("0.3+sin(4*pi*x)"); -+@end verbatim -+and plot it to see that data we will fit -+@verbatim -+ gr->Axis(mglPoint(-1,-2), mglPoint(1,2)); -+ gr->Plot(rnd, ". "); gr->Plot(idl, "b"); -+ gr->Box(); -+ gr->Text(mglPoint(0,2.2), "initial: y = 0.3+sin(2\pi x)", "C:b", -1); -+@end verbatim -+ -+The next step is the fitting itself. For that let me specify an initial values @var{ini} for coefficients @samp{abc} and do the fitting for approximation formula @samp{a+b*sin(c*x)} -+@verbatim -+ mglData res; // The data for found formula -+ float ini[3] = {1, 1, 3}; -+ gr->Fit(res, rnd, "a+b*sin(c*x)", "abc", ini); -+@end verbatim -+Now display it -+@verbatim -+ gr->Plot(res, "r"); -+ gr->Text(mglPoint(-1,-1.3), "fitted:", "L:r", -1); -+ gr->PutsFit(mglPoint(0,-1.8), "y = ", "C:r", -1); -+@end verbatim -+ -+NOTE! the fitting results may have strong dependence on initial values for coefficients due to algorithm features. The problem is that in general case there are several local "optimums" for coefficients and the program returns only first found one! There are no guaranties that it will be the best. Try for example to set @code{ini[3] = @{0, 0, 0@}} in the code above. -+ -+@c ------------------------------------------------------------------ -+@node PDE solving hints, MGL parser using, Nonlinear fitting hints, Hints -+@subsection PDE solving hints -+ -+Solving of Partial Differential Equations (PDE, including beam tracing) and ray tracing (or finding particle trajectory) are more or less common task. So, MathGL have several functions for that. There are @code{mglRay()} for ray tracing, @code{mglPDE()} for PDE solving, @code{mglQO2d()} for beam tracing in 2D case (@pxref{Global functions}). Note, that these functions take ``Hamiltonian'' or equations as string values. And I don't plan now to allow one to use user-defined functions. There are 2 reasons: the complexity of corresponding interface; and the basic nature of used methods which are good for samples but may not good for serious scientific calculations. -+ -+The ray tracing can be done by @code{mglRay()} function. Really ray tracing equation is Hamiltonian equation for 3D space. So, the function can be also used for finding a particle trajectory (i.e. solve Hamiltonian ODE) for 1D, 2D or 3D cases. The function have a set of arguments. First of all, it is Hamiltonian which defined the media (or the equation) you are planning to use. The Hamiltonian is defined by string which may depend on coordinates @samp{x}, @samp{y}, @samp{z}, time @samp{t} (for particle dynamics) and momentums @samp{p}=@math{p_x}, @samp{q}=@math{p_y}, @samp{v}=@math{p_z}. Next, you have to define the initial conditions for coordinates and momentums at @samp{t}=0 and set the integrations step (default is 0.1) and its duration (default is 10). The Runge-Kutta method of 4-th order is used for integration. -+@verbatim -+ mglData r,a,re(128),im(128); -+ r = mglRay("p^2+q^2-x-1", mglPoint(-0.7, -1), mglPoint(0, 0.5)); -+ gr->Plot(r.SubData(0), r.SubData(1)); -+@end verbatim -+This example calculate the reflection from linear layer (media with Hamiltonian @samp{p^2+q^2-x-1}=@math{p_x^2+p_y^2-x-1}). This is parabolic curve. The resulting array have 7 columns which contain data for @{x,y,z,p,q,v,t@}. -+ -+The solution of PDE is a bit more complicated. As previous you have to specify the equation as pseudo-differential operator @math{\hat H(x, \nabla)} which is called sometime as ``Hamiltonian'' (for example, in beam tracing). As previously, it is defined by string which may depend on coordinates @samp{x}, @samp{y}, @samp{z} (but not time!), momentums @samp{p}=@math{(d/dx)/i k_0}, @samp{q}=@math{(d/dy)/i k_0} and field amplitude @samp{u}=@math{|u|}. The evolutionary coordinate is @samp{z} in all cases. So that, the equation look like @math{du/dz = ik_0 H(x,y,\hat p, \hat q, |u|)[u]}. Dependence on field amplitude @samp{u}=@math{|u|} allows one to solve nonlinear problems too. For example, for nonlinear Shrodinger equation you may set @code{ham="p^2 + q^2 - u^2"}. Also you may specify imaginary part for wave absorption, like @code{ham = "p^2 + i*x*(x>0)"}, but only if dependence on variable @samp{i} is linear (i.e. @math{H = Hre+i*Him}). -+ -+Next step is specifing the initial conditions at @samp{z}=@code{Min.z}. The function need 2 arrays for real and for imaginary part. Note, that coordinates x,y,z are supposed to be in specified range [Min, Max]. So, the data arrays should have corresponding scales. Finally, you may set the integration step and paramter k0=@math{k_0}. Also keep in mind, that internally the 2 times large box is used (for suppressing numerical reflection from boundaries) and the equation should well defined even in this extended range. -+ -+Final comment is concerning the possible form of pseudo-differential operator @math{H}. At this moment, simplified form of operator @math{H} is supported -- all ``mixed'' terms (like @samp{x*p}->x*d/dx) are excluded. For example, in 2D case this operator is effectively @math{H = f(p,z) + g(x,z,u)}. However commutable combinations (like @samp{x*q}->x*d/dy) are allowed for 3D case. -+ -+So, for example let solve the equation for beam deflected from linear layer and absorbed later. The operator will have the form @samp{"p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)"} that correspond to equation @math{ik_0 \partial_z u + \Delta u + x \cdot u + i (x+z)/2 \cdot u = 0}. This is typical equation for Electron Cyclotron (EC) absorption in magnetized plasmas. For initial conditions let me select the beam with plane phase front @math{exp(-48*(x+0.7)^2)}. The corresponding code looks like this (@pxref{PDE sample}): -+@verbatim -+ mglData a,re(128),im(128); -+ re.Fill("exp(-48*(x+0.7)^2)", gr->Min, gr->Max); -+ a = mglPDE("p^2+q^2-x-1+i*0.5*(z+x)*(z>-x)", re, im, -+ gr->Min, gr->Max, 0.01, 30); -+ a.Transpose("yxz"); -+ gr->CAxis(0, 1); -+ gr->Dens(a,"wyrRk"); -+@end verbatim -+ -+The last example is example of beam tracing. Beam tracing equation is special kind of PDE equation written in coordinates accompanied to a ray. Generally this is the same parameters and limitation as for PDE solving but the coordinates are defined by the ray and by parameter of grid width @var{w} in direction transverse the ray. So, you don't need to specify the range of coordinates. @strong{BUT} there is limitation. The accompanied coordinates are well defined only for smooth enough rays, i.e. then the ray curvature @math{K} (which is defined as @math{1/K^2 = (|\ddot r|^2 |\dot r|^2 - (\ddot r, \dot r)^2)/|\dot r|^6}) is much large then the grid width: @math{K>>w}. So, you may receive incorrect results if this condition will be broken. -+ -+You may use following code for obtaining the same solution as in previous example: -+@verbatim -+ mglData r, xx, yy, a, im(128), re(128); -+ const char *ham = "p^2+q^2-x-1+i*0.5*(y+x)*(y>-x)"; -+ r = mglRay(ham, mglPoint(-0.7, -1), mglPoint(0, 0.5), 0.02, 2); -+ // now start beam tracing -+ re.Fill("exp(-48*x^2)", gr->Min, gr->Max); -+ a = mglQO2d(ham, re, im, r, 1, 30, &xx, &yy); -+ gr->CAxis(0, 1); -+ gr->Dens(xx, yy, a, "wyrRk"); -+@end verbatim -+ -+ -+@c ------------------------------------------------------------------ -+@node MGL parser using, , PDE solving hints, Hints -+@subsection MGL parser using -+ -+Sometimes you may prefer to use MGL scripts in yours code. It is simpler (especcially in comparison with C/Fortran interfaces) and fast way to plot the data with annotations, labels and so on. Class @code{mglParse} (@pxref{mglParse class} parse MGL scripts in C++. It have also the corresponding interface for C/Fortran (@pxref{MGL parsing (Pure C)}). -+ -+The key function here is @code{mglParse::Parse()} (or @code{mgl_parse()} for C/Fortran) which execute one command per string. At this the detailed information about the possible errors or warnings is passed as function value. Or you may execute the whole script as long string with lines separated by @samp{\n}. Functions @code{mglParse::Execute()} and @code{mgl_parse_text()} perform it. Also you may set the values of paramters @samp{$0}...@samp{$9} for the script by functions @code{mglParse::AddParam()} or @code{mgl_add_param()}, allow/disable picture resizing, check ``once'' status and so on. The usage is rather stright-forward. -+ -+The only non-obvious thing is data transition between script and yours program. There are 2 stages: add or find variable; and set data to variable. In C++ you may use functions @code{mglParse::AddVar()} and @code{mglParse::FindVar()} which return pointer to @code{mglVar} structure. This structure contain data itself, the variable name and callback function which will be called if variable destroied. Last feature allows you to control the presence of the variable and, for example, close a window with data if this variable is destroyed. In C/Fortran the corresponding functions are @code{mgl_add_var()}, @code{mgl_find_var()}. But these functions return the data array only. Note, you @strong{must not delete or free} the data obtained from these functions! -+ -+So, some simple example at the end. Here I define a data array, create variable, put data into it and plot it. The C++ code looks like this: -+@verbatim -+ float a[100]; // let a_i = sin(4*pi*x), x=0...1 -+ for(int i=0;i<100;i++) a[i]=sin(4*M_PI*i/99); -+ mglParse *parser = new mglParse; -+ mglData &d = (parser->AddVar("dat"))->d; -+ d.Set(a,100); // set data to variable -+ parser->Execute(gr, "plot dat; xrange 0 1\nbox\naxis"); -+ // you may break script at any line do something -+ // and continue after that -+ parser->Execute(gr, "xlabel 'x'\nylabel 'y'"); -+ // also you may use cycles or conditions in script -+ parser->Execute(gr, "for $0 -1 1 0.1\nline 0 0 -1 $0 'r'\nnext"); -+ gr->WritePNG("test.png"); // don't forgot to save picture -+@end verbatim -+The code in C/Fortran looks practically the same: -+@verbatim -+ float a[100]; // let a_i = sin(4*pi*x), x=0...1 -+ int i; -+ for(i=0;i<100;i++) a[i]=sin(4*M_PI*i/99); -+ HMPR parser = mgl_create_parser(); -+ HMDT d = mgl_add_var(parser, "dat"); -+ mgl_data_set_float(d,a,100,1,1); // set data to variable -+ mgl_parse_text(gr, parser, "plot dat; xrange 0 1\nbox\naxis"); -+ // you may break script at any line do something -+ // and continue after that -+ mgl_parse_text(gr, parser, "xlabel 'x'\nylabel 'y'"); -+ // also you may use cycles or conditions in script -+ mgl_parse_text(gr, parser, "for $0 -1 1 0.1\nline 0 0 -1 $0 'r'\nnext"); -+ mgl_write_png(gr, "test.png", ""); // don't forgot to save picture -+@end verbatim ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/.directory -@@ -0,0 +1,5 @@ -+[Dolphin] -+Timestamp=2010,8,14,2,50,41 -+ -+[Settings] -+ShowDotFiles=true ---- mathgl-1.10.2.1.orig/texinfo/Makefile.am -+++ mathgl-1.10.2.1/texinfo/Makefile.am -@@ -1,4 +1,4 @@ --SUBDIRS = png . -+SUBDIRS = . - - CLEANFILES = mathgl_en.info mathgl_en.info-1 mathgl_en.info-2 mathgl_en.info-3 \ - mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 -@@ -11,20 +11,32 @@ AM_MAKEINFOFLAGS = --no-validate - - info_TEXINFOS = mathgl_en.texi - mathgl_en_TEXINFOS = \ --example_en.texi gpl-3.0.texi overview_en.texi samples_en.texi \ --class_en.texi fdl.texi data_en.texi \ --core_en.texi gpl-2.0.texi mgl_en.texi -- --info_TEXINFOS += mathgl_ru.texi --mathgl_ru_TEXINFOS = \ --samples_ru.texi class_ru.texi overview_ru.texi appendix_ru.texi \ --data_ru.texi mgl_ru.texi core_ru.texi example_ru.texi fdl.texi \ --gpl-2.0.texi gpl-3.0.texi -+ example_en.texi gpl-3.0.texi overview_en.texi samples_en.texi \ -+ class_en.texi fdl.texi data_en.texi \ -+ core_en.texi gpl-2.0.texi mgl_en.texi -+ -+#Disabled. This throws UTF8 errors on attempt to build, and drops texinfo -+#into interactive mode. -+#info_TEXINFOS += mathgl_ru.texi -+#mathgl_ru_TEXINFOS = \ -+ samples_ru.texi class_ru.texi overview_ru.texi appendix_ru.texi \ -+ data_ru.texi mgl_ru.texi core_ru.texi example_ru.texi fdl.texi \ -+ gpl-2.0.texi gpl-3.0.texi - - mglpng=$(DESTDIR)$(docdir)/png_static - --#install-data-local: install-html install-pdf --install-data-local: install-html -+images = ${shell $(top_builddir)/examples/mgl_example -list} -+png_images = ${images:=.png} -+ -+ -+all-local: png_build -+ -+png_build: -+ $(top_builddir)/examples/mgl_example -+ mv ${png_images} png/ -+ touch mathgl.texi -+ -+install-data-local: install-html install-pdf - mkdir -p $(mglpng) - cp -r $(top_srcdir)/texinfo/png_static/*.png $(mglpng) - -@@ -32,4 +44,10 @@ uninstall-local: - rm -rf $(mglpng) - - #all-local: html pdf --all-local: html -+all-local: html pdf -+ -+html: png_build -+ -+pdf: png_build -+ texi2pdf mathgl_en.texi -+ ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/cint.texi -@@ -0,0 +1,2489 @@ -+@c ------------------------------------------------------------------ -+@node C interface, Python interface, Other classes, Top -+@chapter C interface -+ -+MathGL library have interface for a set of languages. Most of them are based on C interface via SWIG tool. There are Python, Java, Octave, Lisp, C#, Guile, Lua, Modula 3, Ocaml, Perl, PHP, Pike, R, Ruby, Tcl. Also there is Fortran interface which have similar set of functions but slightly different type of arguments (integers instead of pointers). The C interface functions are described in @ref{C interface}. -+@c ++++++++++ -+Some of languages listed above support classes (like Python). So for them the special wrapper was written. These classes and functions are described in @ref{Python interface}. -+@c ++++++++++ -+Finally the special command language MGL was written for faster access to C++ plotting functions. Corresponding scripts can be executed separately (by UDAV, mgl2png, mgl2eps and so on) or from the C++ code (@pxref{mglParse class}). These commands are described in @ref{MGL interface}. -+ -+C interface is base for many other interfaces. It contain pure C functions for most of methods of MathGL classes. In difference from C++ classes, C functions must have argument HMGL (for graphics) and/or HMDT (for data arrays) which specify the object for drawing or manipulating (changing). So, firstly user have to create this object by function @code{mgl_create_*()} and have to delete it after using by function @code{mgl_delete_*()}. -+ -+All C functions are described in header file @code{#include } -+and use variable of types: -+@itemize -+@item -+@code{HMGL} --- Pointer to class @code{mglGraph} (@pxref{MathGL core}). -+@item -+@code{HMDT} --- Pointer to class @code{mglData} (@pxref{mglData class}). -+@item -+@code{HMPR} --- Pointer to class @code{mglParse} (@pxref{mglParse class}).. -+@end itemize -+These variables contain identifiers for graphics drawing objects and for data objects. -+ -+Fortran functions/subroutines have the same names as C functions. However, there is a difference. Variable of types @code{HMGL, HMDT} must be integer with sufficient size (@code{integer*4} for 32-bit operating system or @code{integer*8} for 64-bit operating system). All C functions are subroutines in Fortran which should be called by operator @code{call}. The exceptions are functions which return variables of types @code{HMGL} or @code{HMDT}. These functions should be declared as integer in Fortran code. Also one should keep in mind that strings in Fortran are denoted by @code{'} sign but not @code{"} one. -+ -+For compiling Fortran program you should specify AT&T calling conversion (it is default for gfortran, g77 and so on). The internal difference of AT&T interface from C interface is that the symbol '_' is added at the end of function name, and string length(s) is passed at the end of argument list. For example: -+@itemize -+@item -+C function is -+ -+void mgl_fplot(HMGL graph, const char *fy, const char *stl, int n); -+ -+@item -+AT&T function is -+ -+void mgl_fplot_(uintptr_t *graph, const char *fy, const char *stl, int -+*n, int ly, int ls); -+@end itemize -+ -+@menu -+* Create and delete objects:: -+* MGL parsing (Pure C):: -+* Graphics setup (Pure C):: -+* Axis settings (Pure C):: -+* Transformation matrix (Pure C):: -+* Export to file (Pure C):: -+* Primitives drawing (Pure C):: -+* Text printing (Pure C):: -+* Axis and Colorbar (Pure C):: -+* Legend (Pure C):: -+* 1D plotting (Pure C):: -+* 2D plotting (Pure C):: -+* 3D plotting (Pure C):: -+* Dual plotting (Pure C):: -+* Vector fields (Pure C):: -+* Other plotting (Pure C):: -+* Nonlinear fitting (Pure C):: -+* Frames/Animation (Pure C):: -+* Data import (Pure C):: -+* Data filling (Pure C):: -+* Rearrange data (Pure C):: -+* File I/O (Pure C):: -+* Make another data (Pure C):: -+* Functions on direction (Pure C):: -+* Interpolation (Pure C):: -+* Informational functions (Pure C):: -+* Operators (Pure C):: -+* Global functions (Pure C):: -+@end menu -+ -+@c ################################################################## -+@node Create and delete objects, MGL parsing (Pure C), , C interface -+@section Create and delete objects -+ -+There are several group of functions. -+ -+@itemize -+@item Functions for non-visual ``grapher'' creation: -+@deftypefn {C function} @code{HMGL} mgl_create_graph_gl () -+Create the instance of class mglGraphGL. -+@end deftypefn -+@deftypefn {C function} @code{HMGL} mgl_create_graph_zb (@code{int} width, @code{int} height) -+Create the instance of class mglGraphZB with specified sizes. -+@end deftypefn -+@deftypefn {C function} @code{HMGL} mgl_create_graph_ps (@code{int} width, @code{int} height) -+Create the instance of class mglGraphPS with specified sizes. -+@end deftypefn -+@deftypefn {C function} @code{HMGL} mgl_create_graph_idtf () -+Create the instance of class mglGraphIDTF. -+@end deftypefn -+ -+@item Function for windowed ``grapher'' creation: -+@deftypefn {C function} @code{HMGL} mgl_create_graph_glut (@code{int (*}draw@code{)(HMGL gr, void *p)}, @code{const char *}title, @code{void *}par) -+Create the instance of class mglGraphGLUT and connected GLUT window. Only one GLUT window can be opened at once. Arguments description can be found in @ref{mglGraphAB class}. -+@end deftypefn -+@deftypefn {C function} @code{HMGL} mgl_create_graph_fltk (@code{int (*}draw@code{)(HMGL gr, void *p)}, @code{const char *}title, @code{void *}par) -+Create the instance of class mglGraphFLTK and connected FLTK window. Several windows can be opened at the same time. However user must call @code{mgl_fltk_run()} function to start the message handling circle. Arguments description can be found in @ref{mglGraphAB class}. Note, that @var{draw} can be @code{NULL} for displaying static bitmaps only (no animation or slides). -+@end deftypefn -+@deftypefn {C function} @code{HMGL} mgl_create_graph_qt (@code{int (*}draw@code{)(HMGL gr, void *p)}, @code{const char *}title, @code{void *}par) -+Create the instance of class mglGraphQT and connected Qt window. Several windows can be opened at the same time. However user must call @code{mgl_qt_run()} function to start the message handling circle. Arguments description can be found in @ref{mglGraphAB class}. Note, that @var{draw} can be @code{NULL} for displaying static bitmaps only (no animation or slides). -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_fltk_run () -+Start FLTK message handling cycle. A normal program will end main() function with @code{return mgl_fltk_run();}. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_fltk_thread () -+Start FLTK message handling cycle. In difference of @code{mgl_fltk_run()} the loop is started in separate thread so that program continues immediately. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_qt_run () -+Start Qt message handling cycle. A normal program will end main() function with @code{return mgl_qt_run();}. Alternatively user may setup Qt application by direct Qt functions calls. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_qt_thread () -+Start Qt message handling cycle. In difference of @code{mgl_qt_run()} the loop is started in separate thread so that program continues immediately. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_update (@code{HMGL} graph) -+Manually update contents of the window. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_show_mouse_pos (@code{HMGL} graph, @code{int} enable) -+Switch to show or not in the widget the last mouse click position. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_get_last_mouse_pos (@code{HMGL} graph, @code{float *}x, @code{float *}y, @code{float *}z) -+Last position of mouse click. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_calc_xyz (@code{HMGL} graph, @code{int} xs, @code{int} ys, @code{float *}x, @code{float *}y, @code{float *}z) -+Calculate 3D coordinate @{x,y,z@} for screen point @{xs,ys@}. At this moment it ignore perspective and transformation formulas (curvilinear coordinates). The calculation are done for the last used InPlot (@pxref{Transformation matrix}). -+@end deftypefn -+ -+ -+@item Functions for data creation: -+@deftypefn {C function} @code{HMDT} mgl_create_data () -+Create simple instance of class mglData. -+@end deftypefn -+@deftypefn {C function} @code{HMDT} mgl_create_data_size (@code{int} nx, @code{int} ny, @code{int} nz) -+Create instance of class mglData with specified sizes. -+@end deftypefn -+@deftypefn {C function} @code{HMDT} mgl_create_data_file (@code{const char *}fname) -+Create instance of class mglData and fill it by data from text file. -+@end deftypefn -+ -+@item Each created object @strong{must} be deleted after usage by functions: -+@deftypefn {C function} @code{void} mgl_delete_graph (@code{HMGL} graph) -+Delete the instance of class. Must be used after plotting for every created graphical object. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_delete_data (@code{HMDT} dat) -+Delete the instance of class. Must be used after using for every created data object. -+@end deftypefn -+@end itemize -+ -+@c ################################################################## -+@node MGL parsing (Pure C), Graphics setup (Pure C), Create and delete objects, C interface -+@section MGL parsing (Pure C) -+ -+These functions allow one to parse MGL script from the program. -+ -+@deftypefn {C function} @code{HMPR} mgl_create_parser () -+Create parser. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_delete_parser (@code{HMPR} p) -+Delete parser -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_add_param (@code{HMPR} p, @code{int} id, @code{const char *}val) -+@deftypefnx {C function} @code{void} mgl_add_paramw (@code{HMPR} p, @code{int} id, @code{const wchar_t *}val) -+Add script parameter @var{id} with value @var{val} (used in string as '\$0','\$1' \ldots '\$9'). -+@end deftypefn -+@deftypefn {C function} @code{const HMDT} mgl_add_var (@code{HMPR} p, @code{const char *}name) -+Add variable with @var{name} if it is not exists. Return the created or found variable. @strong{NOTE!!!} You must not delete obtained data arrays. Use this function to put external data array to the script or get the data from the script. -+@end deftypefn -+@deftypefn {C function} @code{const HMDT} mgl_find_var (@code{HMPR} p, @code{const char *}name) -+Find variable with @var{name} and return it (or @code{NULL} if variable is absent). @strong{NOTE!!!} You must not delete obtained data arrays. Use this function to put external data array to the script or get the data from the script. -+@end deftypefn -+@deftypefn {C function} @code{int} mgl_parse (@code{HMGL} gr, @code{HMPR} p, @code{const char *}str, @code{int} pos) -+@deftypefnx {C function} @code{int} mgl_parsew (@code{HMGL} gr, @code{HMPR} p, @code{const wchar_t *}str, @code{int} pos) -+Parse and draw (using @var{gr}) the string @var{str} with MGL commands. Returns the value depending on an error presence in the string str: 0 - no error, 1 - wrong command argument(s), 2 - unknown command, 3 - string is too long. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_parse_text (@code{HMGL} gr, @code{HMPR} p, @code{const char *}text) -+@deftypefnx {C function} @code{void} mgl_parsew_text (@code{HMGL} gr, @code{HMPR} p, @code{const wchar_t *}text) -+Function parse and execute line-by-line MGL script in string @var{text}. Lines are separated by @samp{\n} symbol as usual. If @var{error} is not @code{NULL} then this function will be called for all warnings, information and other messages. Also this function support the @code{for|next} MGL commands. -+@end deftypefn -+ -+ -+ -+@deftypefn {C function} @code{void} mgl_restore_once (@code{HMPR} p) -+Restore 'once' state (for data reloading on next parsing). -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_parser_allow_setsize (@code{HMPR} p, @code{int} a) -+Allow to parse 'setsize' command or not. -+@end deftypefn -+ -+@c ################################################################## -+@node Graphics setup (Pure C), Transformation matrix (Pure C), MGL parsing (Pure C), C interface -+@section Graphics setup (Pure C) -+ -+Functions and variables in this group influences on overall graphics appearance. So all of them should be placed @emph{before} any actual plotting function calls. -+ -+@deftypefn {mglGraph (C function)} @code{void} mgl_set_def_param (@code{HMGL} gr) -+Restore initial values for all of parameters except described in @ref{Zooming}. -+@end deftypefn -+ -+@menu -+* Transparency (Pure C):: -+* Lighting (Pure C):: -+* Fog (Pure C):: -+* Default sizes (Pure C):: -+* Zooming (Pure C):: -+* Cutting (Pure C):: -+* Font settings (Pure C):: -+* Palette and colors (Pure C):: -+* Other settings (Pure C):: -+@end menu -+ -+@c ================================================================== -+@node Transparency (Pure C), Lighting (Pure C), , Graphics setup (Pure C) -+@subsection Transparency (Pure C) -+@cindex Alpha -+@cindex AlphaDef -+@cindex Transparent -+@cindex TranspType -+ -+There are several functions for setup transparency. The general function is @code{Alpha()} which switch on/off the transparency for overall plot. It influence only for graphics which created after @code{Alpha()} call. Variable @code{AlphaDef} specify the default value of alpha-channel. You may switch off transparency of selected plot by variable @code{Transparent}. Finally, variable @code{TranspType} set the kind of transparency. @sref{Transparent surface sample} -+ -+@deftypefn {C function} @code{void} mgl_set_alpha (@code{HMGL} gr, @code{int} enable) -+Sets the transparency on/off. It is recommended to call this function before any plotting command. Default value is transparency off. Use @code{mgl_set_transp(false)} in particular plot to disable its transparency. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_alpha_default (@code{HMGL} gr, @code{float} alpha) -+Default value of alpha channel (transparency) for all plotting functions. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_transp (@code{HMGL} gr, @code{int} enable) -+Temporary switches transparency on/off for the plot. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_transp_type (@code{HMGL} gr, @code{int} enable) -+This variable set the transparency type. Normal transparency (@samp{0}) -- below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces. Glass-like transparency (@samp{1}) -- below and upper things are commutable and just decrease intensity of light by RGB channel. Lamp-like transparency (@samp{2}) -- below and upper things are commutable and are the source of some additional light. I recommend to set @code{mgl_set_alpha_default(0.3)} or less for lamp-like transparency. -+@end deftypefn -+ -+@c ================================================================== -+@node Lighting (Pure C), Fog (Pure C), Transparency (Pure C), Graphics setup (Pure C) -+@subsection Lighting (Pure C) -+@cindex Light -+@cindex Ambient -+ -+There are several functions for setup lighting. The general function is @code{mgl_set_light()} which switch on/off the lighting for overall plot. It influence only for graphics which created after @code{mgl_set_light()} call. Generally MathGL support up to 10 independent light sources. But in OpenGL mode only 8 of light sources is used due to OpenGL limitations. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number @code{0} with white color, located at top of the plot. -+ -+@deftypefn {C function} @code{void} mgl_set_light (@code{HMGL} gr, @code{int} enable) -+Sets the using of light on/off for overall plot. It is recommended to call this function before any plotting command. Default value is lightning off. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_set_light_n (@code{HMGL} gr, @code{int} n, @code{int} enable) -+Switch on/off @var{n}-th light source separately. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_add_light (@code{HMGL} gr, @code{int} n, @code{float} x, @code{float} y, @code{float} z, @code{char} c) -+@deftypefnx {C function} @code{void} mgl_add_light_rgb (@code{HMGL} gr, @code{int} n, @code{float} x, @code{float} y, @code{float} z, @code{int} infty, @code{float} r, @code{float} g, @code{float} b, @code{float} i) -+The function adds a light source with identification @var{n} at position @{@var{x}, @var{y}, @var{z}@}. The color of light is defined by character @var{c} or by RGB values @{@var{r}, @var{g}, @var{b}@}. The brightness of light is @var{i} which must be in range [0,1]. Flag @var{infty}=@code{true} puts the source to infinite distance (for the faster drawing). It is recommended to call this function before any plotting command. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_ambbr (@code{HMGL} gr, @code{float} bright) -+Sets the brightness of ambient light. The value should be in range [0,1]. Initial value is @code{0.5}. It is recommended to call this function before any plotting command. -+@end deftypefn -+ -+@c ================================================================== -+@node Fog (Pure C), Default sizes (Pure C), Lighting (Pure C), Graphics setup (Pure C) -+@subsection Fog (Pure C) -+@cindex Fog -+ -+@deftypefn {C function} @code{void} mgl_set_fog (@code{HMGL} gr, @code{float} d, @code{float} dz) -+Function imitate a fog in the plot. Fog start from relative distance @var{dz} from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-@emph{d*z}). Here @emph{z} is normalized to 1 depth of the plot. If value @var{d}=@code{0} then the fog is absent. @sref{Surface in fog sample} -+@end deftypefn -+ -+@c ================================================================== -+@node Default sizes (Pure C), Zooming (Pure C), Fog (Pure C), Graphics setup (Pure C) -+@subsection Default sizes (Pure C) -+@cindex BarWidth -+@cindex MarkSize -+@cindex ArrowSize -+@cindex BaseLineWidth -+@cindex SetTickLen -+@cindex SetTickStl -+ -+These functions control the default (initial) values for most graphics parameters including sizes of markers, arrows, linewidth and so on. As any other settings these ones will influence only on plots created after the settings change. -+ -+@deftypefn {C function} @code{void} mgl_set_bar_width (@code{HMGL} gr, @code{float} val) -+Relative width of rectangles in Bars plot. Default value is @code{0.7}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_mark_size (@code{HMGL} gr, @code{float} val) -+The size of marks for @ref{1D plotting (Pure C)}. Default value is @code{0.02}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_arrow_size (@code{HMGL} gr, @code{float} val) -+The size of arrows for @ref{1D plotting (Pure C)}, lines and curves. Default value is @code{0.03}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_base_line_width (@code{HMGL} gr, @code{float} val) -+The variable define the base width for all lines. The value <1 is ignored. Increase of this variables is actual for large bitmap pictures. Default value is @code{1}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_tick_len (@code{HMGL} gr, @code{float} val, @code{float} stt) -+The relative length of axis ticks. Default value is @code{0.1}. Parameter @var{stt}>0 set relative length of subticks which is in @code{sqrt(1+stt)} times smaller. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_tick_stl (@code{HMGL} gr, @code{const char *}stl, @code{const char *}sub) -+The line style of axis ticks (@var{stl}) and subticks (@var{sub}). If @var{stl} is empty then default style is used (@samp{k} or @samp{w} depending on transparency type). If @var{sub} is empty then ticks style is used (i.e. @var{stl}). -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Zooming (Pure C), Cutting (Pure C), Default sizes (Pure C), Graphics setup (Pure C) -+@subsection Zooming (Pure C) -+@cindex PlotFactor -+@cindex AutoPlotFactor -+@cindex Zoom -+ -+These functions control the overall zooming of the picture or the sub-picture. Normally you can use these variables and functions for removing ``white'' spaces around a plot. -+ -+@deftypefn {C function} @code{void} mgl_set_plotfactor (@code{HMGL} gr, @code{float} val) -+Sets the factor of plot size. It is not recommended to set it lower then 1.6. This is some anlogue of function Zoom() but applied not to overall image but for each InPlot. Use negative value to enable automatic @code{PlotFactor} selection. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_zoom (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} x2, @code{float} y2) -+Changes the scale of graphics that correspond to zoom in/out of the picture. After function call the current plot will be cleared and further the picture will contain plotting from its part [x1,x2]*[y1,y2]. Here picture coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} changes from 0 to 1. Use @code{Zoom(0,0,1,1)} to return default view. -+@end deftypefn -+ -+@c ================================================================== -+@node Cutting (Pure C), Font settings (Pure C), Zooming (Pure C), Graphics setup (Pure C) -+@subsection Cutting (Pure C) -+@cindex Cut -+@cindex CutMin -+@cindex CutMax -+@cindex CutOff -+ -+These functions set the condition when the points are excluded (cutted) from the drawing. -+ -+@deftypefn {C function} @code{void} mgl_set_cut (@code{HMGL} gr, @code{int} val) -+Determines how points outside bounding box are drawn. If it is @code{true} then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_cut_box (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2) -+Lower and upper edge of the box in which never points are drawn. If both edges are the same (the variables are equal) then the cutting box is empty. @sref{CutMinMax sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_cutoff (@code{HMGL} gr, @code{const char *}EqC) -+Function set the cutting off condition by formula @var{EqC}. This condition determine will point be plotted or not. If value of formula is nonzero then point is omitted, otherwise it plotted. Set argument as @code{NULL} to disable cutting off condition. @sref{CutOff sample} -+@end deftypefn -+ -+@c ================================================================== -+@node Font settings (Pure C), Palette and colors (Pure C), Cutting (Pure C), Graphics setup (Pure C) -+@subsection Font settings -+@cindex FontSize (Pure C) -+@cindex FontDef -+@cindex RotatedText -+ -+@deftypefn {C function} @code{void} mgl_set_font_size (@code{HMGL} gr, @code{float} val) -+Sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_font_def (@code{HMGL} gr, @code{const char *} val) -+Sets the font specification (@pxref{Text printing (Pure C)}). Default is ``rC'' -- Roman font centering. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_rotated_text (@code{HMGL} gr, @code{int} val) -+Sets to use or not text rotation along axis. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_load_font (@code{HMGL} gr, @code{const char *}name, @code{const char *}path) -+Load font typeface from @var{path}/@var{name}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_copy_font (@code{HMGL} gr, @code{HMGL} gr_from) -+Copy font data from another HMGL object. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_restore_font (@code{HMGL} gr) -+Restore font data to default typeface. -+@end deftypefn -+ -+@c ================================================================== -+@node Palette and colors (Pure C), Other settings (Pure C), Font settings (Pure C), Graphics setup (Pure C) -+@subsection Pallete (Pure C) -+@cindex Pal -+@cindex NumPal -+@cindex SetPalette -+@cindex SetScheme -+@cindex SelectPen -+ -+@deftypefn {C function} @code{void} mgl_set_palette (@code{HMGL} gr, @code{const char *}@var{colors}) -+Sets the palette as selected colors. Default value is @code{"Hbgrcmyhlnqeup"}. The palette is used mostly in 1D plots (@pxref{1D plotting (Pure C)}) for curves which styles are not specified. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_pal_color (@code{HMGL} gr, @code{int} n, @code{float} r, @code{float} g, @code{float} b) -+Sets color for individual palette entry. Look at @code{mgl_set_palette()} function for simplified palette setting. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_pal_num (@code{HMGL} gr, @code{int} num) -+Sets the number of actual colors in palette. The value must be less then 100. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_scheme (@code{HMGL} gr, @code{const char *}sch) -+Sets the color scheme for following plots. Usually this function is used internally. @xref{Color scheme}. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Other settings (Pure C), , Palette and colors (Pure C), Graphics setup (Pure C) -+@subsection Other settings (Pure C) -+ -+@deftypefn {C function} @code{void} mgl_set_meshnum (@code{HMGL} gr, @code{int} num) -+Sets approximate number of lines in Mesh(), Fall(), Grid() and also the number of hachures in Vect(), VectC(), Dew() and the number of cells in Cloud*(). By default (=0) it draws all lines/hachures/cells. -+@end deftypefn -+ -+@deftypefn {C function} @code{} mgl_set_axial_dir (@code{HMGL} gr, @code{char} dir) -+Sets direction around which curve rotated in Axial() and Torus(). Default value is 'z'. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_draw_face (@code{HMGL} gr, @code{int} val) -+If set to @code{true} then it prevent faces drawing. It is useful for speeding up drawing (for example, during rotation and so on). -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Axis settings (Pure C), Transformation matrix (Pure C), Graphics setup (Pure C), C interface -+@section Axis settings (Pure C) -+ -+These large set of functions control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected if @code{Cut=true} (@pxref{Cutting (Pure C)}), after it transformation formulas are applied, and finally the data was normalized in bounding box. -+ -+@menu -+* Ranges (bounding box) (Pure C):: -+* Transformation (Pure C):: -+* Ticks (Pure C):: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Ranges (bounding box) (Pure C), Transformation (Pure C), , Axis settings (Pure C) -+@subsection Ranges (bounding box) (Pure C) -+@cindex Axis -+@cindex CAxis -+@cindex XRange -+@cindex YRange -+@cindex ZRange -+@cindex Min -+@cindex Max -+@cindex Cmin -+@cindex Cmax -+@cindex Org -+@cindex AutoOrg -+ -+@deftypefn {C function} @code{void} mgl_set_axis_2d (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} x2, @code{float} y2) -+@deftypefnx {C function} @code{void} mgl_set_axis_3d (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2) -+@c @deftypefnx {C function} @code{void} mgl_set_axis (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2, @code{float} x0, @code{float} y0, @code{float} z0) -+Sets maximal and minimal values for coordinate range (bounding box). If minimal and maximal values of the coordinate are the same or a variable is absent in the list of arguments then they are ignored. This function also sets @var{Cmin}=@var{z1} and @var{Cmax}=@var{z2}. This is default color range for 2d plots. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_caxis (@code{HMGL} gr, @code{float} c1, @code{float} c2) -+Sets values for color range. This values are used later for determining the color of the surface. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_xrange (@code{HMGL} gr, @code{const HMDT} a, @code{int} add) -+Sets values of x-range as minimal and maximal values of data @var{a}. See also mgl_set_axis(). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_yrange (@code{HMGL} gr, @code{const HMDT} a, @code{int} add) -+Sets values of y-range as minimal and maximal values of data @var{a}. See also mgl_set_axis(). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_zrange (@code{HMGL} gr, @code{const HMDT} a, @code{int} add) -+Sets values of z-range as minimal and maximal values of data @var{a}. See also mgl_set_axis(). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_crange (@code{HMGL} gr, @code{const HMDT} a, @code{int} add) -+Sets values of color range as minimal and maximal values of data @var{a}. See also mgl_set_caxis(). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_origin (@code{HMGL} gr, @code{float} x0, @code{float} y0, @code{float} z0) -+Sets center of axis cross section. If one of values is NAN then MathGL library try to select optimal axis position. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_auto (@code{HMGL} gr, @code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2, @code{float} z1, @code{float} z2) -+Sets ranges for automatic variables of plots. It act as changing of @var{Min}, @var{Max} proprties without calling of RecalcBorder(). Function don't change the direction if minimal and maximal values are the same. For example, if y@var{y1}=@var{y2} then ranges along y-direction will not be changed (will be used previous one). Note that the automatic range become axis range after next call of [XYZ]Range() function(s). -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Transformation (Pure C), Ticks (Pure C), Ranges (bounding box) (Pure C), Axis settings (Pure C) -+@subsection Transformation (curved coordinates, Pure C) -+@cindex Axis -+@cindex Ternary -+ -+@deftypefn {C function} @code{void} mgl_set_func (@code{HMGL} gr, @code{const char *}EqX, @code{const char *}EqY, @code{const char *}EqZ) -+Sets the transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for new (real) coordinate depending on old (input) coordinates x, y, z. For example, the cylindrical coordinates are introduced as @code{mgl_set_func("x*cos(y)", "x*sin(y)", "z");}. For removing of formulas the corresponding parameter should be @code{NULL}. Using transformation formulas will slightly slowing the program, i.e. @code{mgl_set_func(NULL, NULL, NULL)} is faster than @code{mgl_set_func("x", "y", "z")}. @xref{mglFormula class}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_coor (@code{HMGL} gr, @code{int} how) -+Sets one of the predefined transformation formulas for curvilinear coordinate. Paramater @var{how} define the coordinates: @code{mglCartesian=0} -- Cartesian coordinates (no transformation); @code{mglPolar=1} -- Polar coordiantes @math{x_n=x*cos(y),y_n=x*sin(y), z_n=z}; @code{mglSpherical=2} -- Sperical coordinates @math{x_n=x*sin(y)*cos(z), y_n=x*sin(y)*sin(z), z_n=x*cos(y)}; @code{mglParabolic=3} -- Parabolic coordinates @math{x_n=x*y, y_n=(x*x-y*y)/2, z_n=z}; @code{mglParaboloidal=4} -- Paraboloidal coordinates @math{x_n=(x*x-y*y)*cos(z)/2, y_n=(x*x-y*y)*sin(z)/2, z_n=x*y}; @code{mglOblate=5} -- Oblate coordinates @math{x_n=cosh(x)*cos(y)*cos(z), y_n=cosh(x)*cos(y)*sin(z), z_n=sinh(x)*sin(y)}; @code{mglProlate=6} -- Prolate coordinates @math{x_n=sinh(x)*sin(y)*cos(z), y_n=sinh(x)*sin(y)*sin(z), z_n=cosh(x)*cos(y)}; @code{mglElliptic=7} -- Elliptic coordinates @math{x_n=cosh(x)*cos(y), y_n=sinh(x)*sin(y), z_n=z}; @code{mglToroidal=8} -- Toroidal coordinates @math{x_n=sinh(x)*cos(z)/(cosh(x)-cos(y)), y_n=sinh(x)*sin(z)/(cosh(x)-cos(y)), z_n=sin(y)/(cosh(x)-cos(y))}; @code{mglBispherical=9} -- Bispherical coordinates @math{x_n=sin(y)*cos(z)/(cosh(x)-cos(y)), y_n=sin(y)*sin(z)/(cosh(x)-cos(y)), z_n=sinh(x)/(cosh(x)-cos(y))}; @code{mglBipolar=10} -- Bipolar coordinates @math{x_n=sinh(x)/(cosh(x)-cos(y)), y_n=sin(y)/(cosh(x)-cos(y)), z_n=z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_ternary (@code{HMGL} gr, @code{int} tern) -+The function sets to draws Ternary plot. This special plot is for 3 dependent coordinates (components) @var{a}, @var{b}, @var{c} so that @var{a}+@var{b}+@var{c}=1. MathGL uses only 2 independent coordinates @var{a}=x and @var{b}=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on. @sref{Ternary plot sample} -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Ticks (Pure C), , Transformation (Pure C), Axis settings (Pure C) -+@subsection Ticks (Pure C) -+@cindex SetTicks -+@cindex SetTicksVal -+@cindex xtt -+@cindex ytt -+@cindex ztt -+@cindex ctt -+@cindex OrgT -+@cindex TuneTicks -+@cindex AdjustTicks -+ -+@deftypefn {C function} @code{void} mgl_adjust_ticks (@code{HMGL} gr, @code{const char *}dir) -+Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) @var{dir}. Also set @var{TuneTicks}=@code{true}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_ticks_dir (@code{HMGL} gr, @code{char} dir, @code{float} d, @code{int} ns, @code{float} org) -+Set the ticks step @var{d}, number of sub-ticks @var{ns} and initial ticks position @var{org} for the axis along direction @var{dir}. Variable @var{d} set step for axis ticks (if positive) or it's number on the axis range (if negative). Zero value set logarithmic ticks. If @var{org} value is NAN then value from @var{Org} is used. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_ticks_vals (@code{HMGL} gr, @code{char} dir, @code{int} n, @code{float *}val, @code{const char **}lbl) -+@deftypefnx {C function} @code{void} mgl_set_ticks_val (@code{HMGL} gr, @code{char} dir, @code{int} n, @code{double} val, @code{const char *}lbl, ...) -+Set the manual positions @var{val} and its labels @var{lbl} for @var{n}-th ticks along axis @var{dir}. The arrays @var{val} and @var{lbl} have to contain @var{n} elements. Use @code{mgl_set_ticks_dir()} to restore automatic ticks. Note, these functions are not available in Fortran interface. Note, you @strong{have to be} very careful to use floating-point (not integer!!!) values as ticks position due to limitations of stdarg library (argument transfer). @sref{Manual ticks sample} -+@end deftypefn -+ -+ -+@deftypefn {C function} @code{void} mgl_set_ticks (@code{HMGL} gr, @code{float} dx, @code{float} dy, @code{float} dz) -+Step for axis ticks (if positive) or it's number (if negative) in x-,y-,z- directions. Zero value set logarithmic ticks. This function are obsolete -- use @code{mgl_set_ticks_dir()} function instead. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_subticks (@code{HMGL} gr, @code{int} nx, @code{int} ny, @code{int} nz) -+Number of axis subticks in x-,y-,z- directions. This function are obsolete -- use @code{mgl_set_ticks_dir()} function instead. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_tick_origin (@code{HMGL} gr, @code{float} x0, @code{float} y0, @code{float} z0) -+Starting point for ticks. If corresponding value is NAN then value from @var{Org} is used (it is default). This function are obsolete -- use @code{mgl_set_ticks_dir()} function instead. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_xttw (@code{HMGL} gr, @code{const wchar_t *}templ) -+@deftypefnx {C function} @code{void} mgl_set_yttw (@code{HMGL} gr, @code{const wchar_t *}templ) -+@deftypefnx {C function} @code{void} mgl_set_zttw (@code{HMGL} gr, @code{const wchar_t *}templ) -+@deftypefnx {C function} @code{void} mgl_set_cttw (@code{HMGL} gr, @code{const wchar_t *}templ) -+@deftypefnx {C function} @code{void} mgl_set_xtt (@code{HMGL} gr, @code{const wchar_t *}templ) -+@deftypefnx {C function} @code{void} mgl_set_ytt (@code{HMGL} gr, @code{const wchar_t *}templ) -+@deftypefnx {C function} @code{void} mgl_set_ztt (@code{HMGL} gr, @code{const wchar_t *}templ) -+@deftypefnx {C function} @code{void} mgl_set_ctt (@code{HMGL} gr, @code{const wchar_t *}templ) -+The template for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If @var{templ}=@code{NULL} then default template is used (in simplest case it is @samp{%.2g}) with automatic detaching of common multiplier or common component (see @var{TuneTicks}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_tune_ticks (@code{HMGL} gr, @code{int} tune, @code{float} fact_pos) -+Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values) or common component (for narrow range, like from 0.999 to 1.000). Also set the position of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15. -+@end deftypefn -+ -+ -+@c ################################################################## -+@node Transformation matrix (Pure C), Export to file (Pure C), Axis settings (Pure C), C interface -+@section Transformation matrix (Pure C) -+@cindex Aspect -+@cindex Rotate -+@cindex RotateN -+@cindex SubPlot -+@cindex InPlot -+@cindex Identity -+@cindex Perspective -+@cindex ColumnPlot -+ -+These functions control how and where further plotting will be placed. There is a curtain order of calling of these functions for the better plot view. First one should be SubPlot() or InPlot() for specifying the place. After it a Rotate() and Aspect(). And finally any other plotting functions may be called. Alternatevely you can use ColumnPlot() for position plots in the column one by another without gap between plot axis (bounding boxes). -+ -+@deftypefn {C function} @code{void} mgl_subplot (@code{HMGL} gr, @code{int} nx, @code{int} ny, @code{int} m) -+@deftypefnx {C function} @code{void} mgl_subplot_d (@code{HMGL} gr, @code{int} nx, @code{int} ny, @code{int} m, @code{float} dx, @code{float} dy) -+Puts further plotting in a @var{m}-th cell of @var{nx}*@var{ny} grid of the whole frame area. This function set off any aspects or rotations. So it should be used first for creating the subplot. From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size @var{dx}, @var{dy}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_inplot (@code{HMGL} gr, @code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2) -+Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [@var{x1}, @var{x2}]*[@var{y1}, @var{y2}]. The coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} are normalized to interval [0, 1]. This function set off any aspects or rotations. So it should be used first for creating subplot. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_relplot (@code{HMGL} gr, @code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2) -+Puts further plotting in some region of the last SubPlot() or InPlot(). This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [@var{x1}, @var{x2}]*[@var{y1}, @var{y2}]. The coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} are normalized to interval [0, 1]. This function set off any aspects or rotations. So it should be used first for creating subplot. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_rotate (@code{HMGL} gr, @code{float} TetX, @code{float} TetZ, @code{float} TetY) -+Rotates a further plotting relative to each axis (x, z, y) consecutively on angles @var{TetX}, @var{TetZ}, @var{TetY}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_rotate_vector (@code{HMGL} gr, @code{float Tet}, @code{float x}, @code{float y}, @code{float z}) -+Rotates a further plotting around vector @{x,y,z@}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_aspect (@code{HMGL} gr, @code{float} Ax, @code{float} Ay, @code{float} Az) -+Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio @var{Ax:Ay:Az}. For the best effect it should be used after Rotate() function. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_perspective (@code{HMGL} gr, @code{float} a) -+Add (switch on) the perspective to plot. The parameter @math{a ~ 1/z_@{eff@} \in [0,1)}. By default (@code{a=0}) the perspective is off. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_identity (@code{HMGL} gr) -+Clears transformation matrix. This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is equivalent to the call of @code{mgl_inplot(0,1,0,1)}. -+@end deftypefn -+ -+@c ################################################################## -+@node Export to file (Pure C), Primitives drawing (Pure C), Transformation matrix (Pure C), C interface -+@section Export to file (Pure C) -+@cindex WritePNG -+@cindex WriteIDTF -+@cindex WriteSVG -+@cindex WriteBMP -+@cindex WriteEPS -+@cindex WriteJPEG -+@cindex SetSize -+@cindex GetRGBA -+@cindex GetBits -+ -+These functions export current view to a graphic file. The filename @var{fname} should have appropriate extension. Parameter @var{descr} gives the short description of the picture. Just now the transparency is supported in PNG and SVG files. -+ -+@deftypefn {C function} @code{void} mgl_write_frame (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to a file @var{fname} which type is determined by the extension. Parameter @var{descr} adds description to file (can be @code{NULL}). If @var{fname}=@code{NULL} then the file @samp{frame####.jpg} is used, where @samp{####} is current frame id. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_write_png (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+@deftypefnx {C function} @code{void} mgl_write_png_solid (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to PNG file with transparent background. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (can be @code{NULL}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_write_jpg (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to JPEG file with non-transparent background (usually white). Parameter @var{fname} specifies the file name, @var{descr} adds description to file (can be @code{NULL}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_write_gif (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to GIF file with non-transparent background (usually white). Parameter @var{fname} specifies the file name, @var{descr} adds description to file (can be @code{NULL}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_write_bmp (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to BMP file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (can be @code{NULL}). There is no compression used. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_write_eps (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to EPS file. The vector representation is used if possible. So it is not recommended for the export of large data plot. It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (can be @code{NULL}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_write_svg (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to SVG (Scalable Vector Graphics) file. The vector representation is used. In difference of EPS format, SVG format support transparency that allows to correctly draw half-transparent plot (like SurfA(), Surf3A(), Cloud()). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_write_idtf (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr) -+Exports current frame to IDTF file. Later this file can be converted to U3D format. The vector representation is used. So, the output file may be too large for graphic of large data array (especially for surfaces). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_show_image (@code{const char *}viewer, @code{int} nowait) -+Displays the current picture using external program @var{viewer} for viewing. The function save the picture to temporary file and call @var{viewer} to display it. If @var{nowait}=@code{true} then the function return immediately (it will not wait while window will be closed). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_size (@code{HMGL} gr, @code{int} width, @code{int} height) -+Sets size of picture in pixels. This function @strong{must be} called before any other plotting because it completely remove picture contents. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_flush (@code{HMGL} gr) -+Flushes the plotting commands to frame. This function may be useful if one wants to remove array before the finishing of the plot (i.e. before calling @code{Finish()}). Also call of this function separate the objects in mglGraphIDTF. Most of plots call this function internally. -+@end deftypefn -+ -+@deftypefn {C function} @code{int} mgl_get_width (@code{HMGL} gr) -+@deftypefnx {C function} @code{int} mgl_get_height (@code{HMGL} gr) -+Gets width or height of the image. -+@end deftypefn -+ -+@deftypefn {C function} @code{const unsigned char *} mgl_get_rgb (@code{HMGL} gr) -+Gets RGB bitmap of the current state of the image. Format of each element of bits is: @{red, green, blue@}. Number of elements is Width*Height. Position of element @{i,j@} is [3*i + 3*Width*j]. -+@end deftypefn -+ -+@deftypefn {C function} @code{const unsigned char *} mgl_get_rgba (@code{HMGL} gr) -+Gets RGBA bitmap of the current state of the image. Format of each element of bits is: @{red, green, blue, alpha@}. Number of elements is Width*Height. Position of element @{i,j@} is [4*i + 4*Width*j]. -+@end deftypefn -+ -+@c ################################################################## -+@node Primitives drawing (Pure C), Text printing (Pure C), Export to file (Pure C), C interface -+@section Primitives drawing -+@cindex Ball -+@cindex Clf -+@cindex Line -+@cindex Curve -+@cindex Mark -+@cindex FaceX -+@cindex FaceY -+@cindex FaceZ -+@cindex Cone -+@cindex Drop -+@cindex Sphere -+ -+These functions draw some simple objects like line, point, sphere, drop, cone and so on. -+ -+@deftypefn {C function} @code{void} mgl_clf (@code{HMGL} gr) -+@deftypefnx {C function} @code{void} mgl_clf_rgb (@code{HMGL} gr, @code{float} r, @code{float} g, @code{float} b) -+Clear the picture and will it by color @{@var{r},@var{g},@var{b}@} or previous one. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_ball (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z) -+@deftypefnx {C function} @code{void} mgl_ball_rgb (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{float} r, @code{float} g, @code{float} b, @code{float} alpha) -+@deftypefnx {C function} @code{void} mgl_ball_str (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{const char *} col) -+Draws a point (ball) at position @{@var{x}, @var{y}, @var{z}@} with color defined by string @var{col} or by RGBA values @{@var{r}, @var{g}, @var{b}; @var{alpha}@}. Default color is red. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_line (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2, @code{char *}stl, @code{int}num) -+Draws a geodesic line (straight line in Cartesian coordinates) from point @{@var{x1},@var{y1},@var{z1}@} to @{@var{x2},@var{y2},@var{z2}@} using line style @var{stl}. Parameter @var{num} define the ``quality'' of the line. If @var{num}=@code{2} then the straight line will be drawn in all coordinate system (independently on transformation formulas (@pxref{Transformation (Pure C)}). Contrary, for large values (for example, =@code{100}) the geodesic line will be drawn in corresponding coordinate system (straight line in Cartesian coordinates, circle in polar coordinates and so on). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_curve (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} z1, @code{float} dx1, @code{float} dy1, @code{float} dz1, @code{float} x2, @code{float} y2, @code{float} z2, @code{float} dx2, @code{float} dy2, @code{float} dz2, @code{const char *}stl, @code{int} num) -+Draws Bezier-like curve from point @{@var{x1},@var{y1},@var{z1}@} to @{@var{x2},@var{y2},@var{z2}@} using line style @var{stl}. At this tangent is co-directed with @{@var{dx1},@var{dy1},@var{dz1}@}, @{@var{dx2},@var{dy2},@var{dz2}@} and proportional to its amplitude. Parameter @var{num} define the number of points for the curve. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_facex (@code{HMGL} gr, @code{float} x0, @code{float} y0, @code{float} z0, @code{float} wy, @code{float} wz, @code{const char *}stl, @code{float} d1, @code{float} d2) -+@deftypefnx {C function} @code{void} mgl_facey (@code{HMGL} gr, @code{float} x0, @code{float} y0, @code{float} z0, @code{float} wx, @code{float} wz, @code{const char *}stl, @code{float} d1, @code{float} d2) -+@deftypefnx {C function} @code{void} mgl_facez (@code{HMGL} gr, @code{float} x0, @code{float} y0, @code{float} z0, @code{float} wx, @code{float} wy, @code{const char *}stl, @code{float} d1, @code{float} d2) -+Draws the solid rectangle (face) perpendicular to [x,y,z]-axis correspondingly at position @{@var{x0}, @var{y0}, @var{z0}@} with color @var{stl} and with widths @var{wx}, @var{wy}, @var{wz} along corresponding directions. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Parameters @var{d1}!=0, @var{d2}!=0 set additional shift of the last vertex (i.e. to draw quadrangle). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_sphere (@code{HMGL} gr, @code{float} x0, @code{float} y0, @code{float} z0, @code{float} r, @code{const char *}stl) -+Draw the sphere with radius @var{r} and center at point @{@var{x0}, @var{y0}, @var{z0}@} and color @var{stl}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_drop (@code{HMGL} gr, @code{float} x0, @code{float} y0, @code{float} z0, @code{float} dx, @code{float} dy, @code{float} dz, @code{float} r, @code{const char *}col, @code{float} shift, @code{float} ap) -+Draw the drop with radius @var{r} at point @{@var{x0},@var{y0},@var{z0}@} elongated in direction @{@var{dx},@var{dy},@var{dz}@} and with color @var{col}. Parameter @var{shift} set the degree of drop oblongness: @samp{0} is sphere, @samp{1} is maximally oblongness drop. Parameter @var{ap} set relative width of the drop (this is analogue of ``ellipticity'' for the sphere). @sref{Drops sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cone (@code{HMGL} gr, @code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2, @code{float} r1, @code{float} r2, @code{const char *}stl, @code{int} draw_edge) -+Draw tube (or truncated cone if @var{edge}=@code{false}) between points @{@var{x1},@var{y1},@var{z1}@}, @{@var{x2},@var{y2},@var{z2}@} with radius at the edges @var{r1}, @var{r2}. If @var{r2}<0 then it is suppsosed that @var{r2}=@var{r1}. The cone color is defined by string @var{stl}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_mark (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{char} mark) -+Draws a marks of different type at position @{@var{x},@var{y},@var{z}@}. -+@end deftypefn -+ -+@c ################################################################## -+@node Text printing (Pure C), Axis and Colorbar (Pure C), Primitives drawing (Pure C), C interface -+@section Text printing (Pure C) -+@cindex Puts -+@cindex Putsw -+@cindex Text -+@cindex Title -+ -+These functions draw the text. There are functions for drawing text in arbitrary place, in arbitrary direction and along arbitrary curve. The class mglFont (@pxref{mglFont class}) is used for low-level string parsing and printing. It can use arbitrary font-faces and parse many TeX commands. All these functions have 2 variant: for printing 8-bit text (@code{char *}) and for printing Unicode text (@code{wchar_t *}). In first case the conversion in current locale is used. So sometimes you need to specify it by @code{setlocale()} function. The size argument control the size of text: if positive it give the value, if negative it give the value relative to @var{FontSize}. The font type (STIX, arial, courier, times and so on) can be selected by function @code{mgl_load_font()}. @xref{Font settings (Pure C)}. -+ -+The font parameters are described by string. This string may contain several characters of font type (@samp{rbiwou}) and/or align (@samp{LRC}) specification. Also it may contain the text color @samp{wkrgbcymhRGBCYMHW} (@pxref{mglColor class}) after symbol @samp{:}. The font types are: @samp{r} -- roman font, @samp{i} -- italic style, @samp{b} -- bold style, @samp{w} -- wired style, @samp{o} -- over-lined text, @samp{u} -- underlined text. By default roman font is used. The align types are: @samp{L} -- align left (default), @samp{C} -- align center, @samp{R} -- align right. Also a parsing of the LaTeX-like syntax is provided (for detail @pxref{mglFont class}). For example, string @samp{iC:b} correspond to italic font style for centered text which printed by blue color. -+ -+@deftypefn {C function} @code{void} mgl_puts (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{const char *}text) -+@deftypefnx {C function} @code{void} mgl_putsw (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{const wchar_t *}text) -+@deftypefnx {C function} @code{void} mgl_puts_ext (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{const char *}text, @code{const char *}font, @code{float} size, @code{char} dir) -+@deftypefnx {C function} @code{void} mgl_putsw_ext (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{const wchar_t *}text, @code{const char *}font, @code{float} size, @code{char} dir) -+The function plots the string @var{text} at position @{@var{x},@var{y},@var{z}@} with fonts specifying by the criteria @var{how}. The size of font is set by @var{size} parameter (default is @var{FontSize}). Parameter @var{dir} specifies the additional string align. The aligns are: @samp{x} -- align as x-label, @samp{y} -- align as y-label, @samp{z} -- align as z-label, @samp{i} -- align as x-label but inverse writing direction, @samp{t} -- no align (default), @samp{n} -- align in x-y plane. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_puts_dir (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{float} dx, @code{float} dy, @code{float} dz, @code{const char *}text, @code{float} size) -+@deftypefnx {C function} @code{void} mgl_putsw_dir (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{float} dx, @code{float} dy, @code{float} dz, @code{const wchar_t *}text, @code{float} size) -+The function plots the string @var{text} at position @{@var{x},@var{y},@var{z}@} along direction @{@var{dx},@var{dy},@var{dz}@} with specified @var{size}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_title (@code{HMGL} gr, @code{const char *}text, @code{const char *}font, @code{int} size) -+@deftypefnx {C function} @code{void} mgl_titlew (@code{HMGL} gr, @code{const wchar_t *}text, @code{const char *}font, @code{int} size) -+Print string @var{text} as title of the picture (at the top of the picture). Can be used at any place (even inside SubPlot()). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_text_y (@code{HMGL} gr, @code{const HMDT} y, @code{const char *}text, @code{const char *}font, float size) -+@deftypefnx {C function} @code{void} mgl_text_xy (@code{const HMDT} x, @code{const HMDT} y, @code{const char *}text, @code{const char *}font, float size) -+@deftypefnx {C function} @code{void} mgl_text_xyz (@code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}text, @code{const char *}font, float size) -+The function draws @var{text} along the curve between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} by font style @var{font} and with size @var{size}. The string @var{font} may contain symbols @samp{t} for printing the text under the curve (default), or @samp{T} for printing the text above the curve. The sizes of 1st dimension must be equal for all arrays @var{x.nx=y.nx=z.nx}. If array @var{x} is not specified then its an automatic array is used with values equidistantly distributed in interval [@var{Min}.x, @var{Max}.x] (@pxref{Ranges (bounding box) (Pure C)}). If array @var{z} is not specified then @var{z}[i] = @var{zVal} is used. @sref{Text sample} -+@end deftypefn -+ -+@c ################################################################## -+@node Axis and Colorbar (Pure C), Legend (Pure C), Text printing (Pure C), C interface -+@section Axis and Colorbar (Pure C) -+@cindex Axis -+@cindex Box -+@cindex Grid -+@cindex Colorbar -+@cindex Label -+ -+These functions draw the ``things for measuring'', like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information @pxref{Axis settings (Pure C)}. -+ -+@deftypefn {C function} @code{void} mgl_axis (@code{HMGL} gr, @code{const char *}dir) -+Draws axes with ticks (@pxref{Axis settings (Pure C)}) in directions determined by string parameter @var{dir}.If string contain the symbol @samp{_} then tick labels are not printed. Font for ticks labels is determined by @code{mgl_set_font_def()} (@pxref{Font settings (Pure C)}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_colorbar (@code{HMGL} gr, @code{const char *}sch, @code{int} where) -+Draws colorbar with color scheme @var{sch} (current scheme if @code{sch=NULL}) at edge of plot. Parameter @var{where} specifies the position of colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{Dens sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_colorbar_ext (@code{HMGL} gr, @code{const char *}sch, @code{int} where, @code{float} x, @code{float} y, @code{float} w, @code{float} h) -+Draws colorbar with color scheme @var{sch} (current scheme if not specified) at arbitrary position of subplot @{@var{x}, @var{y}@} (supposed to be in range [0,1]). Parameter @var{where} specifies the position of colorbar labels: @samp{0} - at left, @samp{1} - at right, @samp{2} - at bottom, @samp{3} - at top. Parameters @var{w}, @var{h} set the relative width and height of the colorbar. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_colorbar_val (@code{HMGL} gr, @code{const HMDT} v, @code{const char *}sch, @code{int} where) -+Draws colorbar with sharp colors @var{sch} (current palette if @code{sch=NULL}) for values @var{v} at edge of plot. Parameter @var{where} specifies the position of colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{Dens sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_axis_grid (@code{HMGL} gr, @code{const char *}dir, @code{const char *}pen) -+Draws grid lines perpendicular to direction determined by string parameter @var{dir}. The step of grid lines is the same as tick step for an Axis(). The style of lines is determined by @var{pen} parameter. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_box (@code{HMGL} gr, @code{int} ticks) -+@deftypefnx {C function} @code{void} mgl_box_rgb (@code{HMGL} gr, @code{float} r, @code{float} g, @code{float} b, @code{int} ticks) -+@deftypefnx {C function} @code{void} mgl_box_str (@code{HMGL} gr, @code{const char *}col, @code{int} ticks) -+Draws bounding box outside the plotting volume with color specified by string @var{col} or by RGB values. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_label (@code{HMGL} gr, @code{char} dir, @code{const char *}text) -+@deftypefnx {C function} @code{void} mgl_label_ext (@code{HMGL} gr, @code{char} dir, @code{const char *}text, @code{int} pos, @code{float} size, @code{float} shift) -+Prints the label @var{text} for axis @var{dir}=@samp{x},@samp{y},@samp{z},@samp{t} (here @samp{t} is ``ternary'' axis @math{t=1-x-y}). The position of label is determined by @var{pos} parameter. If @var{pos}=0 then label is printed at the center of axis. If @var{pos}>0 then label is printed at the maximum of axis (default). If @var{pos}<0 then label is printed at the minimum of axis. Parameter @var{size} determines the font size for the label. By default the font size is 1.4 times larger than the one for ticks @var{FontSize}. @xref{Text printing (Pure C)}. -+@end deftypefn -+ -+@c ################################################################## -+@node Legend (Pure C), 1D plotting (Pure C), Axis and Colorbar (Pure C), C interface -+@section Legend (Pure C) -+@cindex Legend -+@cindex AddLegend -+@cindex ClearLegend -+ -+These functions draw legend to the graph (useful for @ref{1D plotting (Pure C)}). Legend entry is a pair of strings: one for style of the line, another one with description text (with included LaTeX parsing). The array of string are accumulated first to the internal arrays (by function AddLegend()) and are plotted later. The position of the legend can be selected automatic or manually. Parameters @var{font} and @var{size} specify the font style and size (@pxref{Font settings (Pure C)}). Parameter @var{llen} set the relative width of the line sample and the text indent (default value is 0.1). If line style string for entry is empty then the corresponding text is printed without indent. @sref{Legend sample} -+ -+@deftypefn {C function} @code{void} mgl_legend (@code{HMGL} gr, @code{int} where, @code{const char *}font, @code{float} size, @code{float} llen) -+Draws legend of accumulated legend entries by font @var{font} with @var{size}. Parameter @var{where} sets the position of the legend: @samp{0} is bottom left corner, @samp{1} is bottom right corner, @samp{2} is top left corner, @samp{3} is top right corner (is default). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_legend_xy (@code{HMGL} gr, @code{float} x, @code{float} y, @code{const char *}font, @code{float} size, @code{float} llen) -+Draws legend of accumulated legend entries by font @var{font} with @var{size}. Position of legend is determined by parameter @var{x}, @var{y} which supposed to be normalized to interval [0,1]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_add_legend (@code{HMGL} gr, @code{const char *}text, @code{const char *}style) -+@deftypefnx {C function} @code{void} mgl_add_legendw (@code{HMGL} gr, @code{const wchar_t *}text, @code{const char *}style) -+Adds string @var{text} to internal legend accumulator. The style of described line and mark is specified in string @var{style} (@pxref{Line styles}). Maximal number of entries is 100. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_clear_legend (@code{HMGL} gr) -+Clears saved legend strings. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_set_legend_box (@code{HMGL} gr, @code{int} enable) -+Switch on/off drawing box near legend. By default (=@code{true}) box is drawn. -+@end deftypefn -+ -+@c ################################################################## -+@node 1D plotting (Pure C), 2D plotting (Pure C), Legend (Pure C), C interface -+@section 1D plotting (Pure C) -+ -+These functions perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve @{x(i),y(i),z(i)@}, i=1...n. There are 5 generally different types of data representations: simple line plot (Plot), line plot with filling under it (Area), stairs plot (Step), bar plot (Bars, Barh) and vertical lines (Stem). Each type of plotting has similar interface. There are 3D version and two 2D versions. One of last requires single array. The parameters of line and marks are specified by the string argument. If the string parameter is NULL then solid line with color from palette Pal is used (@pxref{Palette and colors}). Also there are some special 1d plots having slightly different interface: surface of curve rotation (Torus), chart (Chart) and error boxes (Error), marks with variable size (Mark), tubes (Tube) and so on. @xref{Line styles}. -+ -+@menu -+* Plot (Pure C):: -+* Radar (Pure C):: -+* Tens (Pure C):: -+* Area (Pure C):: -+* Region (Pure C):: -+* Bars (Pure C):: -+* Barh (Pure C):: -+* Stem (Pure C):: -+* Step (Pure C):: -+* Torus (Pure C):: -+* Chart (Pure C):: -+* Mark (Pure C):: -+* TextMark (Pure C):: -+* Error (Pure C):: -+* Tube (Pure C):: -+@end menu -+ -+ -+@c ================================================================== -+@node Plot (Pure C), Radar (Pure C), , 1D plotting (Pure C) -+@subsection Plot (Pure C) -+@cindex Plot -+ -+These functions draw continuous lines between points. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Area(), Step(), Stem, Tube(), Mark(), Error(), Belt(). @sref{Plot sample} -+ -+@deftypefn {C function} @code{void} mgl_plot_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_plot_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_plot (@code{HMGL} gr, @code{const HMDT} y, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Radar (Pure C), Tens (Pure C), Plot (Pure C), 1D plotting (Pure C) -+@subsection Radar -+@cindex Radar -+ -+@deftypefn {C function} @code{void} mgl_radar (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}pen, @code{float} r) -+This functions draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). The plots are drawn for each row if one of the data is the matrix. Parameter @var{r} set the additional shift of data (i.e. the data @var{a}+@var{r} is used instead of @var{a}). If @code{r<0} then @code{r=max(0, -min(a)}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). If @var{pen} containt @samp{#} symbol then "grid" (radial lines and circle for @var{r}) is drawn See also @ref{Plot}. @sref{Radar sample} -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Tens (Pure C), Area (Pure C), Radar (Pure C), 1D plotting (Pure C) -+@subsection Tens (Pure C) -+@cindex Tens -+ -+These functions draw continuous lines between points with color defined by the special array (look like tension plot). The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color scheme (@pxref{Color scheme}) and style and/or width of line (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with current color scheme is used. See also Plot(), Mesh(), Fall(). @sref{Tens sample} -+ -+@deftypefn {C function} @code{void} mgl_tens_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} c, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space with color defined by @var{c}[i]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_tens_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} c, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} with color defined by @var{c}[i]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_tens (@code{HMGL} gr, @code{const HMDT} y, @code{const HMDT} c, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} with color defined by @var{c}[i], where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Area (Pure C), Region (Pure C), Tens (Pure C), 1D plotting (Pure C) -+@subsection Area (Pure C) -+@cindex Area -+ -+These functions draw continuous lines between points and fills it to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Plot(), Bars(), Stem(). @sref{Area sample} -+ -+@deftypefn {C function} @code{void} mgl_area_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space and fills it down to @var{z} = @var{Org.z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_area_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} and fills it down to @var{y} = @var{Org.y}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_area_xys (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} and fills it down to @var{y} = @var{Org.y}. The lines are drawn one abover another (like summation). Note, you can reach the same effect if call @code{mgl_data_cumsum(y,"y");} before plot. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_area (@code{HMGL} gr, @code{const HMDT} y, @code{const char *}pen) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} and fills it down to @var{y} = @var{Org.y}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@c ================================================================== -+@node Region (Pure C), Bars (Pure C), Area (Pure C), 1D plotting (Pure C) -+@subsection Region (Pure C) -+@cindex Region -+ -+These functions fill area between 2 curves. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y1.nx=y2.nx} and all dimensions of arrays @var{y1} and @var{y2} must be equal too. String @var{pen} specifies the color (@pxref{Line styles}). By default (@code{pen=NULL}) color from palette is used (@pxref{Palette and colors}). See also Area(), Bars(), Stem(). @sref{Region sample} -+ -+@deftypefn {C function} @code{void} mgl_region_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y1, @code{const HMDT} y2, @code{const char *}pen, @code{int} inside) -+The function fills area between curves @{@var{x}[i], @var{y1}[i]@} and @{@var{x}[i], @var{y2}[i]@}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_region (@code{HMGL} gr, @code{const HMDT} y1, @code{const HMDT} y2, @code{const char *}pen, @code{int} inside) -+The function fills area between curves @{@var{x}[i], @var{y1}[i]@} and @{@var{x}[i], @var{y2}[i]@}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@c ================================================================== -+@node Bars (Pure C), Barh (Pure C), Region (Pure C), 1D plotting (Pure C) -+@subsection Bars (Pure C) -+@cindex Bars -+ -+These functions draw vertical bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Barh(), Area(), Stem(), Chart(). @sref{Bars sample} -+ -+@deftypefn {C function} @code{void} mgl_bars_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}pen=@code{NULL}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_bars_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_bars (@code{HMGL} gr, @code{const HMDT} y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@c ================================================================== -+@node Barh (Pure C), Stem (Pure C), Bars (Pure C), 1D plotting (Pure C) -+@subsection Barh (Pure C) -+@cindex Barh -+ -+These functions draw horizontal bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Bars(). @sref{Barh sample} -+ -+@deftypefn {C function} @code{void} mgl_barh_xy (@code{HMGL} gr, @code{const HMDT} y, @code{const HMDT} v, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws horizontal bars from points @{@var{v}[i], @var{y}[i]@} down to @var{x} = Org.x in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_barh (@code{HMGL} gr, @code{const HMDT} v, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws horizontal bars from points @{@var{v}[i], @var{y}[i]@} down to @var{x} = Org.x in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{y}[i] values are equidistantly distributed in interval [@var{Min}.y, @var{Max}.y]. -+@end deftypefn -+ -+@c ================================================================== -+@node Stem (Pure C), Step (Pure C), Barh (Pure C), 1D plotting (Pure C) -+@subsection Stem (Pure C) -+@cindex Stem -+ -+These functions draw vertical lines from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Area(), Bars(), Plot(). @sref{Stem sample} -+ -+@deftypefn {C function} @code{void} mgl_stem_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}pen) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_stem_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const char *}pen) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{Min.z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_stem (@code{HMGL} gr, @code{const HMDT} y, @code{const char *}pen) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Step (Pure C), Torus (Pure C), Stem (Pure C), 1D plotting (Pure C) -+@subsection Step (Pure C) -+@cindex Step -+ -+These functions draw continuous stairs for points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Plot(), Stem(), Tile(), Boxs(). @sref{Step sample} -+ -+@deftypefn {C function} @code{void} mgl_step_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}pen) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_step_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const char *}pen) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_step (@code{HMGL} gr, @code{const HMDT} y, @code{const char *}pen) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@c ================================================================== -+@node Torus (Pure C), Chart (Pure C), Step (Pure C), 1D plotting (Pure C) -+@subsection Torus (Pure C) -+@cindex Torus -+ -+These functions draw surface which is result of curve @{@var{r}, @var{z}@} rotation around @var{AxialDir} axis (@pxref{Other settings}). The sizes of 1st dimension @strong{must be equal} for all arrays @var{r.nx=z.nx}. String @var{pen} specifies the color (@pxref{Line styles}). By default (@code{pen=NULL}) color from palette is used (@pxref{Palette and colors}). See also Plot(), Axial(). @sref{Torus sample} -+ -+@deftypefn {C function} @code{void} mgl_torus (@code{HMGL} gr, @code{const HMDT} r, @code{const HMDT} z, @code{const char *}pen) -+The function draws surface which is result of curve @{@var{r}[i], @var{z}[i]@} rotation. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_torus_2 (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}pen) -+The function draws surface which is result of curve @{@var{r}[i], @var{z}[i]@} rotation, where @var{r}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Chart (Pure C), Mark (Pure C), Torus (Pure C), 1D plotting (Pure C) -+@subsection Chart (Pure C) -+@cindex Chart -+ -+@deftypefn {C function} @code{void} mgl_chart (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}col) -+The function draws colored stripes (boxes) for data in array @var{a}. The number of stripes is equal to the number of rows in @var{a} (equal to @var{a.ny}). The color of each next stripe is cyclically changed from colors specified in string @var{col} or in palette Pal (@pxref{Palette and colors}). Spaces in colors denote transparent ``color'', i.e. if @var{col} contain space(s) then corresponding stripe(s) are not drawn. The stripe width is proportional to value of element in @var{a}. Chart is plotted only for data with non-negative elements. If string @var{col} have symbol @samp{#} then black border lines are drawn. The most nice form the chart have in 3d (after rotation of coordinates) or in cylindrical coordinates (becomes so called Pie chart). @sref{Chart sample} -+@end deftypefn -+ -+@c ================================================================== -+@node Mark (Pure C), TextMark (Pure C), Chart (Pure C), 1D plotting (Pure C) -+@subsection Mark (Pure C) -+@cindex Mark -+ -+These functions draw marks with size @var{r}*@var{MarkSize} (@pxref{Default sizes}) at points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). If you need to draw markers of the same size then you may use Plot() function. See also Plot(), TextMark(), Stem(), Error(). @sref{Mark sample} -+ -+@deftypefn {C function} @code{void} mgl_mark_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} r, @code{const char *}pen) -+The function draws marks for points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_mark_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} r, @code{const char *}pen) -+The function draws marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_mark_y (@code{HMGL} gr, @code{const HMDT} y, @code{const HMDT} r, @code{const char *}pen) -+The function draws marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@c ================================================================== -+@node TextMark (Pure C), Error (Pure C), Mark (Pure C), 1D plotting (Pure C) -+@subsection TextMark (Pure C) -+@cindex TextMark -+ -+These functions draw string @var{text} as marks with size proportional to @var{r}*@var{MarkSize} (@pxref{Default sizes}) at points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Plot(), Mark(), Stem(). @sref{TextMark sample} -+ -+@deftypefn {C function} @code{void} mgl_textmarkw_xyzr (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} r, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}) -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_textmark_xyzr (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} r, @code{const char *}text, @code{const char *}fnt=@code{NULL}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_textmarkw_xyr (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} r, @code{const wchar_t *}text, @code{const char *}fnt) -+@deftypefnx {C function} @code{void} mgl_textmark_xyr (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} r, @code{const char *}text, @code{const char *}fnt) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_textmarkw_yr (@code{HMGL} gr, @code{const HMDT} y, @code{const HMDT} r, @code{const wchar_t *}text, @code{const char *}fnt) -+@deftypefnx {C function} @code{void} mgl_textmark_yr (@code{HMGL} gr, @code{const HMDT} y, @code{const HMDT} r, @code{const char *}text, @code{const char *}fnt) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_textmarkw (@code{HMGL} gr, @code{const HMDT} y, @code{const wchar_t *}text, @code{const char *}fnt) -+@deftypefnx {C function} @code{void} mgl_textmark (@code{HMGL} gr, @code{const HMDT} y, @code{const char *}text, @code{const char *}fnt) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. The mark sizes @var{r}[i]=1 for all points. -+@end deftypefn -+ -+@c ================================================================== -+@node Error (Pure C), Tube (Pure C), TextMark (Pure C), 1D plotting (Pure C) -+@subsection Error (Pure C) -+@cindex Error -+ -+These functions draw error boxes at points @{@var{x}[i], @var{y}[i]@} on plane @var{z} = @var{zVal} (by default @var{z}=@var{Min.z}). This can be useful, for example, in experimental points, or to show numeric error or some estimations and so on. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Plot(). @sref{Error sample} -+ -+@deftypefn {C function} @code{void} mgl_error_exy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ex, @code{const HMDT} ey, @code{const char *}pen) -+Draws a error box @{@var{ex}, @var{ey}@} in point position @{@var{x}, @var{y}@}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_error_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ey, @code{const wchar_t *}pen) -+Draws a error box @var{ey} (along only one direction) in point position @{@var{x}, @var{y}@}. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_error (@code{HMGL} gr, @code{const HMDT} y, @code{const HMDT} ey, @code{const char *}pen) -+Draws a error box @var{ey} (along only one direction) in point position @{@var{x}, @var{y}@}, where @var{x} values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@c ================================================================== -+@node Tube (Pure C), , Error (Pure C), 1D plotting (Pure C) -+@subsection Tube (Pure C) -+@cindex Tube -+ -+These functions draw the tube with variable radius @var{r} along the curve between points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also Plot(). @sref{Tube sample} -+ -+@deftypefn {C function} @code{void} mgl_tube_xyzr (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} r, @code{const char *}pen) -+@deftypefnx {C function} @code{void} mgl_tube_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{float} r, @code{const char *}pen) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_tube_xyr (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} r, @code{const char *}pen) -+@deftypefnx {C function} @code{void} mgl_tube_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{float} r, @code{const char *}pen) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_tube_r (@code{HMGL} gr, @code{const HMDT} y, @code{const HMDT} r, @code{const char *}pen) -+@deftypefnx {C function} @code{void} mgl_tube (@code{HMGL} gr, @code{const HMDT} y, @code{float} r, @code{const char *}pen) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@c ################################################################## -+@node 2D plotting (Pure C), 3D plotting (Pure C), 1D plotting (Pure C), C interface -+@section 2D plotting (Pure C) -+ -+These functions perform plotting of 2D data. 2D means that data depend from 2 independent parameters like matrix @math{f(x_i,y_j), i=1...n, j=1...m}. There are 6 generally different types of data representations: simple mesh lines plot (Mesh), surface plot (Surf), surface plot by boxes (Boxs), surface plot by tiles (Tile), waterfall-like plot (Fall), belt plot (Belt), density plot (Dens), contour lines plot (Cont), solid contours plot (ContF) and its rotational figure (Axial). Cont, ContF and Axial functions have variants for automatic and manual selection of level values for contours. Also there are functions for plotting data grid lines according to the data format (Grid) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Mesh (Pure C):: -+* Fall (Pure C):: -+* Belt (Pure C):: -+* Surf (Pure C):: -+* Boxs (Pure C):: -+* Tile (Pure C):: -+* Dens (Pure C):: -+* Cont (Pure C):: -+* ContF (Pure C):: -+* ContD (Pure C):: -+* Axial (Pure C):: -+* Grid (Pure C):: -+@end menu -+ -+@c ================================================================== -+@node Mesh (Pure C), Fall (Pure C), , 2D plotting (Pure C) -+@subsection Mesh (Pure C) -+@cindex Mesh -+ -+@deftypefn {C function} @code{void} mgl_mesh_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+The function draws mesh lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Mesh lines are plotted for each z slice of the data. See also Surf(), Fall(), NeshNum, Cont(). @sref{Mesh sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_mesh (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Fall (Pure C), Belt (Pure C), Mesh (Pure C), 2D plotting (Pure C) -+@subsection Fall (Pure C) -+@cindex Fall -+ -+@deftypefn {C function} @code{void} mgl_fall_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch=@code{NULL}) -+The function draws fall lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If @var{sch} contain @samp{x} then lines are drawn along x-direction else (by default) lines are drawn along y-direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Fall lines are plotted for each z slice of the data. See also Belt(), Mesh(), NeshNum. @sref{Fall sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_fall (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Belt (Pure C), Surf (Pure C), Fall (Pure C), 2D plotting (Pure C) -+@subsection Belt (Pure C) -+@cindex Belt -+ -+@deftypefn {C function} @code{void} mgl_belt_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+The function draws belts for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. This plot can be used as 3d generalization of Plot(). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If @var{sch} contain @samp{x} then belts are drawn along x-direction else (by default) belts are drawn along y-direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Belts are plotted for each z slice of the data. See also Fall(), Surf(), Plot(), NeshNum. @sref{Belt sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_belt (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Surf (Pure C), Boxs (Pure C), Belt (Pure C), 2D plotting (Pure C) -+@subsection Surf (Pure C) -+@cindex Surf -+ -+@deftypefn {C function} @code{void} mgl_surf_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Mesh(), Dens(), Belt(), Tile(), Boxs(), SurfC(), SurfA(). @sref{Surf sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Boxs (Pure C), Tile (Pure C), Surf (Pure C), 2D plotting (Pure C) -+@subsection Boxs (Pure C) -+@cindex Boxs -+ -+@deftypefn {C function} @code{void} mgl_boxs_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+The function draws vertical boxes for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Surf(), Tile(), Step(). @sref{Boxs sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_boxs (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Tile (Pure C), Dens (Pure C), Boxs (Pure C), 2D plotting (Pure C) -+@subsection Tile (Pure C) -+@cindex Tile -+ -+@deftypefn {C function} @code{void} mgl_tile_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+The function draws horizontal tiles for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. Such plot can be used as 3d generalization of Step(). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Surf(), Boxs(), Step(), TileS(). @sref{Tile sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_tile (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Dens (Pure C), Cont (Pure C), Tile (Pure C), 2D plotting (Pure C) -+@subsection Dens (Pure C) -+@cindex Dens -+ -+@deftypefn {C function} @code{void} mgl_dens_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The function draws density plot for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Surf(), Cont(), ContF(), Dens[XYZ](). @sref{Dens sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dens (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Cont (Pure C), ContF (Pure C), Dens (Pure C), 2D plotting (Pure C) -+@subsection Cont (Pure C) -+@cindex Cont -+ -+@deftypefn {C function} @code{void} mgl_cont_xy_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The function draws contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}). Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Dens(), ContF(), Axial(), Cont[XYZ](). @sref{Cont sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont__val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{int} num, @code{float} zVal) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch, @code{int} num, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node ContF (Pure C), ContD (Pure C), Cont (Pure C), 2D plotting (Pure C) -+@subsection ContF (Pure C) -+@cindex ContF -+ -+@deftypefn {C function} @code{void} mgl_contf_xy_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The function draws solid (or filled) contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}). Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v} (must be @code{v.nx>2}). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Dens(), Cont(), ContD(), Axial(), ContF[XYZ](). @sref{ContF sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{int} num, @code{float} zVal) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch, @code{int} num, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node ContD (Pure C), Axial (Pure C), ContF (Pure C), 2D plotting (Pure C) -+@subsection ContD (Pure C) -+@cindex ContD -+ -+@deftypefn {C function} @code{void} mgl_contd_xy_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The function draws solid (or filled) contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}) with manual colors. Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v} (must be @code{v.nx>2}). String @var{sch} sets the contour colors: the color of k-th contour is determined by character @code{sch[k%strlen(sch)]}. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Dens(), Cont(), ContF(). @sref{ContD sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contd_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contd_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{int} num, @code{float} zVal) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contd (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch, @code{int} num, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Axial (Pure C), Grid (Pure C), ContD (Pure C), 2D plotting (Pure C) -+@subsection Axial (Pure C) -+@cindex Axial -+ -+@deftypefn {C function} @code{void} mgl_axial_xy_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+The function draws surface which is result of contour plot rotation for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then wire plot is produced. If string contain symbols @samp{x}, @samp{y} or @samp{z} then rotation axis @var{AxialDir} (@pxref{Other settings}) will be set to specified direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Cont(), ContF(), Torus(), Surf3(). @sref{Axial sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_axial_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} z, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_axial_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{int} num) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_axial (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Grid (Pure C), , Axial (Pure C), 2D plotting (Pure C) -+@subsection Grid (Pure C) -+@cindex Grid -+ -+@deftypefn {C function} @code{void} mgl_grid_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The function draws grid lines for density plot of surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Grid is plotted for each z slice of the data. See also Dens(), Cont(), ContF(). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_grid (@code{HMGL} gr, @code{const HMDT} z, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+ -+@c ################################################################## -+@node 3D plotting (Pure C), Dual plotting (Pure C), 2D plotting (Pure C), C interface -+@section 3D plotting (Pure C) -+ -+These functions perform plotting of 3D data. 3D means that data depend from 3 independent parameters like matrix @math{f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l}. There are 4 generally different types of data representations: isosurface or surface of constant value (Surf3), density plot at slices (Dens3), contour lines plot at slices (Cont3), solid contours plot at slices (ContF3) and cloud-like plot (Cloud). Surf3, Cont3 and ContF3 functions have variants for automatic and manual selection of level values for surfaces/contours. Also there are functions for plotting data grid lines according to the data format (Grid3) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Surf3 (Pure C):: -+* Dens3 (Pure C):: -+* Cont3 (Pure C):: -+* ContF3 (Pure C):: -+* Grid3 (Pure C):: -+* Cloud (Pure C):: -+* Beam (Pure C):: -+@end menu -+ -+@c ================================================================== -+@node Surf3 (Pure C), Dens3 (Pure C), , 3D plotting (Pure C) -+@subsection Surf3 (Pure C) -+@cindex Surf3 -+ -+@deftypefn {C function} @code{void} mgl_surf3_xyz_val (@code{HMGL} gr, @code{float} val, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also CloudQ(), CloudP(), Dens3(), Surf3C(), Surf3A(), Axial(). @sref{Surf3 sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3_val (@code{HMGL} gr, @code{float} val, @code{const HMDT} a, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl, @code{int} num) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3 (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Dens3 (Pure C), Cont3 (Pure C), Surf3 (Pure C), 3D plotting (Pure C) -+@subsection Dens3 (Pure C) -+@cindex Dens3 -+@cindex DensA -+ -+@deftypefn {C function} @code{void} mgl_dens3_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}stl) -+The function draws density plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Density is plotted at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also Cont3(), ContF3(), Dens(), Grid3(). @sref{Dens3 sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dens3 (@code{HMGL} gr, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dens3_all_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl) -+Draws density plots at all central slices of the 3d data specified parametrically. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dens3_all (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Cont3 (Pure C), ContF3 (Pure C), Dens3 (Pure C), 3D plotting (Pure C) -+@subsection Cont3 (Pure C) -+@cindex Cont3 -+@cindex ContA -+ -+@deftypefn {C function} @code{void} mgl_cont3_xyz_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}stl) -+The function draws contour plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Contours are plotted for values specified in array @var{v} at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also Dens3(), ContF3(), Cont(), Grid3(). @sref{Cont3 sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont3_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont3_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}stl, @code{int} num) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont3 (@code{HMGL} gr, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont3_all_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl, @code{int} num) -+Draws contour plots at all central slices of the 3d data specified parametrically. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont3_all (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node ContF3 (Pure C), Grid3 (Pure C), Cont3 (Pure C), 3D plotting (Pure C) -+@subsection ContF3 (Pure C) -+@cindex ContF3 -+@cindex ContFA -+ -+@deftypefn {C function} @code{void} mgl_contf3_xyz_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}stl) -+The function draws solid (or filled) contour plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Contours are plotted for values specified in array @var{v} at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also Dens3(), Cont3(), ContF(), Grid3(). @sref{Cont3 sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf3_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf3_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}stl, @code{int} num) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf3 (@code{HMGL} gr, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf3_all_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl, @code{int} num) -+Draws contour plots at all central slices of the 3d data specified parametrically. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf3_all (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Grid3 (Pure C), Cloud (Pure C), ContF3 (Pure C), 3D plotting (Pure C) -+@subsection Grid3 (Pure C) -+@cindex Grid3 -+@cindex GridA -+ -+@deftypefn {C function} @code{void} mgl_grid3_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}stl) -+The function draws grid for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Density is plotted at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also Cont3(), ContF3(), Dens3(), Grid(). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_grid3 (@code{HMGL} gr, @code{const HMDT} a, @code{char} dir, @code{int} sVal, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_grid3_all_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl) -+Draws grids at all central slices of the 3d data specified parametrically. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_grid3_all (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Cloud (Pure C), Beam (Pure C), Grid3 (Pure C), 3D plotting (Pure C) -+@subsection Cloud (Pure C) -+@cindex CloudP -+@cindex CloudQ -+ -+@deftypefn {C function} @code{void} mgl_cloudq_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl, @code{float} alpha=@code{1}) -+The function draws cloud plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). This plot is a set of cubes with color and transparency proportional to value of @var{a}. The resulting plot is like cloud -- low value is transparent but higher ones are not. The number of plotting cells depend on MeshNum (@pxref{Other settings}). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. Parameter @var{alpha} changes the overall transparency of plot. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Surf3}. @sref{CloudQ sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cloudq (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} alpha=@code{1}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cloudp_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}stl, @code{float} alpha=@code{1}) -+The same as first one but the semi-transparent points are used instead of cubes. @sref{CloudP sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cloudp (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} alpha=@code{1}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Beam (Pure C), , Cloud (Pure C), 3D plotting (Pure C) -+@subsection Beam -+@cindex Beam -+ -+@deftypefn {C function} @code{void} mgl_beam_val (@code{HMGL} gr, @code{float} val, @code{const HMDT} tr, @code{const HMDT} g1, @code{const HMDT} g2, @code{const HMDT} a, @code{float} r, @code{const char *}stl, @code{int} flag) -+Draws the isosurface for 3d array @var{a} at constant values of @var{a}=@var{val}. This is special kind of plot for @var{a} specified in accompanied coordinates along curve @var{tr} with orts @var{g1}, @var{g2} and with transverse scale @var{r}. Variable @var{flag} is bitwise: @samp{0x1} - draw in accompanied (not laboratory) coordinates; @samp{0x2} - draw projection to @math{\rho-z} plane; @samp{0x4} - draw normalized in each slice field. The x-size of data arrays @var{tr}, @var{g1}, @var{g2} must be nx>2. The y-size of data arrays @var{tr}, @var{g1}, @var{g2} and z-size of the data array @var{a} must be equal. @xref{Surf3}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_beam (@code{HMGL} gr, @code{const HMDT} tr, @code{const HMDT} g1, @code{const HMDT} g2, @code{const HMDT} a, @code{float} r, @code{const char *}stl, @code{int} flag=@code{0}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypefn -+ -+ -+ -+@c ################################################################## -+@node Dual plotting (Pure C), Vector fields (Pure C), 3D plotting (Pure C), C interface -+@section Dual plotting (Pure C) -+ -+These plotting functions draw @emph{two matrix} simultaneously. There are 5 generally different types of data representations: surface or isosurface colored by other data (SurfC, Surf3C), surface or isosurface transpared by other data (SurfA, Surf3A), tiles with variable size (TileS), mapping diagram (Map), STFA diagram (STFA). Surf3A and Surf3C have variants for automatic and manual selection of level values for isosurfaces. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* SurfC (Pure C):: -+* Surf3C (Pure C):: -+* SurfA (Pure C):: -+* Surf3A (Pure C):: -+* TileS (Pure C):: -+* Map (Pure C):: -+* STFA (Pure C):: -+@end menu -+ -+@c ================================================================== -+@node SurfC (Pure C), Surf3C (Pure C), , Dual plotting (Pure C) -+@subsection SurfC (Pure C) -+@cindex SurfC -+ -+@deftypefn {C function} @code{void} mgl_surfc_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} c, @code{const char *}sch) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} and color it by matrix @var{c}[i,j]. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. All dimensions of arrays @var{z} and @var{c} must be equal. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Surf(), SurfA(), Surf3C(). @sref{SurfC sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surfc (@code{HMGL} gr, @code{const HMDT} z, @code{const HMDT} c, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Surf3C (Pure C), SurfA (Pure C), SurfC (Pure C), Dual plotting (Pure C) -+@subsection Surf3C (Pure C) -+@cindex Surf3C -+ -+@deftypefn {C function} @code{void} mgl_surf3c_xyz_val (@code{HMGL} gr, @code{float} val, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}stl) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as Surf3() function but the color of isosurface depends on values of array @var{c}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. All dimensions of arrays @var{z} and @var{c} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also Surf3(), SurfC(), Surf3A(). @sref{Surf3C sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3c_val (@code{HMGL} gr, @code{float} val, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3c_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}stl, @code{int} num) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3c (@code{HMGL} gr, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node SurfA (Pure C), Surf3A (Pure C), Surf3C (Pure C), Dual plotting (Pure C) -+@subsection SurfA (Pure C) -+@cindex SurfA -+ -+@deftypefn {C function} @code{void} mgl_surfa_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} c, @code{const char *}sch) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} and transparent it by matrix @var{c}[i,j]. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. All dimensions of arrays @var{z} and @var{c} must be equal. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also Surf(), SurfC(), Surf3A(), TileS(). @sref{SurfA sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surfa (@code{HMGL} gr, @code{const HMDT} z, @code{const HMDT} c, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Surf3A (Pure C), TileS (Pure C), SurfA (Pure C), Dual plotting (Pure C) -+@subsection Surf3A (Pure C) -+@cindex Surf3A -+ -+@deftypefn {C function} @code{void} mgl_surf3a_xyz_val (@code{HMGL} gr, @code{float} val, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}stl) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as Surf3() function but the transparency of isosurface depends on values of @var{b} array. This allows one to remove the part of isosurface where @var{b} is negligibly small (useful for phase plotting of a beam or a pulse). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. All dimensions of arrays @var{z} and @var{c} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also @ref{Surf3}, @ref{SurfA}, @ref{Surf3C}. @sref{Surf3A sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3a_val (@code{HMGL} gr, @code{float} val, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}sch) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3a_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}stl, @code{int} num) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_surf3a (@code{HMGL} gr, @code{const HMDT} a, @code{const HMDT} c, @code{const char *}sch, @code{int} num) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node TileS (Pure C), Map (Pure C), Surf3A (Pure C), Dual plotting (Pure C) -+@subsection TileS (Pure C) -+@cindex TileS -+ -+@deftypefn {C function} @code{void} mgl_tiles_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} r, @code{const char *}sch) -+The function draws horizontal tiles for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. It is mostly the same as Tile() but the size of tiles is determined by @var{r} array. This is some kind of ``transparency'' useful for exporting to EPS files. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{SurfA}, @ref{Tile}. @sref{TileS sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_tiles (@code{HMGL} gr, @code{const HMDT} z, @code{const HMDT} c, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Map (Pure C), STFA (Pure C), TileS (Pure C), Dual plotting (Pure C) -+@subsection Map (Pure C) -+@cindex Map -+ -+@deftypefn {C function} @code{void} mgl_map_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{int} ks, @code{int} pnts) -+The function draws mapping plot for matrices @{@var{ax}, @var{ay} @} which parametrically depend on coordinates @var{x}, @var{y}. The previous position of the cell (point) is marked by color. Height is proportional to Jacobian(ax,ay). This plot is like Arnold diagram ???. If @code{pnts=false} then face is drawn otherwise the color ball at matrix knots are drawn. Parameter @var{ks} specifies the slice of matrices which will be used. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be the same. The minor dimensions of arrays @var{x}, @var{y}, @var{ax} should be equal. Arrays @var{x}, @var{y} can be vectors (not matrix as @var{ax}). @sref{Map sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_map (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{int} ks, @code{int} pnts) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node STFA (Pure C), , Map (Pure C), Dual plotting (Pure C) -+@subsection STFA (Pure C) -+@cindex STFA -+ -+@deftypefn {C function} @code{void} mgl_stfa_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} re, @code{const HMDT} im, @code{int} dn, @code{const char *}sch, @code{float} zVal) -+Draws spectrogram of complex array @var{re}+i*@code{im} for Fourier size of @var{dn} points at plane @var{z=zVal}. Parameter @var{dn} is arbitrary even integer. For example in 1D case, result is density plot of data @math{res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn} with size @{int(nx/dn), dn, ny@}. At this array @var{re}, @var{im} parametrically depend on coordinates @var{x}, @var{y}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{re} and @var{im} must be the same. The minor dimensions of arrays @var{x}, @var{y}, @var{re} should be equal. Arrays @var{x}, @var{y} can be vectors (not matrix as @var{re}). @xref{Color scheme}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_stfa (@code{HMGL} gr, @code{const HMDT} re, @code{const HMDT} im, @code{int} dn, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+ -+@c ################################################################## -+@node Vector fields (Pure C), Other plotting (Pure C), Dual plotting (Pure C), C interface -+@section Vector fields (Pure C) -+ -+These functions perform plotting of 2D and 3D vector fields. There are 5 generally different types of vector fields representations: simple vector field (Vect), vector field with coloring (VectC), vector field by dew-drops (Dew), flow threads (Flow), flow pipes (Pipe). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Traj (Pure C):: -+* Vect (Pure C):: -+* VectC (Pure C):: -+* Dew (Pure C):: -+* Flow (Pure C):: -+* Pipe (Pure C):: -+@end menu -+ -+@c ================================================================== -+@node Traj (Pure C), Vect (Pure C), , Vector fields (Pure C) -+@subsection Traj (Pure C) -+@cindex Traj -+ -+@deftypefn {C function} @code{void} mgl_traj_xyz (@code{HMGL} gr, @code{const HMDT}x, @code{const HMDT}y, @code{const HMDT}z, @code{const HMDT}ax, @code{const HMDT}ay, @code{const HMDT}az, @code{const char *}sch=@code{NULL}, @code{float} len=@code{0}) -+@deftypefnx {C function} @code{void} mgl_traj_xy (@code{HMGL} gr, @code{const HMDT}x, @code{const HMDT}y, @code{const HMDT}ax, @code{const HMDT}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}, @code{float} len=@code{0}) -+The function draws vectors @{@var{ax}, @var{ay}, @var{az}@} along a curve @{@var{x}, @var{y}, @var{z}@}. The length and color of arrows are proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. The color is specified by the string argument @var{sch}. Previous color scheme is used by default. Parameter @var{len} set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if @var{len}=0). The minor sizea of all arrays must be equal and large 2. Vectors are plotted for each column of the arrays. See also @ref{Vect}. @sref{Traj sample} -+@end deftypefn -+ -+@c ================================================================== -+@node Vect (Pure C), VectC (Pure C), Traj (Pure C), Vector fields (Pure C) -+@subsection Vect (Pure C) -+@cindex Vect -+ -+@deftypefn {C function} @code{void} mgl_vect_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} zVal, @code{int} flag) -+The function draws plane vector field plot for the field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. The length of hachures is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of hachures depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. Parameter @var{flag} setup the hachures (arrows). It is compination of vlaues: @code{MGL_VEC_COL} for drawing bi-color arrow, @code{MGL_VEC_LEN} for drawing fixed length arrows, @code{MGL_VEC_DOT} for drawing hachures with dots instead of arrows, @code{MGL_VEC_END} for drawing arrows to the cell point, @code{MGL_VEC_MID} for drawing arrows with center at cell point. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also VectC(), Flow(), Dew(). @sref{Vect sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_vect_2d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} zVal, @code{int} flag) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_vect_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{int} flag) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the length of hachures is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Vect 3D sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_vect_3d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{int} flag) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node VectC (Pure C), Dew (Pure C), Vect (Pure C), Vector fields (Pure C) -+@subsection VectC (Pure C) -+@cindex VectC -+ -+These functions are obsolete -- use mgl_vect_*() functions instead. -+ -+@deftypefn {C function} @code{void} mgl_vectc_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} zVal) -+The function draws plane vector field plot for the field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. The color of hachures is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of hachures depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also Vect(), Flow(), Dew(). @sref{VectC sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_vectc_2d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_vectc_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of hachures is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{VectC 3D sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_vectc_3d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Dew (Pure C), Flow (Pure C), VectC (Pure C), Vector fields (Pure C) -+@subsection Dew (Pure C) -+@cindex Dew -+ -+@deftypefn {C function} @code{void} mgl_dew_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} zVal) -+The function draws dew-drops for plane vector field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. Note that this is very expensive plot in memory usage and creation time! The color of drops is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of drops depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also Vect(), VectC(). @sref{Dew sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dew (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@c ================================================================== -+@node Flow (Pure C), Pipe (Pure C), Dew (Pure C), Vector fields (Pure C) -+@subsection Flow (Pure C) -+@cindex Flow -+ -+@deftypefn {C function} @code{void} mgl_flow_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{int} num, @code{int} central, @code{float} zVal) -+The function draws flow threads for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} at level z = @var{zVal}. Number of threads is proportional to @var{num}. Parameter @var{central} sets the thread start from center (if true) or only from edges (if false). The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also Pipe(), VectC(), Vect(). @sref{Flow sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_flow_2d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{int} num, @code{int} central, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_flow_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{int} num, @code{int} central) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Flow 3D sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_flow_3d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{int} num, @code{int} central) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+ -+@deftypefn {C function} @code{void} mgl_flowp_xy (@code{float} x0, @code{float} y0, @code{float} z0, @code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch) -+The function draws flow threads for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} from point @{@var{x0}, @var{y0}@} at level z = @var{z0}. The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also Pipe(), VectC(), Vect(). @sref{Flow sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_flowp_2d (@code{float} x0, @code{float} y0, @code{float} z0, @code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{int} num, @code{int} central, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_flowp_xyz (@code{float} x0, @code{float} y0, @code{float} z0, @code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{int} num, @code{int} central) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Flow 3D sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_flowp_3d (@code{float} x0, @code{float} y0, @code{float} z0, @code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{int} num, @code{int} central) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+ -+@c ================================================================== -+@node Pipe (Pure C), , Flow (Pure C), Vector fields (Pure C) -+@subsection Pipe (Pure C) -+@cindex Pipe -+ -+@deftypefn {C function} @code{void} mgl_pipe_xy (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} r0, @code{int} num, @code{int} central, @code{float} zVal) -+The function draws flow pipes for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} at level z = @var{zVal}. Number of pipes is proportional to @var{num}. Parameter @var{central} sets the pipe start from center (if true) or only from edges (if false). The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. Parameter @var{r0} set the base pipe radius. If @var{r0}<0 then pipe radius is inverse proportional to amplitude. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also Pipe(), VectC(), Vect(). @sref{Pipe sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_pipe_2d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const char *}sch, @code{float} r0, @code{int} num, @code{int} central, @code{float} zVal) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_pipe_xyz (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{float} r0, @code{int} num, @code{int} central) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Pipe 3D sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_pipe_3d (@code{HMGL} gr, @code{const HMDT} ax, @code{const HMDT} ay, @code{const HMDT} az, @code{const char *}sch, @code{float} r0, @code{int} num, @code{int} central) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+ -+@c ################################################################## -+@node Other plotting (Pure C), Nonlinear fitting (Pure C), Vector fields (Pure C), C interface -+@section Other plotting (Pure C) -+ -+These functions perform miscelaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular mesh (TriPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]), simple plot (SimplePlot). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* DensXYZ (Pure C):: -+* ContXYZ (Pure C):: -+* ContFXYZ (Pure C):: -+* Dots (Pure C):: -+* Crust (Pure C):: -+* TriPlot (Pure C):: -+* Plots by formula (Pure C):: -+* SimplePlot (Pure C):: -+@end menu -+ -+@c ================================================================== -+@node DensXYZ (Pure C), ContXYZ (Pure C), , Other plotting (Pure C) -+@subsection DensXYZ (Pure C) -+@cindex DensX -+@cindex DensY -+@cindex DensZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. For example, code like -+@example -+mgl_dens_x(gr, mgl_data_sum(c,"x"),"BbcyrR",-1); -+mgl_dens_y(gr, mgl_data_sum(c.Sum("y"),0,1); -+mgl_dens_z(gr, mgl_data_sum(c.Sum("z"),0,-1); -+@end example -+will produce the following picture. See also Cont[XYZ](), ContF[XYZ](), Dens(). @sref{Dens projection sample} -+ -+@deftypefn {C function} @code{void} mgl_dens_x (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws density plot for data @var{a} at x = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dens_y (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws density plot for data @var{a} at y = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dens_z (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws density plot for data @var{a} at z = @var{sVal}. -+@end deftypefn -+ -+@c ================================================================== -+@node ContXYZ (Pure C), ContFXYZ (Pure C), DensXYZ (Pure C), Other plotting (Pure C) -+@subsection ContXYZ (Pure C) -+@cindex ContX -+@cindex ContY -+@cindex ContZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. For example, code like -+@example -+mgl_cont_x(gr, mgl_data_sum(c,"x"),"BbcyrR",-1,7); -+mgl_cont_y(gr, mgl_data_sum(c.Sum("y"),0,1,7); -+mgl_cont_z(gr, mgl_data_sum(c.Sum("z"),0,-1,7); -+@end example -+will produce the following picture. See also ContF[XYZ](), Dens[XYZ](), Cont(). @sref{Cont projection sample} -+ -+@deftypefn {C function} @code{void} mgl_cont_x (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal, @code{int} num) -+Draws @var{num}-th contour lines for data @var{a} at x = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont_y (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal, @code{int} num) -+Draws @var{num}-th contour lines for data @var{a} at y = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont_z (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal, @code{int} num) -+Draws @var{num}-th contour lines for data @var{a} at z = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont_x_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws contour lines for data @var{a}=@var{v}[i] at x = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont_y_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws contour lines for data @var{a}=@var{v}[i] at y = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_cont_z_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws contour lines for data @var{a}=@var{v}[i] at z = @var{sVal}. -+@end deftypefn -+ -+@c ================================================================== -+@node ContFXYZ (Pure C), Dots (Pure C), ContXYZ (Pure C), Other plotting (Pure C) -+@subsection ContFXYZ (Pure C) -+@cindex ContFX -+@cindex ContFY -+@cindex ContFZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also Cont[XYZ](), Dens[XYZ](), ContF(). -+ -+@deftypefn {C function} @code{void} mgl_contf_x (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at x = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf_y (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at y = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf_z (@code{HMGL} gr, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at z = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf_x_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws solid contours for data @var{a}=@var{v}[i] at x = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf_y_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws solid contours for data @var{a}=@var{v}[i] at y = @var{sVal}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_contf_z_val (@code{HMGL} gr, @code{const HMDT} v, @code{const HMDT} a, @code{const char *}stl, @code{float} sVal) -+Draws solid contours for data @var{a}=@var{v}[i] at z = @var{sVal}. -+@end deftypefn -+ -+@c ================================================================== -+@node Dots (Pure C), Crust (Pure C), ContFXYZ (Pure C), Other plotting (Pure C) -+@subsection Dots (Pure C) -+@cindex Dots -+ -+@deftypefn {C function} @code{void} mgl_dots (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+@deftypefnx {C function} @code{void} mgl_dots_a (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}sch) -+The function draws the arbitrary placed points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If array @var{a} is specified then it define the transparency of dots. Arrays @var{x}, @var{y}, @var{z}, @var{a} must have equal sizes. See also Crust(), Mark(), Plot(). @sref{Dots sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_dots_tr (@code{HMGL} gr, @code{const HMDT} tr, @code{const char *}sch) -+The same as previous with @var{x=tr}(0,:), @var{y=tr}(1,:), @var{z=tr}(2,:) and if @var{tr}.nx>3 then @var{a=tr}(3,:). -+@end deftypefn -+ -+@c ================================================================== -+@node Crust (Pure C), TriPlot (Pure C), Dots (Pure C), Other plotting (Pure C) -+@subsection Crust (Pure C) -+@cindex Crust -+ -+@deftypefn {C function} @code{void} mgl_crust (@code{HMGL} gr, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch, @code{float} er) -+The function reconstruct and draws the surface for arbitrary placed points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. Parameter @var{er} set relative radius for (increase it for removing holes). String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. Arrays @var{x}, @var{y}, @var{z} must have equal sizes. See also Dots(), TriPlot(). @sref{Crust sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_crust_tr (@code{HMGL} gr, @code{const HMDT} tr, @code{const char *}sch, @code{float} er) -+The same as previous with @var{x=tr}(0,:), @var{y=tr}(1,:), @var{z=tr}(2,:). -+@end deftypefn -+ -+@c ================================================================== -+@node TriPlot (Pure C), Plots by formula (Pure C), Crust (Pure C), Other plotting (Pure C) -+@subsection TriPlot (Pure C) -+@cindex TriPlot -+ -+@deftypefn {C function} @code{void} mgl_triplot_xyz (@code{HMGL} gr, @code{const HMDT} id, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const char *}sch) -+@deftypefnx {C function} @code{void} mgl_triplot_xyzc (@code{HMGL} gr, @code{const HMDT} id, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} c, @code{const char *}sch) -+The function draws the surface of triangles. Triangle vertexes are set by indexes @var{id} of data points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. String @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. First dimensions of @var{id} must be 3 or greater. Arrays @var{x}, @var{y}, @var{z} must have equal sizes. Parameter @var{c} set the colors of triangles (if @var{id}.ny=@var{c}.nx) or colors of vertexes (if @var{x}.nx=@var{c}.nx). See also Dots(), Crust(). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_triplot_xy (@code{HMGL} gr, @code{const HMDT} id, @code{const HMDT} x, @code{const HMDT} y, @code{const char *}sch, @code{float} zVal) -+The same as previous with @var{z}[i]=@var{zVal}. -+@end deftypefn -+ -+@c ================================================================== -+@node Plots by formula (Pure C), SimplePlot (Pure C), TriPlot (Pure C), Other plotting (Pure C) -+@subsection Plots by formula (Pure C) -+@cindex Plot -+@cindex Surf -+ -+These functions perform plotting of 1D or 2D functions specified by textual formula. You do not need to create the data arrays to plot it. The parameter @var{stl} set the line style (@pxref{Line styles}) for @code{Plot()} or color scheme (@pxref{Color scheme}) for @code{Surf()}. The parameter @var{n} set the minimal number of points along coordinate(s) for plots. At this time (v. 1.8) there is no adaptive increase of data points numbers but in future it will appear. -+ -+@deftypefn {C function} @code{void} mgl_fplot (@code{HMGL} gr, @code{const char *}eqY, @code{const char *}stl, @code{float} zVal, @code{int} n) -+The function draws function @samp{eqY(x)} at plane z=@var{zVal} where @samp{x} variable is changed in range [@var{Min}.x, @var{Max}.x]. See also @ref{Plot}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_fplot_xyz (@code{HMGL} gr, @code{const char *}eqX, @code{const char *}eqY, @code{const char *}eqZ, @code{const char *}stl, @code{float} zVal, @code{int} n) -+The function draws parametrical curve @{@samp{eqX(t)}, @samp{eqY(t)}, @samp{eqZ(t)}@} where @samp{t} variable is changed in range [0, 1]. See also @ref{Plot}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_fsurf (@code{HMGL} gr, @code{const char *}eqZ, @code{const char *}stl, @code{int} n); -+The function draws surface for function @samp{eqY(x,y)} where @samp{x}, @samp{y} variables are changed in range [@var{Min}, @var{Max}]. See also @ref{Surf}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_fsurf_xyz (@code{HMGL} gr, @code{const char *}eqX, @code{const char *}eqY, @code{const char *}eqZ, @code{const char *}stl, @code{int} n) -+The function draws parametrical surface @{@samp{eqX(u,v)}, @samp{eqY(u,v)}, @samp{eqZ(u,v)}@} where @samp{u}, @samp{v} variables are changed in range [0, 1]. See also @ref{Surf}. -+@end deftypefn -+ -+@c ================================================================== -+@node SimplePlot (Pure C), , Plots by formula (Pure C), Other plotting (Pure C) -+@subsection SimplePlot (Pure C) -+@cindex SimplePlot -+ -+@deftypefn {C function} @code{void} mgl_simple_plot (@code{HMGL} gr, @code{const HMDT} a, @code{int} type, @code{const char *}stl) -+Plots the array @var{a} depending on it's dimensions and @var{type} parameter. String @var{stl} specifies the style of plotting. For 1d data: @code{type=0} -- @ref{Plot}, @code{type=1} -- @ref{Area}, @code{type=2} -- @ref{Step}, @code{type=3} -- @ref{Stem}, @code{type=4} -- @ref{Bars}. For 2d data: @code{type=0} -- @ref{Surf}, @code{type=1} -- @ref{Dens}, @code{type=2} -- @ref{Mesh}, @code{type=3} -- @ref{Cont}. For 3d data: @code{type=0} -- @ref{Surf3}, @code{type=1} -- @ref{Dens3}, @code{type=2} -- @ref{Cont3}, @code{type=2} -- @ref{Cloud}. -+@end deftypefn -+ -+@c ################################################################## -+@node Nonlinear fitting (Pure C), Frames/Animation (Pure C), Other plotting (Pure C), C interface -+@section Nonlinear fitting (Pure C) -+ -+These functions fit data to formula. Fitting goal is to find formula parameters for the best fit the data points, i.e. to minimize the sum @math{\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2}. At this, approximation function @samp{f} can depend only on one argument @samp{x} (1D case), on two arguments @samp{x,y} (2D case) and on three arguments @samp{x,y,z} (3D case). The function @samp{f} also may depend on parameters. Normally the list of fitted parameters is specified by @var{var} string (like, @samp{abcd}). Usually user should supply initial values for fitted parameters by @var{ini} variable. But if he/she don't supply it then the zeros are used. -+ -+Functions Fit() and FitS() do not draw the obtained data themselves. They fill the data @var{fit} by formula @samp{f} with found coefficients and return the @math{\chi^2} error of approximation. At this, the @samp{x,y,z} coordinates are equidistantly distributed in the interval @var{Min}--@var{Max}. Number of points in @var{fit} is selected as maximal value of @var{fit} size and the value of @var{FitPnts}. Note, that this functions use GSL library and do something only if MathGL was compiled with GSL support. @sref{Fitting sample} -+ -+@deftypefn {C function} @code{float} mgl_fit_xyzas (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_xyzas_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-, y- and z-directions for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_xyzs (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_xyzs_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-, and y-directions for 2d array specified parametrically @var{a}[i,j](@var{x}[i,j], @var{y}[i,j]) for each data slice. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_xys (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_xys_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-direction for 1d array specified parametrically @var{a}[i](@var{x}[i]) for each data slice. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_ys (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_ys_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const HMDT} s, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-direction for 1d array with @var{x} equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_xyza (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_xyza_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-, y- and z-directions for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) with @var{s}[i,j,k]=1. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_xyz (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_xyz_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-, and y-directions for 2d array specified parametrically @var{a}[i,j](@var{x}[i,j], @var{y}[i,j]) with @var{s}[i,j]=1 for each data slice. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_xy (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_xy_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} x, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-direction for 1d array specified parametrically @var{a}[i](@var{x}[i]) with @var{s}[i]=1 for each data slice. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_1 (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_1_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-direction for 1d array @var{a} with @var{s}=1 and @var{x} equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_2 (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_2_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-, and y-directions for 2d array @var{a} with @var{s}=1 and @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_fit_3 (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{float *}ini) -+@deftypefnx {C function} @code{float} mgl_fit_3_d (@code{HMGL} gr, @code{HMDT} fit, @code{const HMDT} a, @code{const char *}func, @code{const char *}var, @code{HMDT} ini) -+Fit data along x-, y- and z-directions for 3d array @var{a} with @var{s}=1 and @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_puts_fit (@code{HMGL} gr, @code{float} x, @code{float} y, @code{float} z, @code{const char *}prefix, @code{const char *}font, @code{float} size=@code{-1}) -+Print last fitted formula with found coefficients (as numbers) at position @{@var{x}, @var{y}, @var{z}@}. The string @var{prefix} will be printed before formula. All other parameters are the same as in @ref{Text printing (Pure C)}. -+@end deftypefn -+ -+@c ################################################################## -+@node Frames/Animation (Pure C), Data import (Pure C), Nonlinear fitting (Pure C), C interface -+@section Frames/Animation (Pure C) -+@cindex NewFrame -+@cindex EndFrame -+@cindex GetNumFrame -+ -+These functions provide ability to create several pictures simultaneously. For most of cases it is useless but for widget classes (@pxref{Widget classes}) they can provide a way to show animation. Also you can write several frames into animated GIF file. -+ -+@deftypefn {C function} @code{int} mgl_new_frame (@code{HMGL} gr) -+Creates new frame. Function returns current frame id. Zero or negative parameter @var{id} leads to automatic numbering frames. Positive one sets the new frame id directly. This is not thread safe function! Use direct list creation in multithreading drawing. The function @code{mgl_end_frame()} @strong{must} be call after the finishing of the frame drawing for each call of this function. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_end_frame (@code{HMGL} gr) -+Finishes the frame drawing. -+@end deftypefn -+ -+@deftypefn {C function} @code{int} mgl_get_num_frame (@code{HMGL} gr) -+Gets the number of created frames. -+@end deftypefn -+ -+@deftypefn {C function} @code{int} mgl_resel_frames (@code{HMGL} gr) -+Reset frames counter (start it from zero). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_start_gif (@code{HMGL} gr, @code{const char *}fname, @code{int} ms) -+Start writing frames into animated GIF file @var{fname}. Parameter @var{ms} set the delay between frames in milliseconds. You @strong{should not} change the picture size during writing the cinema. Use mgl_close_gif() to finalize writing. Note, that this function is disabled in OpenGL mode. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_close_gif (@code{HMGL} gr) -+Finish writing animated GIF and close connected pointers. -+@end deftypefn -+ -+ -+@c ################################################################## -+@node Data import (Pure C), Data filling (Pure C), Frames/Animation (Pure C), C interface -+@section Data import (Pure C) -+@cindex Set -+ -+@deftypefn {C function} @code{void} mgl_data_create (@code{HMDT} dat, @code{int} mx, @code{int} my, @code{int} mz) -+Creates or recreates the array with specified size and fills it by zero. This function does nothing if one of parameters @var{mx}, @var{my}, @var{mz} is zero or negative. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_set_float (@code{HMDT} dat, @code{const float *}A, @code{int} NX, @code{int} NY, @code{int} NZ) -+@deftypefnx {C function} @code{void} mgl_data_set_double (@code{HMDT} dat, @code{const double *}A, @code{int} NX, @code{int} NY, @code{int} NZ) -+Allocates memory and copies the data from the @strong{flat} array. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_set_float2 (@code{HMDT} dat, @code{const float **}A, @code{int} N1, @code{int} N2) -+@deftypefnx {C function} @code{void} mgl_data_set_double2 (@code{HMDT} dat, @code{const double **}A, @code{int} N1, @code{int} N2) -+Allocates memory and copies the data from the @code{float**} array with dimensions @var{N1}, @var{N2}, i.e. from array defined like as @code{float a[N1][N2];}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_set_float3 (@code{HMDT} dat, @code{const float ***}A, @code{int} N1, @code{int} N2) -+@deftypefnx {C function} @code{void} mgl_data_set_double3 (@code{HMDT} dat, @code{const double ***}A, @code{int} N1, @code{int} N2) -+Allocates memory and copies the data from the @code{double***} array with dimensions @var{N1}, @var{N2}, @var{N3}, i.e. from array defined like as @code{float a[N1][N2][N3];}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_set_vector (@code{HMDT} dat, @code{gsl_vector *}v) -+Allocates memory and copies the data from the @code{gsl_vector *} structure. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_set_matrix (@code{HMDT} dat, @code{gsl_matrix *}m) -+Allocates memory and copies the data from the @code{gsl_matrix *} structure. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_set (@code{HMDT} dat, @code{const HMDT} d) -+Copies the data from HMDT instance @var{d}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_set_values (@code{const char *}str, @code{int} NX, @code{int} NY, @code{int} NZ) -+Allocates memory and scanf the data from the string. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Data filling (Pure C), Rearrange data (Pure C), Data import (Pure C), C interface -+@section Data filling (Pure C) -+@cindex Fill -+@cindex Modify -+ -+@deftypefn {C function} @code{void} mgl_data_fill (@code{HMDT} dat, @code{float} x1, @code{float} x2, @code{char} dir) -+Equidistantly fills the data values to range [@var{x1}, @var{x2}] in direction @var{dir}=@{@samp{x},@samp{y},@samp{z}@}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_fill (@code{HMGL} gr, @code{HMDT} dat, @code{const char *}eq, @code{const HMDT *}vdat, @code{const HMDT *}wdat) -+Fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}, @samp{v}, @samp{w}. Coordinates @samp{x}, @samp{y}, @samp{z} are supposed to be normalized in @emph{bounding box} of @var{gr} (in difference from @code{Modify} functions). Variable @samp{u} is the original value of the array. Variables @samp{v} and @samp{w} are values of @var{vdat}, @var{wdat} which can be @code{NULL} (i.e. can be omitted). -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_modify (@code{HMDT} dat, @code{const char *}eq, @code{int} dim) -+Function fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in interval [0,1]. Variable @samp{u} is the original value of the array. Modification will be fulfilled only for slices >=@var{dim}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_modify_vw (@code{HMDT} dat, @code{const char *}eq, @code{const HMDT} v, @code{const HMDT} w) -+Function fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}, @samp{v}, @samp{w}. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in interval [0,1]. Variable @samp{u} is the original value of the array. Variables @samp{v} and @samp{w} are values of @var{vdat}, @var{wdat} which can be @code{NULL} (i.e. can be ommited). -+@end deftypefn -+ -+@deftypefn mglData @code{void} mgl_data_put_val (@code{HMDT} a, @code{float} val, @code{int} i, @code{int} j, @code{int} k) -+Function sets value(s) of array a[@var{i}, @var{j}, @var{k}] = @var{val}. Negative indexes @var{i}, @var{j}, @var{k}=-1 set the value @var{val} to whole range in corresponding direction(s). For example, @code{mgl_data_put_val(a,val,-1,0,-1);} sets a[i,0,j]=@var{val} for i=0...(a.nx-1), j=0...(a.nz-1). -+@end deftypefn -+ -+@deftypefn mglData @code{void} mgl_data_put_dat (@code{HMDT} a, @code{const HMDT} v, @code{int} i, @code{int} j, @code{int} k) -+Function copies value(s) from array @var{v} to the range of array @var{a}. Negative indexes @var{i}, @var{j}, @var{k}=-1 set the range in corresponding direction(s). At this minor dimensions of array @var{v} should be large than corresponding dimensions of array @var{a}. For example, @code{mgl_data_put_dat(a,v,-1,0,-1);} sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(a.nx-1), j=0...(a.nz-1) and condition v.nx>=a.nx is true. -+@end deftypefn -+ -+ -+@deftypefn {C function} @code{void} mgl_data_set_value (@code{HMDT} dat, @code{float} v, @code{int} i, @code{int} j, @code{int} k) -+Sets the value in specified cell of the data with border checking. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_data_get_value (@code{HMDT} dat, @code{int} i, @code{int} j, @code{int} k) -+Gets the value in specified cell of the data with border checking. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_data_get_nx (@code{HMDT} dat) -+Gets the x-size of the data. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_data_get_ny (@code{HMDT} dat) -+Gets the y-size of the data. -+@end deftypefn -+ -+@deftypefn {C function} @code{float} mgl_data_get_nz (@code{HMDT} dat) -+Gets the z-size of the data. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Rearrange data (Pure C), File I/O (Pure C), Data filling (Pure C), C interface -+@section Rearrange data (Pure C) -+@cindex Rearrange -+@cindex Extend -+@cindex Transpose -+@cindex Squeeze -+@cindex Crop -+@cindex Delete -+@cindex Insert -+ -+@deftypefn {C function} @code{void} mgl_data_rearrange (@code{HMDT} dat, @code{int} mx, @code{int} my, @code{int} mz) -+Rearrange dimensions without changing data array so that resulting sizes should be @var{mx}*@var{my}*@var{mz} < nx*ny*nz. If some of parameter @var{my} or @var{mz} are zero then it will be selected to optimal fill of data array. For example, if @var{my}=0 then it will be change to @var{my}=nx*ny*nz/@var{mx} and @var{mz} will be 1. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_extend (@code{HMDT} dat, @code{int} n1, @code{int} n2) -+Increase the dimensions of the data by inserting new (|@var{n1}|+1)-th slices after (for @var{n1}>0) or before (for @var{n1}<0) of existed one. It is possible to insert 2 dimensions simultaneously for 1d data by using parameter @var{n2}. Data to new slices is copy from existed one. For example, for @var{n1}>0 new array will be -+@iftex -+@math{a_{ij}^{new} = a_i^{old}} where j=0...@var{n1}. Correspondingly, for @var{n1}<0 new array will be @math{a_{ij}^{new} = a_j^{old}} where i=0...|@var{n1}|. -+@end iftex -+@ifnottex -+a_ij^new = a_i^old where j=0...@var{n1}. Correspondingly, for @var{n1}<0 new array will be a_ij^new = a_j^old where i=0...|@var{n1}|. -+@end ifnottex -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_transpose (@code{const char *}dim) -+Transposes (shift order of) dimensions of the data. New order of dimensions is specified int string @var{dim}. This function may be useful also for the reading of one-dimensional data. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_squeeze (@code{HMDT} dat, @code{int} rx, @code{int} ry, @code{int} rz, @code{int} smooth) -+Reduces the data size by excluding data elements which indexes are not divisible by @var{rx}, @var{ry}, @var{rz} correspondingly. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_crop (@code{HMDT} dat, @code{int} n1, @code{int} n2, @code{char} dir) -+Cuts off edges of the data @var{i}<@var{n1} and @var{i}>@var{n2} if @var{n2}>0 or @var{i}>@code{n[xyz]}-@var{n2} if @var{n2}<=0 along direction @var{dir}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_insert (@code{HMDT} dat, @code{char} dir, @code{int} pos, @code{char} num) -+Insert @var{num} slices along @var{dir}-direction at position @var{pos} and fill it by zeros. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_delete (@code{HMDT} dat, @code{char} dir, @code{int} pos, @code{char} num) -+Delete @var{num} slices along @var{dir}-direction at position @var{pos}. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node File I/O (Pure C), Make another data (Pure C), Rearrange data (Pure C), C interface -+@section File I/O (Pure C) -+@cindex Read -+@cindex ReadMat -+@cindex Save -+@cindex Export -+@cindex Import -+ -+@deftypefn {C function} @code{void} mgl_data_read (@code{HMDT} dat, @code{const char *}fname) -+Reads data from tab-separated text file with auto determining sizes of the data. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_read_dim (@code{HMDT} dat, @code{const char *}fname, @code{int} mx, @code{int} my, @code{int} mz) -+Reads data from text file with specified data sizes. This function does nothing if one of parameters @var{mx}, @var{my} or @var{mz} is zero or negative. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_read_mat (@code{HMDT} dat, @code{const char *}fname, @code{int} dim) -+Read data from text file with size specified at beginning of the file by first @var{dim} numbers. At this, variable @var{dim} set data dimensions. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_save (@code{const HMDT} dat, @code{const char *}fname, @code{int} ns) -+Saves the whole data array (for @var{ns}=@code{-1}) or only ns-th slice to text file. If @var{ns}>0 then only @var{ns}-th slice (or column for 2D array) will be saved. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_import (@code{HMDT} dat, @code{const char *}fname, @code{const char *}scheme, @code{float} v1, float v2) -+Reads data from bitmap file (now support only PNG format). The RGB values of bitmap pixels are transformed to float values in range [@var{v1}, @var{v2}] using color scheme @var{scheme} (@pxref{Color scheme}). -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_export (@code{HMDT} dat, @code{const char *}fname, @code{const char *}scheme, @code{float} v1, float v2, @code{int} ns) const -+Saves data matrix (or @code{ns}-th slice for 3d data) to bitmap file (now support only PNG format). The data values are transformed from range [@var{v1}, @var{v2}] to RGB pixels of bitmap using color scheme @var{scheme} (@pxref{Color scheme}). If @var{v1}>=@var{v2} then the values of @var{v1}, @var{v2} are automatically determined as minimal and maximal value of the data array. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Make another data (Pure C), Functions on direction (Pure C), File I/O (Pure C), C interface -+@section Make another data (Pure C) -+@cindex SubData -+@cindex Column -+@cindex SetColumnId -+@cindex Hist -+@cindex Momentum -+@cindex Sum -+@cindex Max -+@cindex Min -+@cindex Combine -+@cindex Evaluate -+@cindex Resize -+ -+@deftypefn {C function} @code{HMDT} mgl_data_subdata (@code{const HMDT} dat, @code{int} xx, @code{int} yy, @code{int} zz) -+Extracts sub-array data from the original data array keeping fixed positive index. For example @code{SubData(-1,2)} extracts 3d row (indexes are zero based), @code{SubData(4,-1)} extracts 5th column, @code{SubData(-1,-1,3)} extracts 4th slice and so on. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_subdata_ext (@code{const HMDT} dat, @code{const HMDT} xx, @code{const HMDT} yy, @code{const HMDT} zz) -+Extracts sub-array data from the original data array for indexes specified by arrays @var{xx}, @var{yy}, @var{zz} (indirect access). The resulting array have the same dimensions as input arrays for 2D and 3D arguments. This function work like previous one for 1D arguments (or numbers). The dimensions of all argument must be the same if they are 2D or 3D arrays. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_column (@code{const HMDT} dat, @code{const char *}eq) -+Get column (or slice) of the data filled by formula @var{eq} of other named columns. For example, @code{Column("n*w^2/exp(t)");}. The column ids must be defined first by @code{SetColumnId()} function. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_set_id (@code{HMDT} dat, @code{const char *}ids) -+Sets the symbol id for data columns. The string must contain one symbol 'a'...'z' per column (without spaces). -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_hist (@code{const HMDT} dat, @code{int} n, @code{float} v1, @code{float} v2, @code{int} nsub) -+Creates @var{n}-th points distribution of the data values in range [@var{v1}, @var{v2}]. Parameter @var{nsub} define the number of additional interpolated points (for smoothness of histogram). -+@end deftypefn -+@deftypefn {C function} @code{HMDT} mgl_data_hist_w (@code{const HMDT} dat, @code{const HMDT} w, @code{int} n, @code{float} v1, @code{float} v2, @code{int} nsub) -+Creates @var{n}-th points distribution of the data values in range [@var{v1}, @var{v2}]. Array @var{w} specifies weights of the data elements. Parameter @var{nsub} define the number of additional interpolated points (for smoothness of histogram). -+@end deftypefn -+@deftypefn {C function} @code{HMDT} mgl_data_momentum (@code{const HMDT} dat, @code{char} dir, @code{const char *}how) -+Get momentum (1D-array) of the data along direction @var{dir}. String @var{how} contain kind of momentum. The momentum is defined like as -+@iftex -+@math{res_k = \sum_{ij} how(x_i,y_j,z_k) a_{ij}/\sum_{ij} a_{ij}} -+@end iftex -+@ifnottex -+res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij -+@end ifnottex -+if @var{var}=@samp{z} and so on. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in range [0,1]. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_sum (@code{const HMDT} dat, @code{const char *}dir) -+Gets array which is the result of summation in given direction or direction(s). -+@end deftypefn -+@deftypefn {C function} @code{HMDT} mgl_data_max_dir (@code{const HMDT} dat, @code{const char *}dir) -+Gets array which is the maximal data values in given direction or direction(s). -+@end deftypefn -+@deftypefn {C function} @code{HMDT} mgl_data_min_dir (@code{const HMDT} dat, @code{const char *}dir) -+Gets array which is the minimal data values in given direction or direction(s). -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_combine (@code{const HMDT} dat, @code{const HMDT} a) -+Returns direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on). -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_evaluate_i (@code{const HMDT} dat, @code{const HMDT} idat, @code{int} norm) -+@deftypefnx {C function} @code{HMDT} mgl_data_evaluate_ij (@code{const HMDT} dat, @code{const HMDT} idat, @code{const HMDT} jdat, @code{int} norm) -+@deftypefnx {C function} @code{HMDT} mgl_data_evaluate_ijk (@code{const HMDT} dat, @code{const HMDT} idat, @code{const HMDT} jdat, @code{const HMDT} kdat, @code{int} norm) -+Get array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data @var{idat}, @var{jdat}, @var{kdat}. Coordinates from @var{idat}, @var{jdat}, @var{kdat} are supposed to be normalized in range [0,1] (if @var{norm}=@code{true}) or in range [0,nx], [0,ny], [0,nz] correspondingly. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_resize (@code{const HMDT} dat, @code{int} mx, @code{int} my, @code{int} mz) -+@deftypefnx {C function} @code{HMDT} mgl_data_resize_box (@code{const HMDT} dat, @code{int} mx, @code{int} my, @code{int} mz, @code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2, @code{float} z1, @code{float} z2) -+Resizes the data to new size @var{mx}, @var{my}, @var{mz} from box (part) [@var{x1},@var{x2}] x [@var{y1},@var{y2}] x [@var{z1},@var{z2}] of original array. Initially x,y,z coordinates are supposed to be in [0,1]. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Functions on direction (Pure C), Interpolation (Pure C), Make another data (Pure C), C interface -+@section Functions on direction (Pure C) -+@cindex CumSum -+@cindex Integral -+@cindex Diff -+@cindex Diff2 -+@cindex Swap -+@cindex Mirror -+@cindex Sew -+@cindex Smooth -+@cindex Envelop -+@cindex Norm -+@cindex NormSl -+ -+These functions change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain @samp{x}, @samp{y} or @samp{z} characters for 1-st, 2-nd and 3-d dimension correspondengly. -+ -+@deftypefn {C function} @code{void} mgl_data_cumsum (@code{HMDT} dat, @code{const char *}dir) -+Cumulative summation of the data in given direction or directions. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_integral (@code{HMDT} dat, @code{const char *}dir) -+Integrates (like cumulative summation) the data in given direction or directions. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_diff (@code{HMDT} dat, @code{const char *}dir) -+Differentiates the data in given direction or directions. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_diff_par (@code{HMDT} dat, @code{const HMDT} x, @code{const HMDT}y, @code{const HMDT}z) -+Differentiates the data specified parametrically in direction @var{x} with @var{y}, @var{z}=constant. Parameter @var{z} can be @code{NULL} that correspond to 2D case. Parametrical differentiation uses the formula (for 2D case): @math{da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j)} where @math{a_i=da/di, a_j=da/dj} denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments -- for example, if you have 2D data a(i,j) which depend on coordinates @{x(i,j), y(i,j)@} then usual derivative along @samp{x} will be @code{Diff(x,y);} and usual derivative along @samp{y} will be @code{Diff(y,x);}. -+@end deftypefn -+ -+ -+@deftypefn {C function} @code{void} mgl_data_diff2 (@code{const char *}dir) -+Double-differentiates (like Laplace operator) the data in given direction. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_swap (@code{HMDT} dat, @code{const char *}dir) -+Swaps the left and right part of the data in given direction (useful for Fourier spectrum). -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_mirror (@code{HMDT} dat, @code{const char *}dir) -+Mirror the left-to-right part of the data in given direction. Looks like change the value index @var{i}->@var{n-i}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_sew (@code{HMDT} dat, @code{const char *}dir, @code{float} da) -+Remove value steps (like phase jumps after inverse trigonometric functions) with period @var{da} in given direction. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_smooth (@code{HMDT} dat, @code{int} Type, @code{float} delt, @code{const char *}dira) -+Smooths the data on specified direction or directions by method @var{Type}. Now 4 methods are supported: @code{SMOOTH_NONE} does nothing for @var{delta}=0 or approaches data to zero with the step @var{delta}, @code{SMOOTH_LINE_3} linear averaging by 3 points, @code{SMOOTH_LINE_5} linear averaging by 5 points, @code{SMOOTH_QUAD_5} quadratic averaging by 5 points. Parameter @var{delta} forbids to change values of array more than @var{delta} from the original ones. String @var{dirs} specifies the dimensions which will be smoothed. It may contain characters: 'x' for 1st dimension, 'y' for 2nd dimension, 'z' for 3d dimension. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_envelop (@code{HMDT} dat, @code{char} dir) -+Find envelop for data values along direction @var{dir}. -+@end deftypefn -+ -+@deftypefn {C function} @code{void} mgl_data_norm_slice (@code{HMDT} dat, @code{float} v1, @code{float} v2, @code{char} dir, @code{int} keep_en, @code{int} sym) -+Normalizes data slice-by-slice along direction @var{dir} the data in slices to range [@var{v1},@var{v2}]. If flag @var{sym}=@code{true} then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. If @var{keep_en} is set then maximal value of k-th slice will be limited by -+@iftex -+@math{\sqrt{\sum a_{ij}(k)/\sum a_{ij}(0)}}. -+@end iftex -+@ifnottex -+@math{\sqrt@{\sum a_ij(k)/\sum a_ij(0)@}}. -+@end ifnottex -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_norm (@code{HMDT} dat, @code{float} v1=@code{0}, @code{float} v2=@code{1}, @code{int} sym=@code{false}, @code{int} dim=@code{0}) -+Normalizes the data to range [@var{v1},@var{v2}]. If flag @var{sym}=@code{true} then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. Modification will be applied only for slices >=@var{dim}. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Interpolation (Pure C), Informational functions (Pure C), Functions on direction (Pure C), C interface -+@section Interpolation (Pure C) -+@cindex Spline -+@cindex Spline1 -+@cindex Linear -+@cindex Linear1 -+@cindex Spline5 -+@cindex v -+ -+@deftypefn {C function} @code{float} mgl_data_spline (@code{const HMDT} dat, @code{float} x, @code{float} y, @code{float} z) -+Interpolates data by cubic spline to the given point @var{x} in [0...nx-1], @var{y} in [0...ny-1], @var{z} in [0...nz-1]. -+@end deftypefn -+@deftypefn {C function} @code{float} mgl_data_spline1 (@code{const HMDT} dat, @code{float} x, @code{float} y, @code{float} z) -+Interpolates data by cubic spline to the given point @var{x}, @var{y}, @var{z} which assumed to be normalized in range [0, 1]. -+@end deftypefn -+@deftypefn {C function} @code{float} mgl_data_linear (@code{const HMDT} dat, @code{float} x, @code{float} y, @code{float} z) -+Interpolates data by linear function to the given point @var{x} in [0...nx-1], @var{y} in [0...ny-1], @var{z} in [0...nz-1]. -+@end deftypefn -+@deftypefn {C function} @code{float} mgl_data_linear11 (@code{const HMDT} dat, @code{float} x, @code{float} y, @code{float} z) -+Interpolates data by linear function to the given point @var{x}, @var{y}, @var{z} which assumed to be normalized in range [0, 1]. -+@end deftypefn -+@deftypefn {C function} @code{float} mgl_data_get_value (@code{const HMDT} dat, @code{int} i, @code{int} j, @code{int} k) -+Gets the value in specified cell of the data with border checking. -+@end deftypefn -+ -+@deftypefn {C function} @code{float *} mgl_data_value (@code{HMDT} dat, @code{int} i, @code{int} j, @code{int} k) -+Gets the pointer to data element. -+@end deftypefn -+@deftypefn {C function} @code{const float *} mgl_data_data (@code{const HMDT} dat) -+Gets the pointer to internal data array. -+@end deftypefn -+ -+ -+@c ------------------------------------------------------------------ -+@node Informational functions (Pure C), Operators (Pure C), Interpolation (Pure C), C interface -+@section Informational functions (Pure C) -+@cindex Maximal -+@cindex Minimal -+ -+@deftypefn {C function} @code{float} mgl_data_max (@code{const HMDT} dat) -+Gets maximal value of the data. -+@end deftypefn -+@deftypefn {C function} @code{float} mgl_data_min (@code{HMDT} dat) @code{const} -+Gets minimal value of the data. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Operators (Pure C), Global functions (Pure C), Informational functions (Pure C), C interface -+@section Operators (Pure C) -+ -+@deftypefn {C function} @code{void} mgl_data_mul_dat (@code{HMDT} dat, @code{const HMDT} d) -+Multiplies the data by the other one for each element. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_div_dat (@code{HMDT} dat, @code{const HMDT} d) -+Divides the data by the other one for each element. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_add_dat (@code{HMDT} dat, @code{const HMDT} d) -+Adds the other data. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_sub_dat (@code{HMDT} dat, @code{const HMDT} d) -+Subtracts the other data. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_mul_num (@code{HMDT} dat, @code{float} d) -+Multiplies each element by the number. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_div_num (@code{HMDT} dat, @code{float} d) -+Divides each element by the number. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_add_num (@code{HMDT} dat, @code{float} d) -+Adds the number to each element. -+@end deftypefn -+@deftypefn {C function} @code{void} mgl_data_sub_num (@code{HMDT} dat, @code{float} d) -+Subtracts the number to each element. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Global functions (Pure C), , Operators (Pure C), C interface -+@section Global functions (Pure C) -+ -+These functions are not so common. So I put it in this chapter. -+ -+@deftypefn {C function} @code{HMDT} mgl_transform (@code{const HMDT} real, @code{const HMDT} imag, @code{const char *}type) -+Do integral transformation of complex data @var{real}, @var{imag} on specified direction. Now only Fourier transformation is supported. The order of transformations is specified in string @var{type}: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: @samp{f} is forward Fourier transformation, @samp{i} is inverse Fourier transformation, @samp{n} or @samp{ } is no transformation. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_transform_a @code{const HMDT} ampl, @code{const HMDT} phase, @code{const char *}type) -+Do integral transformation of complex data @var{ampl}, @var{phase} on specified direction. Now only Fourier transformation is supported. The order of transformations is specified in string @var{type}: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: @samp{f} is forward Fourier transformation, @samp{i} is inverse Fourier transformation, @samp{n} or @samp{ } is no transformation. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_data_stfa (@code{const HMDT} real, @code{const HMDT} imag, @code{int dn, }@code{char} dir=@code{'x'}) -+Short time Fourier analysis for real and imaginary parts. Output is amplitude of partial Fourier of length @var{dn}. For example if @var{dir}=@samp{x}, result will have size @{int(nx/dn), dn, ny@} and it will contain @math{res[i,j,k]=|\sum_d^dn exp(I*j*d)*(real[i*dn+d,k]+I*imag[i*dn+d,k])|/dn}. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_pde_solve (@code{const char *}ham, @code{const HMDT} ini_re, @code{const HMDT} ini_im, @code{mglPoint} Min, @code{mglPoint} Max, @code{float} dz=@code{0.1}, @code{float} k0=@code{100}) -+Solves equation du/dz = i*k0*@var{ham}(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters @var{ini_re}, @var{ini_im} specify real and imaginary part of initial field distribution. Parameters @var{Min}, @var{Max} set the bounding box for the solution. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter @var{dz} set the step along evolutionary coordinate z. At this moment, simplified form of function @var{ham} is supported -- all ``mixed'' terms (like @samp{x*p}->x*d/dx) are excluded. For example, in 2D case this function is effectively @math{ham = f(p,z) + g(x,z,u)}. However commutable combinations (like @samp{x*q}->x*d/dy) are allowed. Here variable @samp{u} is used for field amplitude |u|. This allow one solve nonlinear problems -- for example, for nonlinear Shrodinger equation you may set @code{ham="p^2 + q^2 - u^2"}. You may specify imaginary part for wave absorption, like @code{ham = "p^2 + i*x*(x>0)"}, but only if dependence on variable @samp{i} is linear (i.e. @math{ham = hre+i*him}). @sref{PDE sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_ray_trace (@code{const char *}ham, @code{mglPoint} r0, @code{mglPoint} p0, @code{float} dt=@code{0.1}, @code{float} tmax=@code{10}) -+Solves GO ray equation like dr/dt = d @var{ham}/dp, dp/dt = -d @var{ham}/dr. This is Hamiltonian equations for particle trajectory in 3D case. Here @var{ham} is Hamiltonian which may depend on coordinates @samp{x}, @samp{y}, @samp{z}, momentums @samp{p}=px, @samp{q}=py, @samp{v}=pz and time @samp{t}: @math{ham = H(x,y,z,p,q,v,t)}. The starting point (at @code{t=0}) is defined by variables @var{r0}, @var{p0}. Parameters @var{dt} and @var{tmax} specify the integration step and maximal time for ray tracing. Result is array of @{x,y,z,p,q,v,t@} with dimensions @{7 * int(@var{tmax}/@var{dt}+1) @}. -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_qo2d_solve (@code{const char *}ham, @code{const HMDT} ini_re, @code{const HMDT} ini_im, @code{const HMDT} ray, @code{float} r, @code{float} k0, @code{HMDT} xx, @code{HMDT} yy) -+Solves equation du/dt = i*k0*@var{ham}(p,q,x,y,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators (see @code{mglPDE()} for details). Parameters @var{ini_re}, @var{ini_im} specify real and imaginary part of initial field distribution. Parameters @var{ray} set the reference ray, i.e. the ray around which the accompanied coordinate system will be maked. You may use, for example, the array created by @code{mglRay()} function. Note, that the reference ray @strong{must be} smooth enough to make accompanied coodrinates unambiguity. Otherwise errors in the solution may appear. If @var{xx} and @var{yy} are non-zero then Cartesian coordinates for each point will be written into them. @sref{Beam tracing sample} -+@end deftypefn -+ -+@deftypefn {C function} @code{HMDT} mgl_jacobian_2d (@code{const HMDT} x, @code{const HMDT} y) -+@deftypefnx {C function} @code{HMDT} mgl_jacobian_3d (@code{const HMDT} x, @code{const HMDT} y, @code{const HMDT} z) -+Computates the Jacobian for transformation @{i,j,k@} to @{@var{x},@var{y},@var{z}@} where initial coordinates @{i,j,k@} are data indexes normalized in range [0,1]. The Jacobian is determined by formula det||@math{dr_\alpha/d\xi_\beta}|| where @math{r}=@{@var{x},@var{y},@var{z}@} and @math{\xi}=@{i,j,k@}. All dimensions must be the same for all data arrays. Data must be 3D if all 3 arrays @{@var{x},@var{y},@var{z}@} are specified or 2D if only 2 arrays @{@var{x},@var{y}@} are specified. -+@end deftypefn -+ ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/mathgl.texi -@@ -0,0 +1,115 @@ -+\input texinfo -+@setfilename mathgl.info -+@set VERSION 1.9 -+@settitle MathGL @value{VERSION} -+@syncodeindex pg cp -+@comment %**end of header -+ -+@copying -+This manual is for MathGL (version @value{VERSION}), a collection of classes and routines for scientific plotting. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. -+ -+Copyright @copyright{} 2008 Alexey Balakin. -+ -+@quotation -+Permission is granted to copy, distribute and/or modify this document -+under the terms of the GNU Free Documentation License, Version 1.2 or -+any later version published by the Free Software Foundation; with no -+Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' -+and with the Back-Cover Texts as in (a) below. A copy of the -+license is included in the section entitled ``GNU Free Documentation -+License.'' -+ -+(a) The FSF's Back-Cover Text is: ``You have the freedom to -+copy and modify this GNU manual. Buying copies from the FSF -+supports it in developing GNU and promoting software freedom.'' -+@end quotation -+@end copying -+ -+@c @dircategory MathGL documentation system -+@c @direntry -+@c * MathGL: (mathgl). The library for scientific graphics. -+@c @end direntry -+ -+@titlepage -+@title MathGL -+@subtitle for version @value{VERSION} -+@author A.A. Balakin (@uref{http://mathgl.sourceforge.net/}) -+@page -+@vskip 0pt plus 1filll -+@insertcopying -+@end titlepage -+ -+@contents -+ -+@ifnottex -+@node Top -+@top MathGL -+ -+This file documents the Mathematical Graphic Library (MathGL), a collection of classes and routines for scientific plotting. It corresponds to release @value{VERSION} of the library. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. More information about MathGL can be found at the project homepage, @uref{http://mathgl.sourceforge.net/}. -+ -+Copyright @copyright{} 2008 Alexey A. Balakin. -+ -+@quotation -+Permission is granted to copy, distribute and/or modify this document -+under the terms of the GNU Free Documentation License, Version 1.2 or -+any later version published by the Free Software Foundation; with no -+Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' -+and with the Back-Cover Texts as in (a) below. A copy of the -+license is included in the section entitled ``GNU Free Documentation -+License.'' -+ -+(a) The FSF's Back-Cover Text is: ``You have the freedom to -+copy and modify this GNU manual. Buying copies from the FSF -+supports it in developing GNU and promoting software freedom.'' -+@end quotation -+ -+@end ifnottex -+ -+@menu -+* Overview:: -+* Examples:: -+* MathGL core:: -+* Plotter classes:: -+* Widget classes:: -+* mglData class:: -+* Other classes:: -+* C interface:: -+* Python interface:: -+* MGL interface:: -+* Samples:: -+* TeX-like symbols:: -+* Copying This Manual:: -+* Index:: -+@end menu -+ -+@rmacro sref {arg} -+@xref{\arg\}, for sample code and picture. -+@end rmacro -+@macro tdref{nam} -+@uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf} -+@end macro -+ -+@include overview.texi -+@include example.texi -+@include core.texi -+@include class.texi -+@include cint.texi -+@include python.texi -+@include mgl.texi -+ -+@include samples.texi -+ -+@node TeX-like symbols, Copying This Manual, Samples, Top -+@appendix TeX-like symbols -+@include appendix.texi -+ -+@node Copying This Manual, Index, TeX-like symbols, Top -+@appendix GNU Free Documentation License -+@include fdl.texi -+ -+@node Index, , Copying This Manual, Top -+@unnumbered Index -+ -+@printindex cp -+ -+@bye ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/python.texi -@@ -0,0 +1,1944 @@ -+@c ------------------------------------------------------------------ -+@node Python interface, MGL interface, C interface, Top -+@chapter Python interface -+@cindex mglGraph -+ -+MathGL provide the interface to a set of languages via SWIG library. Some of these languages support classes. The typical example is Python -- which is denoted in the chapter title. -+ -+To use Python classes just execute @samp{import mathgl}. The simplest example will be: -+@verbatim -+import mathgl -+a=mathgl.mglGraph() -+a.Box() -+a.WritePNG('test.png') -+@end verbatim -+Alternatively you can import all classes from @code{mathgl} module and easily access MathGL classes: -+@verbatim -+from mathgl import * -+a=mglGraph() -+a.Box() -+a.WritePNG('test.png') -+@end verbatim -+It become useful if you will create many @code{mglData} object, for example. -+ -+There are 2 classes in Python interface: -+@itemize -+@item @code{mglGraph} -+-- provide practically the same functionality as C++ class @code{mglGraph} (@pxref{MathGL core}). But it is not abstract class and it allows one to select at construction stage which plotter (ZB or PS and so on) will be used. -+@item @code{mglData} -+-- is absolutely the same class as C++ @code{mglData} (@pxref{mglData class}). But an additional feature to acess data values is added. You can use construction like this: @code{dat[i]=sth;} or @code{sth=dat[i]} at this flat representation of data is used (i.e., @var{i} can be in range 0...nx*nx*nz-1. -+@c @item @code{mglParse} -- practically the same as C++ class @code{mglParse} (@pxref{mglParse class}). -+@end itemize -+ -+There is main difference from C++ classes -- Python class @code{mglGraph} don't have variables (options). All corresponding features are moved to methods. -+The core of MathGL Python class is @strong{mglGraph} class. It contains a lot of plotting functions for 1D, 2D and 3D plots. So most of sections is describe its methods. Its constructor have following arguments: -+ -+@defop Constructor {mglGraph (Python)} @code{} mglGraph (@code{int} kind=@code{0}, @code{int} width=@code{600}, @code{int} height=@code{400}) -+Create the instance of class mglGraph with specified sizes @var{width} and @var{height}. Parameter @var{type} may have following values: @samp{0} -- use @code{mglGraphZB} plotter (default), @samp{1} -- use @code{mglGraphPS} plotter, @samp{2} -- use @code{mglGraphGL} plotter, @samp{3} -- use @code{mglGraphIDTF} plotter. -+@end defop -+ -+@menu -+* Graphics setup (Python):: -+* Axis settings (Python):: -+* Transformation matrix (Python):: -+* Export to file (Python):: -+* Primitives drawing (Python):: -+* Text printing (Python):: -+* Axis and Colorbar (Python):: -+* Legend (Python):: -+* 1D plotting (Python):: -+* 2D plotting (Python):: -+* 3D plotting (Python):: -+* Dual plotting (Python):: -+* Vector fields (Python):: -+* Other plotting (Python):: -+* Nonlinear fitting (Python):: -+* Frames/Animation (Python):: -+@end menu -+ -+@c ################################################################## -+@node Graphics setup (Python), Transformation matrix (Python), , Python interface -+@section Graphics setup (Python) -+@cindex MathGL setup -+ -+Functions in this group influences on overall graphics appearance. So all of them should be placed @emph{before} any actual plotting function calls. -+ -+@deftypemethod {mglGraph (Python)} @code{void} DefaultPlotParam () -+Restore initial values for all of parameters except described in @ref{Zooming (Python)}. -+@end deftypemethod -+ -+@menu -+* Transparency (Python):: -+* Lighting (Python):: -+* Fog (Python):: -+* Default sizes (Python):: -+* Zooming (Python):: -+* Cutting (Python):: -+* Font settings (Python):: -+* Palette and colors (Python):: -+* Other settings (Python):: -+@end menu -+ -+@c ================================================================== -+@node Transparency (Python), Lighting (Python), , Graphics setup (Python) -+@subsection Transparency (Python) -+@cindex Alpha -+@cindex AlphaDef -+@cindex Transparent -+@cindex TranspType -+ -+There are several functions and variables for setup transparency. The general function is @code{Alpha()} which switch on/off the transparency for overall plot. It influence only for graphics which created after @code{Alpha()} call. Variable @code{SetAlphaDef()} specify the default value of alpha-channel. You may switch off transparency of selected plot by variable @code{SetTransparent()}. Finally, variable @code{SetTranspType()} set the kind of transparency. @sref{Transparent surface sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Alpha (@code{bool} enable) -+Sets the transparency on/off. It is recommended to call this function before any plotting command. In any case it must be called before @code{Finish()} function if the last is used. Default value is transparency off. Unfortunately it switches the transparency on/off for all subplots. Use @code{SetTransparent(false)} in particular plot to disable its transparency. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetAlphaDef (@code{float} val) -+Sets default value of alpha channel (transparency) for all plotting functions. Note, that OpenGL (mglGraphGL) has incorrect drawing for large values of alpha in case of several overlapping surfaces. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetTransparent (@code{bool} val) -+Flag which temporary switches transparency on/off for the plot. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetTranspType (@code{int} type) -+This variable set the transparency type. Normal transparency (@samp{0}) -- below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces. Glass-like transparency (@samp{1}) -- below and upper things are commutable and just decrease intensity of light by RGB channel. Lamp-like transparency (@samp{2}) -- below and upper things are commutable and are the source of some additional light. I recommend to set @code{SetAlphaDef(0.3)} or less for lamp-like transparency. -+@end deftypemethod -+ -+@c ================================================================== -+@node Lighting (Python), Fog (Python), Transparency (Python), Graphics setup (Python) -+@subsection Lighting (Python) -+@cindex Light -+@cindex Ambient -+ -+There are several functions for setup lighting. The general function is @code{Light(bool)} which switch on/off the lighting for overall plot. It influence only for graphics which created after @code{Light()} call. Generally MathGL support up to 10 independent light sources. But in OpenGL mode only 8 of light sources is used due to OpenGL limitations. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number @code{0} with white color, located at top of the plot. -+ -+@deftypemethod {mglGraph (Python)} @code{void} Light (@code{bool} enable) -+Sets the using of light on/off for overall plot. It is recommended to call this function before any plotting command. Default value is lightning off. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Light (@code{int} n, @code{bool} enable) -+Switch on/off @var{n}-th light source separately. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} AddLight (@code{int} n, @code{float} x, @code{float} y, @code{float} z, @code{char} c=@code{'w'}) -+The function adds a light source with identification @var{n} at position @{@var{x}, @var{y}, @var{z}@}. The color of light is defined by character @var{c} or by RGB values @{@var{r}, @var{g}, @var{b}@} (white by default). The brightness of light is @var{br} which must be in range [0,1]. Flag @var{infty}=@code{true} puts the source to infinite distance (for the faster drawing). It is recommended to call this function before any plotting command. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Ambient (@code{float} bright=@code{0.5}) -+Sets the brightness of ambient light. The value should be in range [0,1]. It is recommended to call this function before any plotting command. -+@end deftypemethod -+ -+@c ================================================================== -+@node Fog (Python), Default sizes (Python), Lighting (Python), Graphics setup (Python) -+@subsection Fog (Python) -+@cindex Fog -+ -+@deftypemethod {mglGraph (Python)} @code{void} Fog (@code{float} d, @code{float} dz=@code{0.25}) -+Function imitate a fog in the plot. Fog start from relative distance @var{dz} from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-@emph{d*z}). Here @emph{z} is normalized to 1 depth of the plot. If value @var{d}=@code{0} then the fog is absent. @sref{Surface in fog sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Default sizes (Python), Zooming (Python), Fog (Python), Graphics setup (Python) -+@subsection Default sizes (Python) -+@cindex BarWidth -+@cindex MarkSize -+@cindex ArrowSize -+@cindex BaseLineWidth -+@cindex SetTickLen -+@cindex SetTickStl -+ -+These functions variables control the default (initial) values for most graphics parameters including sizes of markers, arrows, linewidth and so on. As any other settings these ones will influence only on plots created after the settings change. -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetBarWidth ( @code{float} val) -+Sets relative width of rectangles in Bars plot (@pxref{Bars}). Default value is @code{0.7}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetMarkSize (@code{float} val) -+The size of marks for @ref{1D plotting}. Default value is @code{0.02}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetArrowSize (@code{float} val) -+The size of arrows for @ref{1D plotting}, lines and curves (@pxref{Primitives drawing}). Default value is @code{0.03}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetBaseLineWidth (@code{float} val) -+The variable define the base width for all lines. The value <1 is ignored. For values > 1 the real line width is result of multiplication of specified line width and the value of @var{BaseLineWidth}. Increase of this variables is actual for large bitmap pictures. Default value is @code{1}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetTickLen (@code{float} val, @code{float} stt=@code{1}) -+The relative length of axis ticks. Default value is @code{0.1}. Parameter @var{stt}>0 set relative length of subticks which is in @code{sqrt(1+stt)} times smaller. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetTickStl (@code{const char *}stl, @code{const char *}sub) -+The line style of axis ticks (@var{stl}) and subticks (@var{sub}). If @var{stl} is empty then default style is used (@samp{k} or @samp{w} depending on transparency type). If @var{sub} is empty then ticks style is used (i.e. @var{stl}). -+@end deftypemethod -+ -+@c ================================================================== -+@node Zooming (Python), Cutting (Python), Default sizes (Python), Graphics setup (Python) -+@subsection Zooming (Python) -+@cindex PlotFactor -+@cindex Zoom -+ -+These functions control the overall zooming of the picture (see Zoom()) or the sub-picture (see PlotFactor). Normally you can use these variables and functions for removing ``white'' spaces around a plot. -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetPlotFactor (@code{float} val) -+Sets the factor of plot size. It is not recommended to set it lower then 1.6. This is some anlogue of function Zoom() but applied not to overall image but for each InPlot. Use negative value to enable automatic @code{PlotFactor} selection. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Zoom (@code{float} x1, @code{float} y1, @code{float} x2, @code{float} y2) -+Changes the scale of graphics that correspond to zoom in/out of the picture. After function call the current plot will be cleared and further the picture will contain plotting from its part [x1,x2]*[y1,y2]. Here picture coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} changes from 0 to 1. Attention! this settings can not be overwritten by any other functions. Use @code{Zoom(0,0,1,1)} to return default view. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cutting (Python), Font settings (Python), Zooming (Python), Graphics setup (Python) -+@subsection Cutting (Python) -+@cindex Cut -+@cindex CutMin -+@cindex CutMax -+@cindex CutOff -+ -+These functions set the condition when the points are excluded (cutted) from the drawing. -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetCut (@code{bool} val) -+Flag which determines how points outside bounding box are drawn. If it is @code{true} then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetCutBox (@code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2) -+Lower and upper edge of the box in which never points are drawn. If both edges are the same (the variables are equal) then the cutting box is empty. @sref{CutMinMax sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} CutOff (@code{const char *}EqC) -+Function set the cutting off condition by formula @var{EqC}. This condition determine will point be plotted or not. If value of formula is nonzero then point is omitted, otherwise it plotted. Set argument as @code{NULL} to disable cutting off condition. @sref{CutOff sample} -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Font settings (Python), Palette and colors (Python), Cutting (Python), Graphics setup (Python) -+@subsection Font settings (Python) -+@cindex FontSize -+@cindex FontDef -+@cindex RotatedText -+@cindex SetFont -+@cindex GetFont -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetFontSize (@code{float} val) -+Sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetFontDef (@code{char *}fnt) -+Sets the font specification (@pxref{Text printing (Python)}). Default is ``rC'' -- Roman font centering. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetRotatedText (@code{bool} val) -+Sets to use or not text rotation along axis. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} LoadFont (@code{const char *}name, @code{const char *}path=@code{NULL}) -+Load font typeface from @var{path}/@var{name}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} CopyFont (@code{mglGraph *} from) -+Copy font data from another @code{mglGraph} object. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} RestoreFont () -+Restore font data to default typeface. -+@end deftypemethod -+ -+@c ================================================================== -+@node Palette and colors (Python), Other settings (Python), Font settings (Python), Graphics setup (Python) -+@subsection Pallete and colors (Python) -+@cindex Pal -+@cindex NumPal -+@cindex SetPalette -+@cindex SetScheme -+@cindex SelectPen -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetPalette (@code{const char *}@var{colors}) -+Sets the palette as selected colors. Default value is @code{"Hbgrcmyhlnqeup"} that corresponds to colors: dark gray @samp{H}, blue @samp{b}, green @samp{g}, red @samp{r}, cyan @samp{c}, magenta @samp{m}, yellow @samp{y}, gray @samp{h}, blue-green @samp{l}, sky-blue @samp{n}, orange @samp{q}, yellow-green @samp{e}, blue-violet @samp{u}, purple @samp{p}. The palette is used mostly in 1D plots (@pxref{1D plotting}) for curves which styles are not specified. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetPalColor (@code{int} n, @code{float} r, @code{float} g, @code{float} b) -+Sets color for individual palette entry. Look at @code{mgl_set_palette()} function for simplified palette setting. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetPalNum (@code{int} num) -+Sets the number of actual colors in palette. The value must be less then 100. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetScheme (@code{const char *}sch) -+Set the color scheme for following plots. Usually this function is used internally. @xref{Color scheme}. -+@end deftypemethod -+ -+@c ================================================================== -+@node Other settings (Python), , Palette and colors (Python), Graphics setup (Python) -+@subsection Other settings (Python) -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetMeshNum (@code{int} val) -+Sets approximate number of lines in Mesh(), Fall(), Grid() and also the number of hachures in Vect(), VectC(), Dew() and the number of cells in Cloud*(). By default (=0) it draws all lines/hachures/cells. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetAxialDir (@code{char} val) -+Sets direction around which curve rotated in Axial() and Torus(). Default value is 'z'. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetDrawFace (@code{bool} val) -+If set to @code{true} then it prevent faces drawing. It is useful for speeding up drawing (for example, during rotation and so on). -+@end deftypemethod -+ -+@c ================================================================== -+@node Axis settings (Python), Transformation matrix (Python), Graphics setup (Python), Python interface -+@section Axis settings (Python) -+ -+These large set of functions control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected if @code{Cut=true} (@pxref{Cutting}), after it transformation formulas are applied, and finally the data was normalized in bounding box. -+ -+@menu -+* Ranges (Python):: -+* Transformation (Python):: -+* Ticks (Python):: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Ranges (Python), Transformation (Python), , Axis settings (Python) -+@subsection Ranges (Python) -+@cindex Axis -+@cindex CAxis -+@cindex XRange -+@cindex YRange -+@cindex ZRange -+@cindex Min -+@cindex Max -+@cindex Cmin -+@cindex Cmax -+@cindex RecalcBorder -+@cindex Org -+@cindex AutoOrg -+@cindex SetRanges -+@cindex SetAutoRanges -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetRanges (@code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2, @code{float} z1=@code{0}, @code{float} z2=@code{0}) -+Sets maximal and minimal values for coordinate range (bounding box). If minimal and maximal values of the coordinate are the same then they are ignored. This function also sets @var{Cmin}=@code{Min.z} and @var{Cmax}=@code{Max.z}. This is default color range for 2d plots. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetCRange (@code{float} min, @code{float} max) -+Sets values for color range. This values are used later for determining the color of the surface. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} XRange (@code{mglData} dat, @code{bool} add=@code{false}) -+Sets values of x-range as minimal and maximal values of data @var{a}. See also Axis(). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} YRange (@code{mglData} dat, @code{bool} add=@code{false}) -+Sets values of y-range as minimal and maximal values of data @var{a}. See also Axis(). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ZRange (@code{mglData} dat, @code{bool} add=@code{false}) -+Sets values of z-range as minimal and maximal values of data @var{a}. See also Axis(). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} CRange (@code{mglData} dat, @code{bool} add=@code{false}) -+Sets values of color range as minimal and maximal values of data @var{a}. See also CAxis(). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetOrigin (@code{float} x0, @code{float} y0, @code{float} z0) -+Sets center of axis cross section. If one of values is NAN then MathGL library try to select optimal axis position. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetAutoRanges (@code{float} x1, @code{float} x2, @code{float} y1=@code{0}, @code{float} y2=@code{0}, @code{float} z1=@code{0}, @code{float} z2=@code{0}) -+Sets ranges for automatic variables of plots. Function don't change the direction if minimal and maximal values are the same. For example, if y@var{y1}=@var{y2} then ranges along y-direction will not be changed (will be used previous one). Note that the automatic range become axis range after next call of [XYZ]Range() function(s). -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Transformation (Python), Ticks (Python), Ranges (Python), Axis settings (Python) -+@subsection Transformation (Python) -+@cindex Axis -+@cindex Ternary -+@cindex fx -+@cindex fy -+@cindex fz -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetFunc (@code{const char *}EqX, @code{const char *}EqY, @code{const char *}EqZ=@code{NULL}) -+Sets the transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for real coordinate depending on internal coordinates x, y, z. For example, the cylindrical coordinates are introduced as @code{SetFunc("x*cos(y)", "x*sin(y)", "z");}. For removing of formulas the corresponding parameter should be @code{NULL}. Using transformation formulas will slightly slowing the program, i.e. @code{SetFunc(NULL, NULL, NULL)} is faster than @code{SetFunc("x", "y", "z")}. @xref{mglFormula class}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetCoor (@code{int} how) -+Sets one of the predefined transformation formulas for curvilinear coordinate. Paramater @var{how} define the coordinates: @code{mglCartesian=0} -- Cartesian coordinates (no transformation); @code{mglPolar=1} -- Polar coordiantes @math{x_n=x*cos(y),y_n=x*sin(y), z_n=z}; @code{mglSpherical=2} -- Sperical coordinates @math{x_n=x*sin(y)*cos(z), y_n=x*sin(y)*sin(z), z_n=x*cos(y)}; @code{mglParabolic=3} -- Parabolic coordinates @math{x_n=x*y, y_n=(x*x-y*y)/2, z_n=z}; @code{mglParaboloidal=4} -- Paraboloidal coordinates @math{x_n=(x*x-y*y)*cos(z)/2, y_n=(x*x-y*y)*sin(z)/2, z_n=x*y}; @code{mglOblate=5} -- Oblate coordinates @math{x_n=cosh(x)*cos(y)*cos(z), y_n=cosh(x)*cos(y)*sin(z), z_n=sinh(x)*sin(y)}; @code{mglProlate=6} -- Prolate coordinates @math{x_n=sinh(x)*sin(y)*cos(z), y_n=sinh(x)*sin(y)*sin(z), z_n=cosh(x)*cos(y)}; @code{mglElliptic=7} -- Elliptic coordinates @math{x_n=cosh(x)*cos(y), y_n=sinh(x)*sin(y), z_n=z}; @code{mglToroidal=8} -- Toroidal coordinates @math{x_n=sinh(x)*cos(z)/(cosh(x)-cos(y)), y_n=sinh(x)*sin(z)/(cosh(x)-cos(y)), z_n=sin(y)/(cosh(x)-cos(y))}; @code{mglBispherical=9} -- Bispherical coordinates @math{x_n=sin(y)*cos(z)/(cosh(x)-cos(y)), y_n=sin(y)*sin(z)/(cosh(x)-cos(y)), z_n=sinh(x)/(cosh(x)-cos(y))}; @code{mglBipolar=10} -- Bipolar coordinates @math{x_n=sinh(x)/(cosh(x)-cos(y)), y_n=sin(y)/(cosh(x)-cos(y)), z_n=z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Ternary (@code{bool} tern) -+The function sets to draws Ternary plot. This special plot is for 3 dependent coordinates (components) @var{a}, @var{b}, @var{c} so that @var{a}+@var{b}+@var{c}=1. MathGL uses only 2 independent coordinates @var{a}=x and @var{b}=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on. @sref{Ternary plot sample} -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Ticks (Python), , Transformation (Python), Axis settings (Python) -+@subsection Ticks (Python) -+ -+@cindex SetTicks -+@cindex FactorPos -+@cindex TuneTicks -+@cindex TickStr -+@cindex AdjustTicks -+ -+@deftypemethod {mglGraph (Python)} @code{void} AdjustTicks (@code{const char *}dir) -+Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) @var{dir}. Also set @var{TuneTicks}=@code{true}. -+@end deftypemethod -+ -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetTicks (@code{char} dir, @code{float} d=@code{-5}, @code{int} ns=@code{0}, @code{float} org=@code{NAN}) -+Set the ticks step @var{d}, number of sub-ticks @var{ns} and initial ticks position @var{org} for the axis along direction @var{dir}. Variable @var{d} set step for axis ticks (if positive) or it's number on the axis range (if negative). Zero value set logarithmic ticks. If @var{org} value is NAN then value from @var{Org} is used. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetTicksVal (@code{char} dir, @code{int} n, @code{float *}val, @code{char **}lbl) -+@deftypemethodx mglGraph @code{void} SetTicksVal (@code{char} dir, @code{int} n, @code{float *}val, @code{wchar_t **}lbl) -+Set the manual positions @var{val} and its labels @var{lbl} for @var{n}-th ticks along axis @var{dir}. The arrays @var{val} and @var{lbl} have to contain @var{n} elements. Use @code{SetTicks()} to restore automatic ticks. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetTickTemplX (@code{const char *}xtt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetTickTemplY (@code{const char *}ytt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetTickTemplZ (@code{const char *}ztt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetTickTemplC (@code{const char *}ctt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetTickTemplX (@code{const wchar_t *}xtt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetTickTemplY (@code{const wchar_t *}ytt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetTickTemplZ (@code{const wchar_t *}ztt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetTickTemplC (@code{const wchar_t *}ctt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetXTT (@code{const char *}xtt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetYTT (@code{const char *}ytt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetZTT (@code{const char *}ztt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetCTT (@code{const char *}ctt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetXTT (@code{const wchar_t *}xtt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetYTT (@code{const wchar_t *}ytt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetZTT (@code{const wchar_t *}ztt) -+@deftypemethodx {mglGraph (Python)} @code{void} SetCTT (@code{const wchar_t *}ctt) -+The template for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If @var{xtt}, @var{ytt}, @var{ztt}, @var{ctt}=@code{NULL} then default template is used (in simplest case it is @samp{%.2g}) with automatic detaching of common multiplier or common component (see @var{TuneTicks}). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetTuneTicks (@code{bool} tune, @code{float} factor_pos=@code{1.15}) -+Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values) or common component (for narrow range, like from 0.999 to 1.000). Also set the position of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Transformation matrix (Python), Export to file (Python), Axis settings (Python), Python interface -+@section Transformation matrix (Python) -+@cindex Aspect -+@cindex Rotate -+@cindex RotateN -+@cindex SubPlot -+@cindex InPlot -+@cindex Identity -+@cindex Perspective -+@cindex RestoreM -+@cindex View -+@cindex ColumnPlot -+ -+These functions control how and where further plotting will be placed. There is a curtain order of calling of these functions for the better plot view. First one should be SubPlot() or InPlot() for specifying the place. After it a Rotate() and Aspect(). And finally any other plotting functions may be called. Alternatevely you can use ColumnPlot() for position plots in the column one by another without gap between plot axis (bounding boxes). -+ -+@deftypemethod {mglGraph (Python)} @code{void} SubPlot (@code{int} nx, @code{int} ny, @code{int} m, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+Puts further plotting in a @var{m}-th cell of @var{nx}*@var{ny} grid of the whole frame area. This function set off any aspects or rotations. So it should be used first for creating the subplot. From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size @var{dx}, @var{dy}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} InPlot (@code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2, @code{bool} rel=@code{false}) -+Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [@var{x1}, @var{x2}]*[@var{y1}, @var{y2}]. The coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} are normalized to interval [0, 1]. If parameter @var{rel}=@code{true} then the relative position to current SubPlot() (or last InPlot() with @var{rel}=@code{false}) is used. This function set off any aspects or rotations. So it should be used first for creating subplot. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ColumnPlot (@code{int} num, @code{int} ind) -+Puts further plotting in @var{ind}-th cell of column with @var{num} cells. The position is relative to previous SubPlot() call (or InPlot() with @var{rel}=@code{false}). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Rotate (@code{float} TetX, @code{float} TetZ, @code{float} TetY=@code{0}) -+Rotates a further plotting relative to each axis (x, z, y) consecutively on angles @var{TetX}, @var{TetZ}, @var{TetY}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} RotateN (@code{float} Tet, @code{float} x, @code{float} y, @code{float} z) -+Rotates a further plotting around vector @{x,y,z@}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Aspect (@code{float} Ax, @code{float} Ay, @code{float} Az) -+Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio @var{Ax:Ay:Az}. For the best effect it should be used after Rotate() function. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Perspective (@code{float} a) -+Add (switch on) the perspective to plot. The parameter @math{a ~ 1/z_@{eff@} \in [0,1)}. By default (@code{a=0}) the perspective is off. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Identity () -+Clears transformation matrix. This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is equivalent to the call of @code{InPlot(0,1,0,1)}. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Export to file (Python), Primitives drawing (Python), Transformation matrix (Python), Python interface -+@section Export to file (Python) -+@cindex WriteFrame -+@cindex WritePNG -+@cindex WritePNGSolid -+@cindex WriteGIF -+@cindex WriteIDTF -+@cindex WriteSVG -+@cindex WriteBMP -+@cindex WriteEPS -+@cindex WriteJPEG -+@cindex SetSize -+@cindex Flush -+@cindex ShowImage -+@cindex GetRGBA -+@cindex GetRGB -+@cindex GetBGRN -+@cindex GetWidth -+@cindex GetHeight -+ -+These functions export current view to a graphic file. The filename @var{fname} should have appropriate extension. Parameter @var{descr} gives the short description of the picture. Just now the transparency is supported in PNG and SVG files. -+ -+@deftypemethod mglGraph @code{void} WriteFrame (@code{const char *}fname=@code{NULL}, @code{const char *}descr=@code{NULL}) -+Exports current frame to a file @var{fname} which type is determined by the extension. Parameter @var{descr} adds description to file (can be @code{NULL}). If @var{fname}=@code{NULL} then the file @samp{frame####.jpg} is used, where @samp{####} is current frame id. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} WritePNG (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to PNG file with transparent background. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there are no description added. This function does nothing if NO_PNG is defined during compilation of MathGL library. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} WritePNGSolid (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to PNG file with non-transparent background (usually white). Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there are no description added. This function does nothing if NO_PNG is defined during compilation of MathGL library. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} WriteJPEG (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to JPEG file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there is no description added. This function does nothing if NO_JPEG is defined during compilation of MathGL library. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WriteGIF (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to GIF file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there is no description added. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} WriteBMP (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to BMP file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. There is no compression used. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} WriteEPS (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to EPS file. The vector representation is used if possible. So it is not recommended for the export of large data plot. It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there is no description added. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} WriteSVG (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to SVG (Scalable Vector Graphics) file. The vector representation is used. In difference of EPS format, SVG format support transparency that allows to correctly draw half-transparent plot (like SurfA(), Surf3A(), CloudQ() or CloudP()). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} WriteIDTF (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to IDTF file. Later this file can be converted to U3D format. The vector representation is used. So, the output file may be too large for graphic of large data array (especially for surfaces). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ShowImage (@code{const char *}viewer=@code{"kuickshow"}, @code{bool} nowait=@code{False}) -+Displays the current picture using external program @var{viewer} for viewing. The function save the picture to temporary file and call @var{viewer} to display it. If @var{nowait}=@code{true} then the function return immediately (it will not wait while window will be closed). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetSize (@code{int} width, @code{int} height) -+Sets size of picture in pixels. This function @strong{must be} called before any other plotting because it completely remove picture contents. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flush () -+Flushes the plotting commands to frame. This function may be useful if one wants to remove array before the finishing of the plot (i.e. before calling @code{Finish()}). Also call of this function separate the objects in mglGraphIDTF. Most of plots call this function internally. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{int} GetWidth () -+@deftypemethodx {mglGraph (Python)} @code{int} GetHeight () -+Gets width or height of the image. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} GetRGB (@code{char *}buf, @code{int} size) -+Gets RGB bitmap of the current state of the image to the buffer @var{buf} of size @var{size}. Function do nothing if @var{size}<3*Width*Height. Format of each element of bits is: @{red, green, blue@}. Number of elements is Width*Height. Position of element @{i,j@} is [3*i + 3*Width*j]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} GetRGBA (@code{char *}buf, @code{int} size) -+Gets RGBA bitmap of the current state of the image to the buffer @var{buf} of size @var{size}. Function do nothing if @var{size}<4*Width*Height. Format of each element of bits is: @{red, green, blue, alpha@}. Number of elements is Width*Height. Position of element @{i,j@} is [4*i + 4*Width*j]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} GetBGRN (@code{char *}buf, @code{int} size) -+Gets RGB bitmap of the current state of the image to the buffer @var{buf} of size @var{size}. Function do nothing if @var{size}<4*Width*Height. Format of each element of bits is: @{blue, green, red, 255@}. Number of elements is Width*Height. Position of element @{i,j@} is [4*i + 4*Width*j]. This format is useful for some widget libraries like Qt. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Primitives drawing (Python), Text printing (Python), Export to file (Python), Python interface -+@section Primitives drawing (Python) -+@cindex Ball -+@cindex Clf -+@cindex Line -+@cindex Curve -+@cindex Glyph -+@cindex Mark -+@cindex Error -+@cindex Face -+@cindex FaceX -+@cindex FaceY -+@cindex FaceZ -+@cindex Cone -+@cindex Drop -+@cindex Sphere -+ -+These functions draw some simple objects like line, point, sphere, drop, cone and so on. -+ -+@deftypemethod {mglGraph (Python)} @code{void} Clf (@code{float} r=@code{1}, @code{float} g=@code{1}, @code{float} b=@code{1}) -+Clear the picture and will it by color @{@var{r},@var{g},@var{b}@}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Ball (@code{float} x, @code{float} y, @code{float} z, @code{char *} col=@code{"r"}) -+Draws a point (ball) at position @var{p} with color @var{col}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Line (@code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2, @code{char *}stl=@code{"B"}, @code{int}num=@code{2}) -+Draws a geodesic line (straight line in Cartesian coordinates) from point @{@var{x1},@var{y1},@var{z1}@} to @{@var{x2},@var{y2},@var{z2}@} using line style @var{stl}. Parameter @var{num} define the ``quality'' of the line. If @var{num}=@code{2} then the straight line will be drawn in all coordinate system (independently on transformation formulas (@pxref{Transformation}). Contrary, for large values (for example, =@code{100}) the geodesic line will be drawn in corresponding coordinate system (straight line in Cartesian coordinates, circle in polar coordinates and so on). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Curve (@code{float} x1, @code{float} y1, @code{float} z1, @code{float} dx1, @code{float} dy1, @code{float} dz1, @code{float} x2, @code{float} y2, @code{float} z2, @code{float} dx2, @code{float} dy2, @code{float} dz2, @code{const char *}stl=@code{"B"}, @code{int} num=@code{100}) -+Draws Bezier-like curve from point @{@var{x1},@var{y1},@var{z1}@} to @{@var{x2},@var{y2},@var{z2}@} using line style @var{stl}. At this tangent is co-directed with @{@var{dx1},@var{dy1},@var{dz1}@}, @{@var{dx2},@var{dy2},@var{dz2}@} and proportional to its amplitude. Parameter @var{num} define the ``quality'' of the curve. If @var{num}=@code{2} then the straight line will be drawn in all coordinate system (independently on transformation formulas (@pxref{Transformation}). Contrary, for large values (for example, =@code{100}) the spline like Bezier curve will be drawn in corresponding coordinate system. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Face (@code{mglPoint} p1, @code{mglPoint} p2, @code{mglPoint} p3, @code{mglPoint} p4, @code{const char *}stl=@code{"w"}, @code{int} num=@code{2}) -+Draws the solid quadrangle (face) with vertexes @var{p1}, @var{p2}, @var{p3}, @var{p4} and with color(s) @var{stl}. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} FaceX (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} wy, @code{float} wz, @code{const char *}stl=@code{"w"}, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+@deftypemethodx {mglGraph (Python)} @code{void} FaceY (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} wx, @code{float} wz, @code{const char *}stl=@code{"w"}, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+@deftypemethodx {mglGraph (Python)} @code{void} FaceZ (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} wx, @code{float} wy, @code{const char *}stl=@code{"w"}, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+Draws the solid rectangle (face) perpendicular to [x,y,z]-axis correspondingly at position @{@var{x0}, @var{y0}, @var{z0}@} with color @var{stl} and with widths @var{wx}, @var{wy}, @var{wz} along corresponding directions. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Parameters @var{d1}!=0, @var{d2}!=0 set additional shift of the last vertex (i.e. to draw quadrangle). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Sphere (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} r, @code{const char *}stl=@code{"r"}) -+Draw the sphere with radius @var{r} and center at point @{@var{x0}, @var{y0}, @var{z0}@} and color @var{stl}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Drop (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} dx, @code{float} dy, @code{float} dz, @code{float} r, @code{const char *}col="r", @code{float} shift=@code{1}, @code{float} ap=@code{1}) -+Draw the drop with radius @var{r} at point @var{p} elongated in direction @var{q} and with color @var{col}. Parameter @var{shift} set the degree of drop oblongness: @samp{0} is sphere, @samp{1} is maximally oblongness drop. Parameter @var{ap} set relative width of the drop (this is analogue of ``ellipticity'' for the sphere). @sref{Drops sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cone (@code{float} x1, @code{float} y1, @code{float} z1, @code{float} x2, @code{float} y2, @code{float} z2, @code{float} r1, @code{float} r2=@code{-1}, @code{const char *}stl=@code{"B"}, @code{bool} edge=@code{false}) -+Draw tube (or truncated cone if @var{edge}=@code{false}) between points @{@var{x1},@var{y1},@var{z1}@}, @{@var{x2},@var{y2},@var{z2}@} with radius at the edges @var{r1}, @var{r2}. If @var{r2}<0 then it is suppsosed that @var{r2}=@var{r1}. The cone color is defined by string @var{stl}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Mark (@code{float} x, @code{float} y, @code{float} z, @code{char} mark) -+Draws a marks of different type at position @{@var{x},@var{y},@var{z}@}. -+@end deftypemethod -+ -+@c ################################################################## -+@node Text printing (Python), Axis and Colorbar (Python), Primitives drawing (Python), Python interface -+@section Text printing (Python) -+@cindex Puts -+@cindex Putsw -+@cindex Text -+@cindex Title -+ -+These functions draw the text. There are functions for drawing text in arbitrary place, in arbitrary direction and along arbitrary curve. The class mglFont (@pxref{mglFont class}) is used for low-level string parsing and printing. It can use arbitrary font-faces and parse many TeX commands. All these functions have 2 variant: for printing 8-bit text (@code{char *}) and for printing Unicode text (@code{wchar_t *}). In first case the conversion in current locale is used. So sometimes you need to specify it by @code{setlocale()} function. The size argument control the size of text: if positive it give the value, if negative it give the value relative to @var{FontSize}. The font type (STIX, arial, courier, times and so on) can be selected by function LoadFont(). @xref{Font settings (Python)}. -+ -+The font parameters are described by string. This string may contain several characters of font type (@samp{rbiwou}) and/or align (@samp{LRC}) specification. Also it may contain the text color @samp{wkrgbcymhRGBCYMHW} (@pxref{mglColor class}) after symbol @samp{:}. The font types are: @samp{r} -- roman font, @samp{i} -- italic style, @samp{b} -- bold style, @samp{w} -- wired style, @samp{o} -- over-lined text, @samp{u} -- underlined text. By default roman font is used. The align types are: @samp{L} -- align left (default), @samp{C} -- align center, @samp{R} -- align right. Also a parsing of the LaTeX-like syntax is provided (for detail @pxref{mglFont class}). For example, string @samp{iC:b} correspond to italic font style for centered text which printed by blue color. -+ -+@deftypemethod {mglGraph (Python)} @code{void} Puts (@code{float} x, @code{float} y, @code{float} z, @code{const char *}text, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}, @code{char} dir=@code{0}) -+@deftypemethodx {mglGraph (Python)} @code{void} Putsw (@code{float} x, @code{float} y, @code{float} z, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}, @code{char} dir=@code{0}) -+The function plots the string @var{text} at position @{@var{x},@var{y},@var{z}@} with fonts specifying by the criteria @var{how}. The size of font is set by @var{size} parameter (default is @var{FontSize}). Parameter @var{dir} specifies the additional string align. The aligns are: @samp{x} -- align as x-label, @samp{y} -- align as y-label, @samp{z} -- align as z-label, @samp{i} -- align as x-label but inverse writing direction, @samp{t} -- no align (default), @samp{n} -- align in x-y plane. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Puts (@code{float} x, @code{float} y, @code{float} z, @code{float} dx, @code{float} dy, @code{float} dz, @code{const char *}text, @code{char}where=@code{'t'}, @code{float} size=@code{-1}) -+@deftypemethodx {mglGraph (Python)} @code{void} Putsw (@code{float} x, @code{float} y, @code{float} z, @code{float} dx, @code{float} dy, @code{float} dz, @code{const wchar_t *}text, @code{char}where=@code{'t'}, @code{float} size=@code{-1}) -+The function plots the string @var{text} at position @{@var{x},@var{y},@var{z}@} along direction @{@var{dx},@var{dy},@var{dz}@} with specified @var{size}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Title (@code{const char *}text, @code{const char *}font=@code{0}, @code{int} size=@code{-2}) -+@deftypemethodx {mglGraph (Python)} @code{void} Title (@code{const wchar_t *}text, @code{const char *}font=@code{0}, @code{int} size=@code{-2}) -+Print string @var{text} as title of the picture (at the top of the picture). Can be used at any place (even inside SubPlot()). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Text (@code{mglData} y, @code{const char *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+@deftypemethodx {mglGraph (Python)} @code{void} Text (@code{mglData} y, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+@deftypemethodx {mglGraph (Python)} @code{void} Text (@code{mglData} x, @code{mglData} y, @code{const char *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+@deftypemethodx {mglGraph (Python)} @code{void} Text (@code{mglData} x, @code{mglData} y, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+@deftypemethodx {mglGraph (Python)} @code{void} Text (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+@deftypemethodx {mglGraph (Python)} @code{void} Text (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+The function draws @var{text} along the curve between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} by font style @var{font} and with size @var{size}. The string @var{font} may contain symbols @samp{t} for printing the text under the curve (default), or @samp{T} for printing the text above the curve. The sizes of 1st dimension must be equal for all arrays @var{x.nx=y.nx=z.nx}. If array @var{x} is not specified then its an automatic array is used with values equidistantly distributed in interval [@var{Min}.x, @var{Max}.x] (@pxref{Ranges (bounding box)}). @sref{Text sample} -+@end deftypemethod -+ -+@c ################################################################## -+@node Axis and Colorbar (Python), Legend (Python), Text printing (Python), Python interface -+@section Axis and Colorbar (Python) -+@cindex Axis -+@cindex Box -+@cindex Grid -+@cindex Colorbar -+@cindex Label -+ -+These functions draw the ``things for measuring'', like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information @pxref{Axis settings (Python)}. -+ -+@deftypemethod {mglGraph (Python)} @code{void} Axis (@code{const char *}dir=@code{"xyz"}, @code{bool} adjust=@code{false}) -+Draws axes with ticks (@pxref{Axis settings}) in directions determined by string parameter @var{dir}.If string contain the symbol @samp{_} then tick labels are not printed. Font for ticks labels is determined by @var{FontDef} (@pxref{Font settings (Python)}). Ticks will be adjusted if @var{adjust}=@code{true} (by call of @code{AdjustTicks()}). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Colorbar (@code{const char *}sch=@code{NULL}, @code{int} where=@code{0}) -+Draws colorbar with color scheme @var{sch} (current scheme if @code{sch=NULL}) at edge of plot. Parameter @var{where} specifies the position of colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{Dens sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Colorbar (@code{const char *}sch, @code{int} where, @code{float} x, @code{float} y, @code{float} w, @code{float} h) -+@deftypemethodx mglGraph @code{void} Colorbar (@code{int} where, @code{float} x, @code{float} y, @code{float} w, @code{float} h) -+Draws colorbar with color scheme @var{sch} (current scheme if not specified) at arbitrary position of subplot @{@var{x}, @var{y}@} (supposed to be in range [0,1]). Parameter @var{where} specifies the position of colorbar labels: @samp{0} - at left, @samp{1} - at right, @samp{2} - at bottom, @samp{3} - at top. Parameters @var{w}, @var{h} set the relative width and height of the colorbar. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Colorbar (@code{mglData} v, @code{const char *}sch=@code{NULL}, @code{int} where=@code{0}) -+Draws colorbar with sharp colors @var{sch} (current palette if @code{sch=NULL}) for values @var{v} at edge of plot. Parameter @var{where} specifies the position of colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{Dens sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Grid (@code{const char *}dir=@code{"xyz"}, @code{const char *}pen=@code{"B-"}) -+Draws grid lines perpendicular to direction determined by string parameter @var{dir}. The step of grid lines is the same as tick step for an Axis(). The style of lines is determined by @var{pen} parameter (default value is dark blue solid line (@samp{B-}). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Box (@code{const char *}col, @code{bool} ticks=@code{true}) -+Draws bounding box outside the plotting volume with color @var{col}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Label (@code{char} dir, @code{const char *}text, @code{int} pos=@code{+1}, @code{float} size=@code{-1.4}, @code{float} shift=@code{0}) -+Prints the label @var{text} for axis @var{dir}=@samp{x},@samp{y},@samp{z},@samp{t} (here @samp{t} is ``ternary'' axis @math{t=1-x-y}). The position of label is determined by @var{pos} parameter. If @var{pos}=0 then label is printed at the center of axis. If @var{pos}>0 then label is printed at the maximum of axis. If @var{pos}<0 then label is printed at the minimum of axis. Parameter @var{size} determines the font size for the label. By default the font size is 1.4 times larger than the one for ticks @var{FontSize} (@pxref{Font settings (Python)}). @xref{Text printing}. -+@end deftypemethod -+ -+@c ################################################################## -+@node Legend (Python), 1D plotting (Python), Axis and Colorbar (Python), Python interface -+@section Legend (Python) -+@cindex Legend -+@cindex AddLegend -+@cindex ClearLegend -+ -+These functions draw legend to the graph (useful for @ref{1D plotting}). Legend entry is a pair of strings: one for style of the line, another one with description text (with included LaTeX parsing). The array of string may be used directly or by accumulating first to the internal arrays (by function AddLegend()) and further plotting it. The position of the legend can be selected automatic or manually. Parameters @var{font} and @var{size} specify the font style and size (@pxref{Font settings (Python)}). Parameter @var{llen} set the relative width of the line sample and the text indent. If line style string for entry is empty then the corresponding text is printed without indent. @sref{Legend sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Legend (@code{int} where=@code{0x3}, @code{const char *}font=@code{"rL"}, @code{float} size=@code{-0.8}, @code{float} llen=@code{0.1}) -+Draws legend of accumulated legend entries by font @var{font} with @var{size}. Parameter @var{where} sets the position of the legend: @samp{0} is bottom left corner, @samp{1} is bottom right corner, @samp{2} is top left corner, @samp{3} is top right corner (is default). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Legend (@code{float} x, @code{float} y, @code{const char *}font=@code{"rL"}, @code{float} size=@code{-0.8}, @code{float} llen=@code{0.1}) -+Draws legend of accumulated legend entries by font @var{font} with @var{size}. Position of legend is determined by parameter @var{x}, @var{y} which supposed to be normalized to interval [0,1]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} AddLegend (@code{const char *}text, @code{const char *}style) -+@deftypemethodx {mglGraph (Python)} @code{void} AddLegend (@code{const wchar_t *}text, @code{const char *}style) -+Adds string @var{text} to internal legend accumulator. The style of described line and mark is specified in string @var{style} (@pxref{Line styles}). Maximal number of entries is 100. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ClearLegend () -+Clears saved legend strings. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SetLegendBox (@code{bool} enable) -+Switch on/off drawing box near legend. By default (=@code{true}) box is drawn. -+@end deftypemethod -+ -+@c ################################################################## -+@node 1D plotting (Python), 2D plotting (Python), Legend (Python), Python interface -+@section 1D plotting (Python) -+ -+These functions perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve @{x(i),y(i),z(i)@}, i=1...n. There are 5 generally different types of data representations: simple line plot (Plot), line plot with filling under it (Area), stairs plot (Step), bar plot (Bars, Barh) and vertical lines (Stem). Each type of plotting has similar interface. There are 3D version and two 2D versions. One of last requires single array. The parameters of line and marks are specified by the string argument. If the string parameter is NULL then solid line with color from palette Pal is used (@pxref{Palette and colors (Python)}). Also there are some special 1d plots having slightly different interface: surface of curve rotation (Torus), chart (Chart) and error boxes (Error), marks with variable size (Mark), tubes (Tube) and so on. @xref{Line styles}. -+ -+ -+@menu -+* Plot (Python):: -+* Radar (Python):: -+* Tens (Python):: -+* Area (Python):: -+* Region (Python):: -+* Bars (Python):: -+* Barh (Python):: -+* Stem (Python):: -+* Step (Python):: -+* Torus (Python):: -+* Chart (Python):: -+* Mark (Python):: -+* TextMark (Python):: -+* Error (Python):: -+* Tube (Python):: -+@end menu -+ -+ -+@c ================================================================== -+@node Plot (Python), Radar (Python), , 1D plotting (Python) -+@subsection Plot (Python) -+@cindex Plot -+ -+These functions draw continuous lines between points. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Area}, @ref{Step}, @ref{Stem}, @ref{Tube}, @ref{Mark}, @ref{Error}, @ref{Belt}, @ref{Tens}. @sref{Plot sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Plot (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Plot (@code{mglData} x, @code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Plot (@code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Radar (Python), Tens (Python), Plot (Python), 1D plotting (Python) -+@subsection Radar -+@cindex Radar -+ -+@deftypemethod {mglGraph (Python)} @code{void} Plot (@code{mglData} a, @code{const char *}pen=@code{NULL}, @code{float} r=@code{-1}) -+This functions draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). The plots are drawn for each row if one of the data is the matrix. Parameter @var{r} set the additional shift of data (i.e. the data @var{a}+@var{r} is used instead of @var{a}). If @code{r<0} then @code{r=max(0, -min(a)}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). If @var{pen} containt @samp{#} symbol then "grid" (radial lines and circle for @var{r}) is drawn See also @ref{Plot}. @sref{Radar sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Tens (Python), Area (Python), Radar (Python), 1D plotting (Python) -+@subsection Tens (Python) -+@cindex Tens -+ -+These functions draw continuous lines between points with color defined by the special array (look like tension plot). The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color scheme (@pxref{Color scheme}) and style and/or width of line (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with current color scheme is used. See also @ref{Plot}, @ref{Mesh}, @ref{Fall}. @sref{Tens sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tens (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} c, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space with color defined by @var{c}[i]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tens (@code{mglData} x, @code{mglData} y, @code{mglData} c, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} with color defined by @var{c}[i]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tens (@code{mglData} y, @code{mglData} c, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} with color defined by @var{c}[i], where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Area (Python), Region (Python), Tens (Python), 1D plotting (Python) -+@subsection Area (Python) -+@cindex Area -+ -+These functions draw continuous lines between points and fills it to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Bars}, @ref{Stem}. @sref{Area sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Area (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space and fills it down to @var{z} = Org.z. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Area (@code{mglData} x, @code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} and fills it down to @var{y} = Org.y. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Area (@code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} and fills it down to @var{y} = Org.y, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} AreaSum (@code{mglData} x, @code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z} and fills it down to @var{y} = Org.y. The lines are drawn one abover another (like summation). Note, you can reach the same effect if call @code{y.CumSum("y");} before @code{Area} plot. -+@end deftypemethod -+ -+@c ================================================================== -+@node Region (Python), Bars (Python), Area (Python), 1D plotting (Python) -+@subsection Region (Python) -+@cindex Region -+ -+These functions fill area between 2 curves. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y1.nx=y2.nx} and all dimensions of arrays @var{y1} and @var{y2} must be equal too. String @var{pen} specifies the color (@pxref{Line styles}). By default (@code{pen=NULL}) color from palette is used (@pxref{Palette and colors (Python)}). See also @ref{Area}, @ref{Bars}, @ref{Stem}. @sref{Region sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Region (@code{mglData} x, @code{mglData} y1, @code{mglData} y2, @code{const char *}pen=@code{NULL}, @code{bool} inside=@code{true}) -+The function fills area between curves @{@var{x}[i], @var{y}[i]@} and @{@var{x}[i], @var{y2}[i]@}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Region (@code{mglData} y1, @code{mglData} y2, @code{const char *}pen=@code{NULL}, @code{bool} inside=@code{true}) -+The function fills area between curves @{@var{x}[i], @var{y}[i]@} and @{@var{x}[i], @var{y2}[i]@}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Bars (Python), Barh (Python), Region (Python), 1D plotting (Python) -+@subsection Bars (Python) -+@cindex Bars -+ -+These functions draw vertical bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Barh}, @ref{Area}, @ref{Stem}, @ref{Chart}, @ref{Default sizes}. @sref{Bars sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Bars (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}pen=@code{NULL}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Bars (@code{mglData} x, @code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Bars (@code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Barh (Python), Stem (Python), Bars (Python), 1D plotting (Python) -+@subsection Barh (Python) -+@cindex Barh -+ -+These functions draw horizontal bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Barh}, @ref{Default sizes}. @sref{Barh sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Barh (@code{mglData} y, @code{mglData} v, @code{const char *}pen=@code{NULL}) -+The function draws horizontal bars from points @{@var{v}[i], @var{y}[i]@} down to @var{x} = Org.x in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Barh (@code{mglData} v, @code{const char *}pen=@code{NULL}) -+The function draws horizontal bars from points @{@var{v}[i], @var{y}[i]@} down to @var{x} = Org.x in plane @var{z}=@var{Min.z}, where @var{y}[i] values are equidistantly distributed in interval [@var{Min}.y, @var{Max}.y]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Stem (Python), Step (Python), Barh (Python), 1D plotting (Python) -+@subsection Stem (Python) -+@cindex Stem -+ -+These functions draw vertical lines from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Area}, @ref{Bars}, @ref{Plot}. @sref{Stem sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Stem (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}pen=@code{NULL}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Stem (@code{mglData} x, @code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Stem (@code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Step (Python), Torus (Python), Stem (Python), 1D plotting (Python) -+@subsection Step (Python) -+@cindex Step -+ -+These functions draw continuous stairs for points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Stem}, @ref{Tile}, @ref{Boxs}. @sref{Step sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Step (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}pen=@code{NULL}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Step (@code{mglData} x, @code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Step (@code{mglData} y, @code{const char *}pen=@code{NULL}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Torus (Python), Chart (Python), Step (Python), 1D plotting (Python) -+@subsection Torus (Python) -+@cindex Torus -+ -+These functions draw surface which is result of curve @{@var{r}, @var{z}@} rotation around @var{AxialDir} axis (@pxref{Other settings}). The sizes of 1st dimension @strong{must be equal} for all arrays @var{r.nx=z.nx}. String @var{pen} specifies the color (@pxref{Line styles}). By default (@code{pen=NULL}) color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Axial}. @sref{Torus sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Torus (@code{mglData} r, @code{mglData} z, @code{const char *}pen=@code{NULL}) -+The function draws surface which is result of curve @{@var{r}[i], @var{z}[i]@} rotation. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Torus (@code{mglData} z, @code{const char *}pen=@code{NULL}) -+The function draws surface which is result of curve @{@var{r}[i], @var{z}[i]@} rotation, where @var{r}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Chart (Python), Mark (Python), Torus (Python), 1D plotting (Python) -+@subsection Chart (Python) -+@cindex Chart -+ -+@deftypemethod {mglGraph (Python)} @code{void} Chart (@code{mglData} a, @code{const char *}col=@code{NULL}) -+The function draws colored stripes (boxes) for data in array @var{a}. The number of stripes is equal to the number of rows in @var{a} (equal to @var{a.ny}). The color of each next stripe is cyclically changed from colors specified in string @var{col} or in palette Pal (@pxref{Palette and colors}). Spaces in colors denote transparent ``color'', i.e. if @var{col} contain space(s) then corresponding stripe(s) are not drawn. The stripe width is proportional to value of element in @var{a}. Chart is plotted only for data with non-negative elements. If string @var{col} have symbol @samp{#} then black border lines are drawn. The most nice form the chart have in 3d (after rotation of coordinates) or in cylindrical coordinates (becomes so called Pie chart). @sref{Chart sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Mark (Python), TextMark (Python), Chart (Python), 1D plotting (Python) -+@subsection Mark (Python) -+@cindex Mark -+ -+These functions draw marks with size @var{r}*@var{MarkSize} (@pxref{Default sizes}) at points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). If you need to draw markers of the same size then you may use @ref{Plot} function. See also @ref{Plot}, @ref{TextMark}, @ref{Stem}, @ref{Error}. @sref{Mark sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Mark (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} r, @code{const char *}pen=@code{NULL}) -+The function draws marks for points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Mark (@code{mglData} x, @code{mglData} y, @code{mglData} r, @code{const char *}pen=@code{NULL}) -+The function draws marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Mark (@code{mglData} y, @code{mglData} r, @code{const char *}pen=@code{NULL}) -+The function draws marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node TextMark (Python), Error (Python), Mark (Python), 1D plotting (Python) -+@subsection TextMark (Python) -+@cindex TextMark -+ -+These functions draw string @var{text} as marks with size proportional to @var{r}*@var{MarkSize} (@pxref{Default sizes}) at points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Mark}, @ref{Stem}. @sref{TextMark sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} TextMark (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} r, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} TextMark (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} r, @code{const char *}text, @code{const char *}fnt=@code{NULL}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} TextMark (@code{mglData} x, @code{mglData} y, @code{mglData} r, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} TextMark (@code{mglData} x, @code{mglData} y, @code{mglData} r, @code{const char *}text, @code{const char *}fnt=@code{NULL}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} TextMark (@code{mglData} y, @code{mglData} r, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} TextMark (@code{mglData} y, @code{mglData} r, @code{const char *}text, @code{const char *}fnt=@code{NULL}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} TextMark (@code{mglData} y, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} TextMark (@code{mglData} y, @code{const char *}text, @code{const char *}fnt=@code{NULL}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. The mark sizes @var{r}[i]=1 for all points. -+@end deftypemethod -+ -+@c ================================================================== -+@node Error (Python), Tube (Python), TextMark (Python), 1D plotting (Python) -+@subsection Error (Python) -+@cindex Error -+ -+These functions draw error boxes at points @{@var{x}[i], @var{y}[i]@} on plane @var{z} = @var{Min.z}. This can be useful, for example, in experimental points, or to show numeric error or some estimations and so on. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}. @sref{Error sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Error (@code{mglData} x, @code{mglData} y, @code{mglData} ex, @code{mglData} ey, @code{const char *}pen=@code{NULL}) -+Draws a error box @{@var{ex}, @var{ey}@} in point position @{@var{x}, @var{y}@}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Error (@code{mglData} x, @code{mglData} y, @code{mglData} ey, @code{const wchar_t *}pen=@code{NULL}) -+Draws a error box @var{ey} (along only one direction) in point position @{@var{x}, @var{y}@}. -+@end deftypemethod -+@deftypemethod {mglGraph (Python)} @code{void} Error (@code{mglData} y, @code{mglData} ey, @code{const char *}pen=@code{NULL}) -+Draws a error box @var{ey} (along only one direction) in point position @{@var{x}, @var{y}@}, where @var{x} values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Tube (Python), , Error (Python), 1D plotting (Python) -+@subsection Tube (Python) -+@cindex Tube -+ -+These functions draw the tube with variable radius @var{r}[i] along the curve between points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}. @sref{Tube sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tube (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} r, @code{const char *}pen=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} Tube (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{float} r, @code{const char *}pen=@code{NULL}) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tube (@code{mglData} x, @code{mglData} y, @code{mglData} r, @code{const char *}pen=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} Tube (@code{mglData} x, @code{mglData} y, @code{float} r, @code{const char *}pen=@code{NULL}) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tube (@code{mglData} y, @code{mglData} r, @code{const char *}pen=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} Tube (@code{mglData} y, @code{float} r, @code{const char *}pen=@code{NULL}) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{Min.z}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ################################################################## -+@node 2D plotting (Python), 3D plotting (Python), 1D plotting (Python), Python interface -+@section 2D plotting (Python) -+ -+These functions perform plotting of 2D data. 2D means that data depend from 2 independent parameters like matrix @math{f(x_i,y_j), i=1...n, j=1...m}. There are 6 generally different types of data representations: simple mesh lines plot (Mesh), surface plot (Surf), surface plot by boxes (Boxs), surface plot by tiles (Tile), waterfall-like plot (Fall), belt plot (Belt), density plot (Dens), contour lines plot (Cont), solid contours plot (ContF) and its rotational figure (Axial). Cont, ContF and Axial functions have variants for automatic and manual selection of level values for contours. Also there are functions for plotting data grid lines according to the data format (Grid) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Mesh (Python):: -+* Fall (Python):: -+* Belt (Python):: -+* Surf (Python):: -+* Boxs (Python):: -+* Tile (Python):: -+* Dens (Python):: -+* Cont (Python):: -+* ContF (Python):: -+* ContD (Python):: -+* Axial (Python):: -+* Grid (Python):: -+@end menu -+ -+@c ================================================================== -+@node Mesh (Python), Fall (Python), , 2D plotting (Python) -+@subsection Mesh (Python) -+@cindex Mesh -+ -+@deftypemethod {mglGraph (Python)} @code{void} Mesh (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The function draws mesh lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Mesh lines are plotted for each z slice of the data. See also @ref{Surf}, @ref{Fall}, NeshNum (@pxref{Other settings}), @ref{Cont}, @ref{Tens}. @sref{Mesh sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Mesh (@code{mglData} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Fall (Python), Belt (Python), Mesh (Python), 2D plotting (Python) -+@subsection Fall (Python) -+@cindex Fall -+ -+@deftypemethod {mglGraph (Python)} @code{void} Fall (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The function draws fall lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If @var{sch} contain @samp{x} then lines are drawn along x-direction else (by default) lines are drawn along y-direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Fall lines are plotted for each z slice of the data. See also @ref{Belt}, @ref{Mesh}, @ref{Tens}, NeshNum (@pxref{Other settings}). @sref{Fall sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Fall (@code{mglData} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Belt (Python), Surf (Python), Fall (Python), 2D plotting (Python) -+@subsection Belt (Python) -+@cindex Belt -+ -+@deftypemethod {mglGraph (Python)} @code{void} Belt (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The function draws belts for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. This plot can be used as 3d generalization of Plot (@pxref{Plot}). String @var{sch} sets the color scheme. Previous color scheme is used by default. If @var{sch} contain @samp{x} then belts are drawn along x-direction else (by default) belts are drawn along y-direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Belts are plotted for each z slice of the data. See also @ref{Fall}, @ref{Surf}, @ref{Plot}, NeshNum (@pxref{Other settings}). @sref{Belt sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Belt (@code{mglData} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Surf (Python), Boxs (Python), Belt (Python), 2D plotting (Python) -+@subsection Surf (Python) -+@cindex Surf -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Mesh}, @ref{Dens}, @ref{Belt}, @ref{Tile}, @ref{Boxs}, @ref{SurfC}, @ref{SurfA}. @sref{Surf sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf (@code{mglData} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Boxs (Python), Tile (Python), Surf (Python), 2D plotting (Python) -+@subsection Boxs (Python) -+@cindex Boxs -+ -+@deftypemethod {mglGraph (Python)} @code{void} Boxs (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The function draws vertical boxes for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{Tile}, @ref{Step}. @sref{Boxs sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Boxs (@code{mglData} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Tile (Python), Dens (Python), Boxs (Python), 2D plotting (Python) -+@subsection Tile (Python) -+@cindex Tile -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tile (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The function draws horizontal tiles for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. Such plot can be used as 3d generalization of Step (@pxref{Step}). String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{Boxs}, @ref{Step}, @ref{TileS}. @sref{Tile sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Tile (@code{mglData} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dens (Python), Cont (Python), Tile (Python), 2D plotting (Python) -+@subsection Dens (Python) -+@cindex Dens -+ -+@deftypemethod {mglGraph (Python)} @code{void} Dens (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws density plot for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{Cont}, @ref{ContF}, @ref{DensXYZ}. @sref{Dens sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Dens (@code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cont (Python), ContF (Python), Dens (Python), 2D plotting (Python) -+@subsection Cont (Python) -+@cindex Cont -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont (@code{mglData} v, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}). Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Dens}, @ref{ContF}, @ref{Axial}, @ref{ContXYZ}. @sref{Cont sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont (@code{mglData} v, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont (@code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContF (Python), ContD (Python), Cont (Python), 2D plotting (Python) -+@subsection ContF (Python) -+@cindex ContF -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF (@code{mglData} v, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws solid (or filled) contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}). Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v} (must be @code{v.nx>2}). String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Dens}, @ref{Cont}, @ref{ContD}, @ref{Axial}, @ref{ContFXYZ}. @sref{ContF sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF (@code{mglData} v, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF (@code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContD (Python), Axial (Python), ContF (Python), 2D plotting (Python) -+@subsection ContD (Python) -+@cindex ContD -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContD (@code{mglData} v, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws solid (or filled) contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}) with manual colors. Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v} (must be @code{v.nx>2}). String @var{sch} sets the contour colors: the color of k-th contour is determined by character @code{sch[k%strlen(sch)]}. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Dens}, @ref{Cont}, @ref{ContF}. @sref{ContD sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContD (@code{mglData} v, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContD (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContD (@code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Axial (Python), Grid (Python), ContD (Python), 2D plotting (Python) -+@subsection Axial (Python) -+@cindex Axial -+ -+@deftypemethod {mglGraph (Python)} @code{void} Axial (@code{mglData} v, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The function draws surface which is result of contour plot rotation for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then wire plot is produced. If string contain symbols @samp{x}, @samp{y} or @samp{z} then rotation axis @var{AxialDir} (@pxref{Other settings}) will be set to specified direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Cont}, @ref{ContF}, @ref{Torus}, @ref{Surf3}. @sref{Axial sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Axial (@code{mglData} v, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Axial (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Axial (@code{mglData} z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Grid (Python), , Axial (Python), 2D plotting (Python) -+@subsection Grid (Python) -+@cindex Grid -+ -+@deftypemethod {mglGraph (Python)} @code{void} Grid (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws grid lines for density plot of surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Grid is plotted for each z slice of the data. See also @ref{Dens}, @ref{Cont}, @ref{ContF}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Grid (@code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node 3D plotting (Python), Dual plotting (Python), 2D plotting (Python), Python interface -+@section 3D plotting (Python) -+ -+These functions perform plotting of 3D data. 3D means that data depend from 3 independent parameters like matrix @math{f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l}. There are 4 generally different types of data representations: isosurface or surface of constant value (Surf3), density plot at slices (Dens3), contour lines plot at slices (Cont3), solid contours plot at slices (ContF3) and cloud-like plot (Cloud). Surf3, Cont3 and ContF3 functions have variants for automatic and manual selection of level values for surfaces/contours. Also there are functions for plotting data grid lines according to the data format (Grid3) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Surf3 (Python):: -+* Dens3 (Python):: -+* Cont3 (Python):: -+* ContF3 (Python):: -+* Grid3 (Python):: -+* Cloud (Python):: -+* Beam (Python):: -+@end menu -+ -+@c ================================================================== -+@node Surf3 (Python), Dens3 (Python), , 3D plotting (Python) -+@subsection Surf3 (Python) -+@cindex Surf3 -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3 (@code{float} val, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}stl=@code{NULL}) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also @ref{Cloud}, @ref{Dens3}, @ref{Surf3C}, @ref{Surf3A}, @ref{Axial}. @sref{Surf3 sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3 (@code{float} val, @code{mglData} a, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3 (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3 (@code{mglData} a, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dens3 (Python), Cont3 (Python), Surf3 (Python), 3D plotting (Python) -+@subsection Dens3 (Python) -+@cindex Dens3 -+@cindex DensA -+ -+@deftypemethod {mglGraph (Python)} @code{void} Dens3 (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws density plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Density is plotted at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Cont3}, @ref{ContF3}, @ref{Dens}, @ref{Grid3}. @sref{Dens3 sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Dens3 (@code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} DensA (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}stl=@code{NULL}) -+Draws density plots at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} DensA (@code{mglData} a, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cont3 (Python), ContF3 (Python), Dens3 (Python), 3D plotting (Python) -+@subsection Cont3 (Python) -+@cindex Cont3 -+@cindex ContA -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont3 (@code{mglData} v, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws contour plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Contours are plotted for values specified in array @var{v} at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Dens3}, @ref{ContF3}, @ref{Cont}, @ref{Grid3}. @sref{Cont3 sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont3 (@code{mglData} v, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont3 (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cont3 (@code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContA (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+Draws contour plots at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContA (@code{mglData} a, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContF3 (Python), Grid3 (Python), Cont3 (Python), 3D plotting (Python) -+@subsection ContF3 (Python) -+@cindex ContF3 -+@cindex ContFA -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF3 (@code{mglData} v, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws solid (or filled) contour plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Contours are plotted for values specified in array @var{v} at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Dens3}, @ref{Cont3}, @ref{ContF}, @ref{Grid3}. @sref{ContF3 sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF3 (@code{mglData} v, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF3 (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContF3 (@code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFA (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+Draws contour plots at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFA (@code{mglData} a, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Grid3 (Python), Cloud (Python), ContF3 (Python), 3D plotting (Python) -+@subsection Grid3 (Python) -+@cindex Grid3 -+@cindex GridA -+ -+@deftypemethod {mglGraph (Python)} @code{void} Grid3 (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws grid for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Density is plotted at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Cont3}, @ref{ContF3}, @ref{Dens3}, @ref{Grid}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Grid3 (@code{mglData} a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} GridA (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}stl=@code{NULL}) -+Draws grids at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} GridA (@code{mglData} a, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cloud (Python), Beam (Python), Grid3 (Python), 3D plotting (Python) -+@subsection Cloud (Python) -+@cindex CloudP -+@cindex CloudQ -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cloud (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} alpha=@code{1}) -+The function draws cloud plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). This plot is a set of cubes with color and transparency proportional to value of @var{a}. The resulting plot is like cloud -- low value is transparent but higher ones are not. The number of plotting cells depend on MeshNum (@pxref{Other settings}). String @var{sch} sets the color scheme. Previous color scheme is used by default. Parameter @var{alpha} changes the overall transparency of plot. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Surf3}. @sref{CloudQ sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Cloud (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} alpha=@code{1}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Beam (Python), , Cloud (Python), 3D plotting (Python) -+@subsection Beam (Python) -+@cindex Beam -+ -+@deftypemethod {mglGraph (Python)} @code{void} Beam (@code{float} val, @code{mglData} tr, @code{mglData} g1, @code{mglData} g2, @code{mglData} a, @code{float} r, @code{const char *}stl=@code{NULL}, @code{int} flag=@code{0}) -+Draws the isosurface for 3d array @var{a} at constant values of @var{a}=@var{val}. This is special kind of plot for @var{a} specified in accompanied coordinates along curve @var{tr} with orts @var{g1}, @var{g2} and with transverse scale @var{r}. Variable @var{flag} is bitwise: @samp{0x1} - draw in accompanied (not laboratory) coordinates; @samp{0x2} - draw projection to @math{\rho-z} plane; @samp{0x4} - draw normalized in each slice field. The x-size of data arrays @var{tr}, @var{g1}, @var{g2} must be nx>2. The y-size of data arrays @var{tr}, @var{g1}, @var{g2} and z-size of the data array @var{a} must be equal. @xref{Surf3}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Beam (@code{mglData} tr, @code{mglData} g1, @code{mglData} g2, @code{mglData} a, @code{float} r, @code{const char *}stl=@code{NULL}, @code{int} flag=@code{0}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+ -+ -+@c ################################################################## -+@node Dual plotting (Python), Vector fields (Python), 3D plotting (Python), Python interface -+@section Dual plotting (Python) -+ -+These plotting functions draw @emph{two matrix} simultaneously. There are 5 generally different types of data representations: surface or isosurface colored by other data (SurfC, Surf3C), surface or isosurface transpared by other data (SurfA, Surf3A), tiles with variable size (TileS), mapping diagram (Map), STFA diagram (STFA). Surf3A and Surf3C have variants for automatic and manual selection of level values for isosurfaces. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* SurfC (Python):: -+* Surf3C (Python):: -+* SurfA (Python):: -+* Surf3A (Python):: -+* TileS (Python):: -+* Map (Python):: -+* STFA (Python):: -+@end menu -+ -+@c ================================================================== -+@node SurfC (Python), Surf3C (Python), , Dual plotting (Python) -+@subsection SurfC (Python) -+@cindex SurfC -+ -+@deftypemethod {mglGraph (Python)} @code{void} SurfC (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} c, @code{const char *}sch=@code{NULL}) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} and color it by matrix @var{c}[i,j]. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. All dimensions of arrays @var{z} and @var{c} must be equal. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{SurfA}, @ref{Surf3C}. @sref{SurfC sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SurfC (@code{mglData} z, @code{mglData} c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Surf3C (Python), SurfA (Python), SurfC (Python), Dual plotting (Python) -+@subsection Surf3C (Python) -+@cindex Surf3C -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3C (@code{float} val, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{mglData} c, @code{const char *}stl=@code{NULL}) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as Surf3() function but the color of isosurface depends on values of array @var{c}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. All dimensions of arrays @var{z} and @var{c} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also @ref{Surf3}, @ref{SurfC}, @ref{Surf3A}. @sref{Surf3C sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3C (@code{float} val, @code{mglData} a, @code{mglData} c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3C (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{mglData} c, @code{const char *}stl=@code{NULL}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3C (@code{mglData} a, @code{mglData} c, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node SurfA (Python), Surf3A (Python), Surf3C (Python), Dual plotting (Python) -+@subsection SurfA (Python) -+@cindex SurfA -+ -+@deftypemethod {mglGraph (Python)} @code{void} SurfA (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} c, @code{const char *}sch=@code{NULL}) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} and transparent it by matrix @var{c}[i,j]. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. All dimensions of arrays @var{z} and @var{c} must be equal. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{SurfC}, @ref{Surf3A}, @ref{TileS}. @sref{SurfA sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} SurfA (@code{mglData} z, @code{mglData} c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Surf3A (Python), TileS (Python), SurfA (Python), Dual plotting (Python) -+@subsection Surf3A (Python) -+@cindex Surf3A -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3A (@code{float} val, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{mglData} c, @code{const char *}stl=@code{NULL}) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as Surf3() function but the transparency of isosurface depends on values of @var{b} array. This allows one to remove the part of isosurface where @var{b} is negligibly small (useful for phase plotting of a beam or a pulse). String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. All dimensions of arrays @var{z} and @var{c} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also @ref{Surf3}, @ref{SurfA}, @ref{Surf3C}. @sref{Surf3A sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3A (@code{float} val, @code{mglData} a, @code{mglData} c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3A (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{mglData} c, @code{const char *}stl=@code{NULL}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf3A (@code{mglData} a, @code{mglData} c, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node TileS (Python), Map (Python), Surf3A (Python), Dual plotting (Python) -+@subsection TileS (Python) -+@cindex TileS -+ -+@deftypemethod {mglGraph (Python)} @code{void} TileS (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} r, @code{const char *}sch=@code{NULL}) -+The function draws horizontal tiles for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. It is mostly the same as Tile() but the size of tiles is determined by @var{r} array. This is some kind of ``transparency'' useful for exporting to EPS files. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{SurfA}, @ref{Tile}. @sref{TileS sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} TileS (@code{mglData} z, @code{mglData} c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Map (Python), STFA (Python), TileS (Python), Dual plotting (Python) -+@subsection Map (Python) -+@cindex Map -+ -+@deftypemethod {mglGraph (Python)} @code{void} Map (@code{mglData} x, @code{mglData} y, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{int} ks=@code{0}, @code{bool} pnts=@code{true}) -+The function draws mapping plot for matrices @{@var{ax}, @var{ay} @} which parametrically depend on coordinates @var{x}, @var{y}. The previous position of the cell (point) is marked by color. Height is proportional to Jacobian(ax,ay). This plot is like Arnold diagram ???. If @code{pnts=false} then face is drawn otherwise the color ball at matrix knots are drawn. Parameter @var{ks} specifies the slice of matrices which will be used. String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be the same. The minor dimensions of arrays @var{x}, @var{y}, @var{ax} should be equal. Arrays @var{x}, @var{y} can be vectors (not matrix as @var{ax}). @xref{Color scheme}. @sref{Map sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Map (@code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{int} ks=@code{0}, @code{bool} pnts=@code{true}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node STFA (Python), , Map (Python), Dual plotting (Python) -+@subsection STFA (Python) -+@cindex STFA -+ -+@deftypemethod {mglGraph (Python)} @code{void} STFA (@code{mglData} x, @code{mglData} y, @code{mglData} re, @code{mglData} im, @code{int} dn, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+Draws spectrogram of complex array @var{re}+i*@code{im} for Fourier size of @var{dn} points at plane @var{z=zVal}. Parameter @var{dn} is arbitrary even integer. For example in 1D case, result is density plot of data @math{res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn} with size @{int(nx/dn), dn, ny@}. At this array @var{re}, @var{im} parametrically depend on coordinates @var{x}, @var{y}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{re} and @var{im} must be the same. The minor dimensions of arrays @var{x}, @var{y}, @var{re} should be equal. Arrays @var{x}, @var{y} can be vectors (not matrix as @var{re}). @xref{Color scheme}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} STFA (@code{mglData} re, @code{mglData} im, @code{int} dn, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Vector fields (Python), Other plotting (Python), Dual plotting (Python), Python interface -+@section Vector fields (Python) -+ -+These functions perform plotting of 2D and 3D vector fields. There are 5 generally different types of vector fields representations: simple vector field (Vect), vector field with coloring (VectC), vector field by dew-drops (Dew), flow threads (Flow), flow pipes (Pipe). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Traj (Python):: -+* Vect (Python):: -+* VectC (Python):: -+* Dew (Python):: -+* Flow (Python):: -+* Pipe (Python):: -+@end menu -+ -+@c ================================================================== -+@node Traj (Python), Vect (Python), , Vector fields (Python) -+@subsection Traj (Python) -+@cindex Traj -+ -+@deftypemethod {mglGraph (Python)} @code{void} Traj (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{float} len=@code{0}) -+@deftypemethodx {mglGraph (Python)} @code{void} Traj (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}, @code{float} len=@code{0}) -+The function draws vectors @{@var{ax}, @var{ay}, @var{az}@} along a curve @{@var{x}, @var{y}, @var{z}@}. The length and color of arrows are proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. The color is specified by the string argument @var{sch}. Previous color scheme is used by default. Parameter @var{len} set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if @var{len}=0). The minor sizea of all arrays must be equal and large 2. Vectors are plotted for each column of the arrays. See also @ref{Vect}. @sref{Traj sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Vect (Python), VectC (Python), Traj (Python), Vector fields (Python) -+@subsection Vect (Python) -+@cindex Vect -+ -+@deftypemethod {mglGraph (Python)} @code{void} Vect (@code{mglData} x, @code{mglData} y, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} flag=@code{0}) -+The function draws plane vector field plot for the field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. The length of hachures is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of hachures depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. Parameter @var{flag} setup the hachures (arrows). It is compination of vlaues: @code{MGL_VEC_COL} for drawing bi-color arrow, @code{MGL_VEC_LEN} for drawing fixed length arrows, @code{MGL_VEC_DOT} for drawing hachures with dots instead of arrows, @code{MGL_VEC_END} for drawing arrows to the cell point, @code{MGL_VEC_MID} for drawing arrows with center at cell point. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{VectC}, @ref{Flow}, @ref{Dew}. @sref{Vect sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Vect (@code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} flag=@code{0}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Vect (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}, @code{int} flag=@code{0}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the length of hachures is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Vect 3D sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Vect (@code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}, @code{int} flag=@code{0}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node VectC (Python), Dew (Python), Vect (Python), Vector fields (Python) -+@subsection VectC (Python) -+@cindex VectC -+ -+These functions are obsolete -- use Vect() functions instead. -+ -+@deftypemethod {mglGraph (Python)} @code{void} VectC (@code{mglData} x, @code{mglData} y, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws plane vector field plot for the field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. The color of hachures is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of hachures depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Vect}, @ref{Flow}, @ref{Dew}. @sref{VectC sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} VectC (@code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} VectC (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of hachures is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{VectC 3D sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} VectC (@code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dew (Python), Flow (Python), VectC (Python), Vector fields (Python) -+@subsection Dew (Python) -+@cindex Dew -+ -+@deftypemethod {mglGraph (Python)} @code{void} Dew (@code{mglData} x, @code{mglData} y, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws dew-drops for plane vector field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. Note that this is very expensive plot in memory usage and creation time! The color of drops is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of drops depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Vect}, @ref{VectC}. @sref{Dew sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Dew (@code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Flow (Python), Pipe (Python), Dew (Python), Vector fields (Python) -+@subsection Flow (Python) -+@cindex Flow -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{mglData} x, @code{mglData} y, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The function draws flow threads for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} at level z = @var{zVal}. Number of threads is proportional to @var{num}. Parameter @var{central} sets the thread start from center (if true) or only from edges (if false). The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Pipe}, @ref{VectC}, @ref{Vect}. @sref{Flow sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Flow 3D sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{float} x0, @code{float} y0, @code{float} z0, @code{mglData} x, @code{mglData} y, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}) -+The function draws flow threads for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} from point @{@var{x0}, @var{y0}@} at level z = @var{z0}. The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Pipe}, @ref{VectC}, @ref{Vect}. @sref{Flow sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{float} x0, @code{float} y0, @code{float} z0, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{float} x0, @code{float} y0, @code{float} z0, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Flow 3D sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Flow (@code{float} x0, @code{float} y0, @code{float} z0, @code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Pipe (Python), , Flow (Python), Vector fields (Python) -+@subsection Pipe (Python) -+@cindex Pipe -+ -+@deftypemethod {mglGraph (Python)} @code{void} Pipe (@code{mglData} x, @code{mglData} y, @code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The function draws flow pipes for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} at level z = @var{zVal}. Number of pipes is proportional to @var{num}. Parameter @var{central} sets the pipe start from center (if true) or only from edges (if false). The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme. Previous color scheme is used by default. Parameter @var{r0} set the base pipe radius. If @var{r0}<0 then pipe radius is inverse proportional to amplitude. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Pipe}, @ref{VectC}, @ref{Vect}. @sref{Pipe sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Pipe (@code{mglData} ax, @code{mglData} ay, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Pipe (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Pipe 3D sample} -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Pipe (@code{mglData} ax, @code{mglData} ay, @code{mglData} az, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Other plotting (Python), Nonlinear fitting (Python), Vector fields (Python), Python interface -+@section Other plotting (Python) -+ -+These functions perform miscelaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular mesh (TriPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]), simple plot (SimplePlot). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* DensXYZ (Python):: -+* ContXYZ (Python):: -+* ContFXYZ (Python):: -+* Dots (Python):: -+* Crust (Python):: -+* TriPlot (Python):: -+* Plots by formula (Python):: -+* SimplePlot (Python):: -+@end menu -+ -+@c ================================================================== -+@node DensXYZ (Python), ContXYZ (Python), , Other plotting (Python) -+@subsection DensXYZ (Python) -+@cindex DensX -+@cindex DensY -+@cindex DensZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also @ref{ContXYZ}, @ref{ContFXYZ}, @ref{Dens}. @sref{Dens projection sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} DensX (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws density plot for data @var{a} at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} DensY (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws density plot for data @var{a} at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} DensZ (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws density plot for data @var{a} at z = @var{sVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContXYZ (Python), ContFXYZ (Python), DensXYZ (Python), Other plotting (Python) -+@subsection ContXYZ (Python) -+@cindex ContX -+@cindex ContY -+@cindex ContZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also @ref{ContFXYZ}, @ref{DensXYZ}, @ref{Cont}. @sref{Cont projection sample} -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContX (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th contour lines for data @var{a} at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContY (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th contour lines for data @var{a} at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContZ (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th contour lines for data @var{a} at z = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContX (@code{mglData} v, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws contour lines for data @var{a}=@var{v}[i] at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContY (@code{mglData} v, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws contour lines for data @var{a}=@var{v}[i] at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContZ (@code{mglData} v, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws contour lines for data @var{a}=@var{v}[i] at z = @var{sVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContFXYZ (Python), Dots (Python), ContXYZ (Python), Other plotting (Python) -+@subsection ContFXYZ (Python) -+@cindex ContFX -+@cindex ContFY -+@cindex ContFZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also @ref{ContXYZ}, @ref{DensXYZ}, @ref{ContF}. -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFX (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFY (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFZ (@code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at z = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFX (@code{mglData} v, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws solid contours for data @var{a}=@var{v}[i] at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFY (@code{mglData} v, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws solid contours for data @var{a}=@var{v}[i] at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} ContFZ (@code{mglData} v, @code{mglData} a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws solid contours for data @var{a}=@var{v}[i] at z = @var{sVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dots (Python), Crust (Python), ContFXYZ (Python), Other plotting (Python) -+@subsection Dots (Python) -+@cindex Dots -+ -+@deftypemethod {mglGraph (Python)} @code{void} Dots (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}) -+@deftypemethodx {mglGraph (Python)} @code{void} Dots (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}sch=@code{NULL}) -+The function draws the arbitrary placed points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If array @var{a} is specified then it define the transparency of dots. Arrays @var{x}, @var{y}, @var{z}, @var{a} must have equal sizes. See also @ref{Crust}, @ref{Mark}, @ref{Plot}. @sref{Dots sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Crust (Python), TriPlot (Python), Dots (Python), Other plotting (Python) -+@subsection Crust (Python) -+@cindex Crust -+ -+@deftypemethod {mglGraph (Python)} @code{void} Crust (@code{mglData} x, @code{mglData} y, @code{mglData} z, @code{const char *}sch=@code{NULL}, @code{float} er=@code{0}) -+The function reconstruct and draws the surface for arbitrary placed points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. Parameter @var{er} set relative radius for (increase it for removing holes). String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. Arrays @var{x}, @var{y}, @var{z} must have equal sizes. See also @ref{Dots}, @ref{TriPlot}. @sref{Crust sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node TriPlot (Python), Plots by formula (Python), Crust (Python), Other plotting (Python) -+@subsection TriPlot (Python) -+@cindex TriPlot -+ -+@deftypemethod mglGraph @code{void} TriPlot (@code{const mglData &}id, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+@deftypemethodx mglGraph @code{void} TriPlot (@code{const mglData &}id, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws the surface of triangles. Triangle vertexes are set by indexes @var{id} of data points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. First dimensions of @var{id} must be 3 or greater. Arrays @var{x}, @var{y}, @var{z} must have equal sizes. Parameter @var{c} set the colors of triangles (if @var{id}.ny=@var{c}.nx) or colors of vertexes (if @var{x}.nx=@var{c}.nx). See also @ref{Dots}, @ref{Crust}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} TriPlot (@code{mglData} id, @code{mglData} x, @code{mglData} y, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{z}[i]=@var{zVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node Plots by formula (Python), SimplePlot (Python), TriPlot (Python), Other plotting (Python) -+@subsection Plots by formula (Python) -+@cindex Plot -+@cindex Surf -+ -+These functions perform plotting of 1D or 2D functions specified by textual formula. You do not need to create the data arrays to plot it. The parameter @var{stl} set the line style (@pxref{Line styles}) for @code{Plot()} or color scheme (@pxref{Color scheme}) for @code{Surf()}. The parameter @var{n} set the minimal number of points along coordinate(s) for plots. At this time (v. 1.7) there is no adaptive increase of data points numbers but in future it will appear. -+ -+@deftypemethod {mglGraph (Python)} @code{void} Plot (@code{const char *}eqY, @code{const char *}stl=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} n=@code{100}) -+The function draws function @samp{eqY(x)} at plane z=@var{zVal} where @samp{x} variable is changed in range [@var{Min}.x, @var{Max}.x]. See also @ref{Plot}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Plot (@code{const char *}eqX, @code{const char *}eqY, @code{const char *}eqZ, @code{const char *}stl=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} n=@code{100}) -+The function draws parametrical curve @{@samp{eqX(t)}, @samp{eqY(t)}, @samp{eqZ(t)}@} where @samp{t} variable is changed in range [0, 1]. See also @ref{Plot}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf (@code{const char *}eqZ, @code{const char *}stl=@code{NULL}, @code{int} n=@code{100}); -+The function draws surface for function @samp{eqY(x,y)} where @samp{x}, @samp{y} variables are changed in range [@var{Min}, @var{Max}]. See also @ref{Surf}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} Surf (@code{const char *}eqX, @code{const char *}eqY, @code{const char *}eqZ, @code{const char *}stl=@code{NULL}, @code{int} n=@code{100}) -+The function draws parametrical surface @{@samp{eqX(u,v)}, @samp{eqY(u,v)}, @samp{eqZ(u,v)}@} where @samp{u}, @samp{v} variables are changed in range [0, 1]. See also @ref{Surf}. -+@end deftypemethod -+ -+@c ================================================================== -+@node SimplePlot (Python), , Plots by formula (Python), Other plotting (Python) -+@subsection SimplePlot (Python) -+@cindex SimplePlot -+ -+@deftypemethod {mglGraph (Python)} @code{void} SimplePlot (@code{mglData} a, @code{int} type=@code{0}, @code{const char *}stl=@code{NULL}) -+Plots the array @var{a} depending on it's dimensions and @var{type} parameter. String @var{stl} specifies the style of plotting. For 1d data: @code{type=0} -- @ref{Plot}, @code{type=1} -- @ref{Area}, @code{type=2} -- @ref{Step}, @code{type=3} -- @ref{Stem}, @code{type=4} -- @ref{Bars}. For 2d data: @code{type=0} -- @ref{Surf}, @code{type=1} -- @ref{Dens}, @code{type=2} -- @ref{Mesh}, @code{type=3} -- @ref{Cont}. For 3d data: @code{type=0} -- @ref{Surf3}, @code{type=1} -- @ref{Dens3}, @code{type=2} -- @ref{Cont3}, @code{type=2} -- @ref{Cloud}. -+@end deftypemethod -+ -+@c ################################################################## -+@node Nonlinear fitting (Python), Frames/Animation (Python), Other plotting (Python), Python interface -+@section Nonlinear fitting (Python) -+@cindex Fit -+@cindex FitS -+@cindex PutsFit -+@cindex FitPnts -+@cindex Fit2 -+@cindex Fit3 -+ -+These functions fit data to formula. Fitting goal is to find formula parameters for the best fit the data points, i.e. to minimize the sum @math{\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2}. At this, approximation function @samp{f} can depend only on one argument @samp{x} (1D case), on two arguments @samp{x,y} (2D case) and on three arguments @samp{x,y,z} (3D case). The function @samp{f} also may depend on parameters. Normally the list of fitted parameters is specified by @var{var} string (like, @samp{abcd}). Usually user should supply initial values for fitted parameters by @var{ini} variable. But if he/she don't supply it then the zeros are used. Parameter @var{print}=@code{true} switch on printing the found coefficients to @var{Message} (@pxref{Error handling}). -+ -+Functions Fit() and FitS() do not draw the obtained data themselves. They fill the data @var{fit} by formula @samp{f} with found coefficients and return the @math{\chi^2} error of approximation. At this, the @samp{x,y,z} coordinates are equidistantly distributed in the interval @var{Min}--@var{Max}. Number of points in @var{fit} is selected as maximal value of @var{fit} size and the value of @var{FitPnts}. Note, that this functions use GSL library and do something only if MathGL was compiled with GSL support. @sref{Fitting sample} -+ -+@deftypemethod {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-, y- and z-directions for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-, and y-directions for 2d array specified parametrically @var{a}[i,j](@var{x}[i,j], @var{y}[i,j]) for each data slice. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} x, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} x, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array specified parametrically @var{a}[i](@var{x}[i]) for each data slice. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} FitS (@code{mglData} fit, @code{mglData} a, @code{mglData} s, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array with @var{x} equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} z, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-, y- and z-directions for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) with @var{s}[i,j,k]=1. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} x, @code{mglData} y, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-, and y-directions for 2d array specified parametrically @var{a}[i,j](@var{x}[i,j], @var{y}[i,j]) with @var{s}[i,j]=1 for each data slice. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} x, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} x, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array specified parametrically @var{a}[i](@var{x}[i]) with @var{s}[i]=1 for each data slice. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} Fit (@code{mglData} fit, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array @var{a} with @var{s}=1 and @var{x} equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} Fit2 (@code{mglData} fit, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} Fit2 (@code{mglData} fit, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-, and y-directions for 2d array @var{a} with @var{s}=1 and @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{float} Fit3 (@code{mglData} fit, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx {mglGraph (Python)} @code{float} Fit3 (@code{mglData} fit, @code{mglData} a, @code{const char *}func, @code{const char *}var, @code{mglData} ini, @code{bool} print=@code{false}) -+Fit data along x-, y- and z-directions for 3d array @var{a} with @var{s}=1 and @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} PutsFit (@code{mglPoint} p, @code{const char *}prefix=@code{NULL}, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}) -+Print last fitted formula with found coefficients (as numbers) at position @var{p0}. The string @var{prefix} will be printed before formula. All other parameters are the same as in @ref{Text printing}. -+@end deftypemethod -+ -+@deftypemethod {mglGraph (Python)} @code{void} @code{int} FitPnts -+Minimal number of points for output array after nonlinear fitting. -+@end deftypemethod -+ -+@c ################################################################## -+@node Frames/Animation (Python), , Nonlinear fitting (Python), Python interface -+@section Frames/Animation (Python) -+@cindex NewFrame -+@cindex EndFrame -+@cindex GetNumFrame -+ -+These functions provide ability to create several pictures simultaneously. Later, you can write several frames into animated GIF file. -+ -+@deftypemethod mglGraph @code{int} NewFrame () -+Creates new frame. Function returns current frame id. The function @code{EndFrame()} @strong{must} be call after the finishing of the frame drawing for each call of this function. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} EndFrame () -+Finishes the frame drawing. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{int} GetNumFrame () -+Gets the number of created frames. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ResetFrames () -+Reset frames counter (start it from zero). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} StartGIF (@code{const char *}fname, @code{int} ms=@code{100}) -+Start writing frames into animated GIF file @var{fname}. Parameter @var{ms} set the delay between frames in milliseconds. You @strong{should not} change the picture size during writing the cinema. Use CloseGIF() to finalize writing. Note, that this function is disabled in OpenGL mode. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{int} CloseGIF () -+Finish writing animated GIF and close connected pointers. -+@end deftypemethod ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/core.texi -@@ -0,0 +1,2186 @@ -+@c ------------------------------------------------------------------ -+@node MathGL core, Plotter classes, Examples, Top -+@chapter MathGL core -+@cindex mglGraph -+ -+The core of MathGL is @strong{mglGraph} class defined in @code{#include }. It contains a lot of plotting functions for 1D, 2D and 3D plots. It also encapsulates parameters for axes drawing. Moreover an arbitrary coordinate transformation may be used for each axis. All plotting functions use data encapsulated in mglData class (@pxref{mglData class}) that allows to check sizes of used arrays easily. Also it have many functions for data handling: modify it by formulas, find momentums and distribution (histogram), apply operator (differentiate, integrate, transpose, Fourier and so on), change data sizes (interpolate, squeeze, crop and so on). Additional information about colors, fonts, formula parsing can be found in @ref{Other classes}. -+ -+Note that class mglGraph is abstract and contains only interface functions for plotting but does not make plot by itself. For plotting in specific device (screen, memory or file) one should use derived classes: mglGraphZB -- for bitmap picture in file or in memory; mglGraphPS -- for vector PostScript picture; mglGraphGL -- for drawing using OpenGL, or for GLUT windows interface; and so on, @pxref{Plotter classes}. If you want not only to create a picture but to view it in a window/widget or to run animation and so on then look at @ref{Widget classes}. -+ -+@menu -+* Graphics setup:: -+* Axis settings:: -+* Transformation matrix:: -+* Export to file:: -+* Primitives drawing:: -+* Text printing:: -+* Axis and Colorbar:: -+* Legend:: -+* 1D plotting:: -+* 2D plotting:: -+* 3D plotting:: -+* Dual plotting:: -+* Vector fields:: -+* Other plotting:: -+* Nonlinear fitting:: -+* Frames/Animation:: -+* IDTF functions:: -+@end menu -+ -+@c ################################################################## -+@node Graphics setup, Transformation matrix, , MathGL core -+@section Graphics setup -+@cindex MathGL setup -+ -+Functions and variables in this group influences on overall graphics appearance. So all of them should be placed @emph{before} any actual plotting function calls. -+ -+@deftypemethod mglGraph @code{void} DefaultPlotParam () -+Restore initial values for all of parameters except described in @ref{Zooming}. -+@end deftypemethod -+ -+@menu -+* Transparency:: -+* Lighting:: -+* Fog:: -+* Default sizes:: -+* Zooming:: -+* Cutting:: -+* Font settings:: -+* Palette and colors:: -+* Error handling:: -+* Other settings:: -+@end menu -+ -+@c ================================================================== -+@node Transparency, Lighting, , Graphics setup -+@subsection Transparency -+@cindex Alpha -+@cindex AlphaDef -+@cindex Transparent -+@cindex TranspType -+ -+There are several functions and variables for setup transparency. The general function is @code{Alpha()} which switch on/off the transparency for overall plot. It influence only for graphics which created after @code{Alpha()} call (with one exception, mglGraphGL). Variable @code{AlphaDef} specify the default value of alpha-channel. You may switch off transparency of selected plot by variable @code{Transparent}. Finally, variable @code{TranspType} set the kind of transparency. @sref{Transparent surface sample} -+ -+@deftypemethod mglGraph @code{bool} Alpha (@code{bool} enable) -+Sets the transparency on/off. It is recommended to call this function before any plotting command. Function returns previous value of transparency. In any case it must be called before @code{Finish()} function if the last is used. Default value is transparency off. Unfortunately it switches the transparency on/off for all subplots. Use @code{Transparent = false} in particular plot to disable its transparency. -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{float} AlphaDef -+Default value of alpha channel (transparency) for all plotting functions. Note, that OpenGL (mglGraphGL) has incorrect drawing for large values of alpha in case of several overlapping surfaces. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{bool} Transparent -+Flag which temporary switches transparency on/off for the plot. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{int} TranspType -+This variable set the transparency type. Normal transparency (@samp{0}) -- below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces. Glass-like transparency (@samp{1}) -- below and upper things are commutable and just decrease intensity of light by RGB channel. Lamp-like transparency (@samp{2}) -- below and upper things are commutable and are the source of some additional light. I recommend to set @code{AlphaDef = 0.3} or less for lamp-like transparency. -+@end deftypecv -+ -+@c ================================================================== -+@node Lighting, Fog, Transparency, Graphics setup -+@subsection Lighting -+@cindex Light -+@cindex Ambient -+ -+There are several functions for setup lighting. The general function is @code{Light(bool)} which switch on/off the lighting for overall plot. It influence only for graphics which created after @code{Light()} call (with one exception, mglGraphGL). Generally MathGL support up to 10 independent light sources. But in OpenGL mode only 8 of light sources is used due to OpenGL limitations. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number @code{0} with white color, located at top of the plot. -+ -+@deftypemethod mglGraph @code{bool} Light (@code{bool} enable) -+Sets the using of light on/off for overall plot. It is recommended to call this function before any plotting command. Function returns previous value of lighting. Default value is lightning off. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Light (@code{int} n, @code{bool} enable) -+Switch on/off @var{n}-th light source separately. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Light (@code{int} n, @code{mglPoint} p, @code{mglColor} c, @code{float} bright=@code{0.5}, @code{bool} infty=@code{true}) -+@deftypemethodx mglGraph @code{void} Light (@code{int} n, @code{mglPoint} p, @code{char} c=@code{'w'}, @code{float} bright=@code{0.5}, @code{bool} infty=@code{true}) -+The function adds a light source with identification @var{n} at position @var{p}. The color of light is @var{c} (white by default). The brightness of light is @var{bright} which must be in range [0,1]. Flag @var{infty}=@code{true} puts the source to infinite distance (for the faster drawing). It is recommended to call this function before any plotting command. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Ambient (@code{float} bright=@code{0.5}) -+Sets the brightness of ambient light. The value should be in range [0,1]. It is recommended to call this function before any plotting command. -+@end deftypemethod -+ -+@c ================================================================== -+@node Fog, Default sizes, Lighting, Graphics setup -+@subsection Fog -+@cindex Fog -+ -+@deftypemethod mglGraph @code{void} Fog (@code{float} d, @code{float} dz=@code{0.25}) -+Function imitate a fog in the plot. Fog start from relative distance @var{dz} from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-@emph{d*z}). Here @emph{z} is normalized to 1 depth of the plot. If value @var{d}=@code{0} then the fog is absent. @sref{Surface in fog sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Default sizes, Zooming, Fog, Graphics setup -+@subsection Default sizes -+@cindex BarWidth -+@cindex MarkSize -+@cindex ArrowSize -+@cindex BaseLineWidth -+@cindex SetTickLen -+@cindex SetTickStl -+ -+These variables control the default (initial) values for most graphics parameters including sizes of markers, arrows, linewidth and so on. As any other settings these ones will influence only on plots created after the settings change. -+ -+ -+@deftypemethod mglGraph @code{void} SetTickLen (@code{float} val, @code{float} stt=@code{1}) -+The relative length of axis ticks. Default value is @code{0.1}. Parameter @var{stt}>0 set relative length of subticks which is in @code{sqrt(1+stt)} times smaller. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetTickStl (@code{const char *}stl, @code{const char *}sub) -+The line style of axis ticks (@var{stl}) and subticks (@var{sub}). If @var{stl} is empty then default style is used (@samp{k} or @samp{w} depending on transparency type). If @var{sub} is empty then ticks style is used (i.e. @var{stl}). -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{float} BarWidth -+Relative width of rectangles in Bars plot (@pxref{Bars}). Default value is @code{0.7}. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{float} MarkSize -+The size of marks for @ref{1D plotting}. Default value is @code{0.02}. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{float} ArrowSize -+The size of arrows for @ref{1D plotting}, lines and curves (@pxref{Primitives drawing}). Default value is @code{0.03}. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{float} BaseLineWidth -+The variable define the base width for all lines. The value <1 is ignored. For values > 1 the real line width is result of multiplication of specified line width and the value of @var{BaseLineWidth}. Increase of this variables is actual for large bitmap pictures. Default value is @code{1}. -+@end deftypecv -+ -+@c ================================================================== -+@node Zooming, Cutting, Default sizes, Graphics setup -+@subsection Zooming -+@cindex PlotFactor -+@cindex AutoPlotFactor -+@cindex Zoom -+ -+These variables and functions control the overall zooming of the picture (see Zoom()) or the sub-picture (see PlotFactor). Normally you can use these variables and functions for removing ``white'' spaces around a plot. -+ -+@deftypecv {General option} mglGraph @code{float} PlotFactor -+The factor of plot size. It is not recommended to set it lower then 1.6. This is some analogue of function Zoom() but applied not to overall image but for each InPlot (@pxref{Transformation matrix}). -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{bool} AutoPlotFactor -+Switch on/off automatic change of PlotFactor variable during plot rotation. -+@end deftypecv -+ -+@deftypemethod mglGraph @code{void} Zoom (@code{float} x1, @code{float} y1, @code{float} x2, @code{float} y2) -+The function changes the scale of graphics that correspond to zoom in/out of the picture. After function call the current plot will be cleared and further the picture will contain plotting from its part [x1,x2]*[y1,y2]. Here picture coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} changes from 0 to 1. Attention! this settings can not be overwritten by any other functions. Use @code{Zoom(0,0,1,1)} to return default view. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cutting, Font settings, Zooming, Graphics setup -+@subsection Cutting -+@cindex Cut -+@cindex CutMin -+@cindex CutMax -+@cindex fc -+@cindex CutOff -+ -+These variables and functions set the condition when the points are excluded (cutted) from the drawing. -+ -+@deftypecv {General option} mglGraph @code{bool} Cut -+Flag which determines how points outside bounding box are drawn. If it is @code{true} then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box. -+@end deftypecv -+ -+@float -+@image{png_static/cut, 7cm} -+@caption{Left figure is drawn with parameter @code{Cut=false}. Right one is drawn with parameter @code{Cut=true}} -+@end float -+ -+@deftypecv {General option} mglGraph @code{mglPoint} {CutMin, CutMax} -+Lower and upper edge of the box in which never points are drawn. If both edges are the same (the variables are equal) then the cutting box is empty. @sref{CutMinMax sample} -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{mglFormula *} fc -+Formula for condition of point cutting. The point will be omitted (``cut'') if function return non-zero value for point coordinates. This variable is obsolete -- use CutOff() function instead. -+@end deftypecv -+ -+@deftypemethod mglGraph @code{void} CutOff (@code{const char *}EqC) -+Sets the cutting off condition by formula @var{EqC}. This condition determine will point be plotted or not. If value of formula is nonzero then point is omitted, otherwise it plotted. Set argument as @code{NULL} to disable cutting off condition. @sref{CutOff sample} -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Font settings, Palette and colors, Cutting, Graphics setup -+@subsection Font settings -+@cindex FontSize -+@cindex FontDef -+@cindex RotatedText -+@cindex SetFontSizePT -+@cindex SetFontSizeCM -+@cindex SetFontSizeIN -+@cindex SetFont -+@cindex GetFont -+ -+@deftypecv {General option} mglGraph @code{float} FontSize -+The size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{char} FontDef@code{[32]} -+Font specification (@pxref{Text printing}). Default is ``rC'' -- Roman font centering. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{bool} RotatedText -+Set to use or not text rotation along axis. -+@end deftypecv -+ -+@deftypemethod mglGraph @code{void} SetFontSizePT (@code{float} cm, @code{int} dpi=@code{72}) -+Set FontSize by size in pt and picture DPI (default is 16 pt for dpi=72). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{inline void} SetFontSizeCM (@code{float} cm, @code{int} dpi=@code{72}) -+Set FontSize by size in centimeters and picture DPI (default is 0.56 cm = 16 pt). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{inline void} SetFontSizeIN (@code{float} cm, @code{int} dpi=@code{72}) -+Set FontSize by size in inch and picture DPI (default is 0.22 in = 16 pt). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetFont (@code{mglFont *}f) -+Sets font typeface. Note that each mglFont instance can be used with ONLY ONE mglGraph instance at a moment of time! If @code{f==NULL} then default font is used. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{inline mglFont *}GetFont () -+Gets current typeface. Note that this variable can be deleted at next SetFont() call! -+@end deftypemethod -+ -+@c ================================================================== -+@node Palette and colors, Error handling, Font settings, Graphics setup -+@subsection Pallete and colors -+@cindex Pal -+@cindex NumPal -+@cindex SetPalette -+@cindex SetScheme -+@cindex SelectPen -+ -+@deftypemethod mglGraph @code{void} SetPalette (@code{const char *}@var{colors}) -+Sets the palette as selected colors. Default value is @code{"Hbgrcmyhlnqeup"} that corresponds to colors: dark gray @samp{H}, blue @samp{b}, green @samp{g}, red @samp{r}, cyan @samp{c}, magenta @samp{m}, yellow @samp{y}, gray @samp{h}, blue-green @samp{l}, sky-blue @samp{n}, orange @samp{q}, yellow-green @samp{e}, blue-violet @samp{u}, purple @samp{p}. The palette is used mostly in 1D plots (@pxref{1D plotting}) for curves which styles are not specified. -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{mglColor} Pal@code{[101]} -+Color palette for @ref{1D plotting}. This variable is obsolete -- use SetPalette() function instead. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{int} NumPal -+Number of actual colors in palette. The value must be less then 100. This variable is obsolete -- use SetPalette() function instead. -+@end deftypecv -+ -+@deftypemethod mglGraph @code{void} SetScheme (@code{const char *}sch) -+Set the color scheme for following plots. Usually this function is used internally. @xref{Color scheme}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SelectPen (@code{const char *}sch) -+Set the line and mark styles for following plots. Usually this function is used internally. @xref{Line styles}. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Error handling, Other settings, Palette and colors, Graphics setup -+@subsection Error handling -+ -+@cindex Message -+@cindex WarnCode -+@cindex SetWarn -+ -+There are 2 variables which indicate the warnings/errors presence during plot creation. Normally user should set it to zero by @code{SetWarn(0);} before plotting and check if @var{WarnCode} is not zero after plotting. Note that only last warning will be saved. -+ -+@deftypecv {General option} mglGraph @code{char *} Message -+Pointer to buffer for writing messages about matters why some plot are not drawn. Set to NULL to disable messages. The buffer length must be at least 1024. If Message[0]==0 then there are no messages -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{int} WarnCode -+Numerical ID of warning about the not drawn plot. Possible values are: -+@table @code -+@item mglWarnNone=0 -+Everything OK -+@item mglWarnDim -+Data dimension(s) is incompatible -+@item mglWarnLow -+Data dimension(s) is too small -+@item mglWarnNeg -+Minimal data value is negative -+@item mglWarnFile -+No file or wrong data dimensions -+@item mglWarnMem -+Not enough memory -+@item mglWarnZero -+Data values are zero -+@item mglWarnLegA -+Too many legend entries -+@item mglWarnLeg -+No legend entries -+@item mglWarnSlc -+Slice value is out of range -+@item mglWarnCnt -+Number of contours is zero or negative -+@item mglWarnOpen -+Couldn't open file -+@item mglWarnLId -+Light: ID is out of range -+@item mglWarnSize -+Setsize: size(s) is zero or negative -+@item mglWarnFmt -+Format is not supported for that build -+@item mglWarnEnd -+Maximal number of warnings (must be last) -+@end table -+@end deftypecv -+ -+@deftypemethod mglGraph @code{void} SetWarn (@code{int} code, @code{const char *}who=@code{""}) -+Set warning code and corresponding message from function @var{who}. Normally you should call this function only for clearing the warning state, i.e. call @code{SetWarn(0);}. -+@end deftypemethod -+ -+@c ================================================================== -+@node Other settings, , Error handling, Graphics setup -+@subsection Other settings -+ -+@deftypecv {General option} mglGraph @code{int} MeshNum -+Sets approximate number of lines in Mesh(), Fall(), Grid() and also the number of hachures in Vect(), VectC(), Dew() and the number of cells in Cloud*(). By default (=0) it draws all lines/hachures/cells. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{char} AxialDir -+Set direction around which curve rotated in Axial() and Torus(). Default value is 'z'. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{bool} DrawFace -+If set to @code{true} then it prevent faces drawing. It is useful for speeding up drawing (for example, during rotation and so on). -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{int} CirclePnts -+Number of points used for a circle approximation (for example, in @ref{Primitives drawing}, @ref{Tube}, @ref{Pipe} and so on). Default value is 40. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{const char *} PlotId -+Id of plot for saving filename (in GLUT window for example). -+@end deftypecv -+ -+@c ================================================================== -+@node Axis settings, Transformation matrix, Graphics setup, MathGL core -+@section Axis settings -+ -+These large set of variables and functions control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected if @code{Cut=true} (@pxref{Cutting}), after it transformation formulas are applied, and finally the data was normalized in bounding box. -+ -+@menu -+* Ranges (bounding box):: -+* Transformation:: -+* Ticks:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Ranges (bounding box), Transformation, , Axis settings -+@subsection Ranges (bounding box) -+@cindex Axis -+@cindex CAxis -+@cindex XRange -+@cindex YRange -+@cindex ZRange -+@cindex Min -+@cindex Max -+@cindex Cmin -+@cindex Cmax -+@cindex RecalcBorder -+@cindex Org -+@cindex AutoOrg -+@cindex SetRanges -+@cindex SetAutoRanges -+ -+@deftypemethod mglGraph @code{void} Axis (@code{mglPoint} min, @code{mglPoint} max, @code{mglPoint} org=@code{mglPoint(NAN,NAN,NAN)}) -+Safely sets the value for @var{Min}, @var{Max} and @var{Org} members (options) of the class. If minimal and maximal values of the coordinate are the same then they are ignored. This function also sets @var{Cmin}=@code{Min.z} and @var{Cmax}=@code{Max.z}. This is default color range for 2d plots. -+@end deftypemethod -+ -+@deftypemethod {mglGraph} @code{void} SetRanges (@code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2, @code{float} z1=@code{0}, @code{float} z2=@code{0}) -+Sets maximal and minimal values for coordinate range (bounding box). If minimal and maximal values of the coordinate are the same then they are ignored. This function also sets @var{Cmin}=@code{Min.z} and @var{Cmax}=@code{Max.z}. This is default color range for 2d plots. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} CAxis (@code{float} min, @code{float} max) -+Safely sets the values of @var{Cmin} and @var{Cmax}. This values are used later for determining the color of the surface. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} XRange (@code{const mglData &} dat, @code{bool} add=@code{false}, @code{float} fact=@code{0}) -+Sets values of @code{Min.x} and @code{Max.x} as minimal and maximal values of data @var{a}. Parameter @var{fact} add additional range increase on value (@var{Max}-@var{Min})*@var{fact}. See also Axis(). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} YRange (@code{const mglData &} dat, @code{bool} add=@code{false}, @code{float} fact=@code{0}) -+Sets values of @code{Min.y} and @code{Max.y} as minimal and maximal values of data @var{a}. Parameter @var{fact} add additional range increase on value (@var{Max}-@var{Min})*@var{fact}. See also Axis(). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ZRange (@code{const mglData &} dat, @code{bool} add=@code{false}, @code{float} fact=@code{0}) -+Sets values of @code{Min.z} and @code{Max.z} as minimal and maximal values of data @var{a}. Parameter @var{fact} add additional range increase on value (@var{Max}-@var{Min})*@var{fact}. See also Axis(). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} CRange (@code{const mglData &} dat, @code{bool} add=@code{false}, @code{float} fact=@code{0}) -+Sets values of @code{Cmin} and @code{Cmax} as minimal and maximal values of data @var{a}. Parameter @var{fact} add additional range increase on value (@var{Cmax}-@var{Cmin})*@var{fact}. See also CAxis(). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} RecalcBorder () -+Recalculates internal parameter for correct apply of transformation rules. @strong{Must be called} after any direct change of members @var{Min}, @var{Max}, @var{fx}, @var{fy}, @var{fz} if its changes should be seen on the plot. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetAutoRanges (@code{float} x1, @code{float} x2, @code{float} y1=@code{0}, @code{float} y2=@code{0}, @code{float} z1=@code{0}, @code{float} z2=@code{0}) -+Sets ranges for automatic variables of plots. It act as changing of @var{Min}, @var{Max} proprties without calling of RecalcBorder(). Function don't change the direction if minimal and maximal values are the same. For example, if y@var{y1}=@var{y2} then ranges along y-direction will not be changed (will be used previous one). Note that the automatic range become axis range after next call of [XYZ]Range() function(s). -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{mglPoint} {Min, Max} -+Lower and upper edges of bounding box for graphics. These variables are used for determining the range of automatic (non-specified) arrays in most of plotting functions. So, you may change it before plot and return it back after it and the plot will have automatic x-(y-,z-)coordinate normalized in this range but not in bounding box. @strong{BUT} if you want to change the bounding box then you @strong{must} call @code{RecalcBorder();} after it or use Axis() function. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{float} {Cmin, Cmax} -+Minimal and maximal value for data (used for coloring). -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{mglPoint} Org -+Center of axis cross section. If one of values is NAN then MathGL library try to select optimal axis position. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{bool} AutoOrg -+Flag for automatic shifting of axes origin @var{Org} if it lies out of range @var{Min} ... @var{Max}. -+@end deftypecv -+ -+ -+@c ------------------------------------------------------------------ -+@node Transformation, Ticks, Ranges (bounding box), Axis settings -+@subsection Transformation (curved coordinates) -+@cindex Axis -+@cindex Ternary -+@cindex fx -+@cindex fy -+@cindex fz -+ -+@deftypemethod mglGraph @code{void} Axis (@code{const char *}EqX, @code{const char *}EqY, @code{const char *}EqZ) -+Safely sets transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for real coordinate depending on internal coordinates x, y, z. For example, the cylindrical coordinates are introduced as @code{Axis("x*cos(y)", "x*sin(y)", "z");}. For removing of formulas the corresponding parameter should be @code{NULL}. Using transformation formulas will slightly slowing the program, i.e. @code{Axis(NULL, NULL, NULL)} is faster than @code{Axis("x", "y", "z")}. @xref{mglFormula class}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Axis (@code{int} how) -+Sets one of the predefined transformation formulas for curvilinear coordinate. Paramater @var{how} define the coordinates: @code{mglCartesian=0} -- Cartesian coordinates (no transformation); @code{mglPolar=1} -- Polar coordiantes @math{x_n=x*cos(y),y_n=x*sin(y), z_n=z}; @code{mglSpherical=2} -- Sperical coordinates @math{x_n=x*sin(y)*cos(z), y_n=x*sin(y)*sin(z), z_n=x*cos(y)}; @code{mglParabolic=3} -- Parabolic coordinates @math{x_n=x*y, y_n=(x*x-y*y)/2, z_n=z}; @code{mglParaboloidal=4} -- Paraboloidal coordinates @math{x_n=(x*x-y*y)*cos(z)/2, y_n=(x*x-y*y)*sin(z)/2, z_n=x*y}; @code{mglOblate=5} -- Oblate coordinates @math{x_n=cosh(x)*cos(y)*cos(z), y_n=cosh(x)*cos(y)*sin(z), z_n=sinh(x)*sin(y)}; @code{mglProlate=6} -- Prolate coordinates @math{x_n=sinh(x)*sin(y)*cos(z), y_n=sinh(x)*sin(y)*sin(z), z_n=cosh(x)*cos(y)}; @code{mglElliptic=7} -- Elliptic coordinates @math{x_n=cosh(x)*cos(y), y_n=sinh(x)*sin(y), z_n=z}; @code{mglToroidal=8} -- Toroidal coordinates @math{x_n=sinh(x)*cos(z)/(cosh(x)-cos(y)), y_n=sinh(x)*sin(z)/(cosh(x)-cos(y)), z_n=sin(y)/(cosh(x)-cos(y))}; @code{mglBispherical=9} -- Bispherical coordinates @math{x_n=sin(y)*cos(z)/(cosh(x)-cos(y)), y_n=sin(y)*sin(z)/(cosh(x)-cos(y)), z_n=sinh(x)/(cosh(x)-cos(y))}; @code{mglBipolar=10} -- Bipolar coordinates @math{x_n=sinh(x)/(cosh(x)-cos(y)), y_n=sin(y)/(cosh(x)-cos(y)), z_n=z}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Ternary (@code{bool} tern) -+The function sets to draws Ternary plot. This special plot is for 3 dependent coordinates (components) @var{a}, @var{b}, @var{c} so that @var{a}+@var{b}+@var{c}=1. MathGL uses only 2 independent coordinates @var{a}=x and @var{b}=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on. @sref{Ternary plot sample} -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{mglFormula} {*fx, *fy, *fz} -+Transformation formula for x, y and z directions. These variables are obsolete -- use Axis() function instead. -+@end deftypecv -+ -+@c ------------------------------------------------------------------ -+@node Ticks, , Transformation, Axis settings -+@subsection Ticks -+ -+@cindex SetTicks -+@cindex SetTicksVal -+@cindex dx -+@cindex dy -+@cindex dx -+@cindex NSx -+@cindex NSy -+@cindex NSz -+@cindex xtt -+@cindex ytt -+@cindex ztt -+@cindex ctt -+@cindex OrgT -+@cindex FactorPos -+@cindex TuneTicks -+@cindex AdjustTicks -+ -+@deftypemethod {mglGraph} @code{void} AdjustTicks (@code{const char *}dir) -+Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) @var{dir}. Also set @var{TuneTicks}=@code{true}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetTicks (@code{char} dir, @code{float} d=@code{-5}, @code{int} ns=@code{0}, @code{float} org=@code{NAN}) -+Set the ticks step @var{d}, number of sub-ticks @var{ns} and initial ticks position @var{org} for the axis along direction @var{dir}. Variable @var{d} set step for axis ticks (if positive) or it's number on the axis range (if negative). Zero value set logarithmic ticks. If @var{org} value is NAN then value from @var{Org} is used. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetTicksVal (@code{char} dir, @code{int} n, @code{float *}val, @code{const char **}lbl) -+@deftypemethodx mglGraph @code{void} SetTicksVal (@code{char} dir, @code{int} n, @code{float *}val, @code{const wchar_t **}lbl) -+@deftypemethodx mglGraph @code{void} SetTicksVal (@code{char} dir, @code{float} val1, @code{wchar_t *}lbl1, ...) -+Set the manual positions @var{val} and its labels @var{lbl} for @var{n}-th ticks along axis @var{dir}. The arrays @var{val} and @var{lbl} must contain @var{n} elements. Use @code{SetTicks()} to restore automatic ticks. Note, you @strong{have to be} very careful to use floating-point (not integer!!!) values as ticks position due to limitations of stdarg library (argument transfer). @sref{Manual ticks sample} -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{float} {dx, dy, dz} -+Step for axis ticks (if positive) or it's number (if negative) in x-,y-,z- directions. Zero value set logarithmic ticks. These variables are obsolete -- use SetTicks() function instead. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{int} {NSx, NSy, NSz} -+Number of axis sub-ticks in x-,y-,z- directions. These variables are obsolete -- use SetTicks() function instead. -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{mglPoint} OrgT -+Starting point for ticks. If corresponding value is NAN then value from @var{Org} is used (it is default). -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{const wchar_t} {*xtt, *ytt, *ztt, *ctt} -+The template for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If @var{xtt}, @var{ytt}, @var{ztt}, @var{ctt}=@code{NULL} then default template is used (in simplest case it is @samp{%.2g}) with automatic detaching of common multiplier or common component (see @var{TuneTicks}). -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{bool} TuneTicks -+Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values) or common component (for narrow range, like from 0.999 to 1.000). -+@end deftypecv -+ -+@deftypecv {General option} mglGraph @code{float} FactorPos -+The position of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15. -+@end deftypecv -+ -+ -+@c ################################################################## -+@node Transformation matrix, Export to file, Axis settings, MathGL core -+@section Transformation matrix -+@cindex Aspect -+@cindex Rotate -+@cindex RotateN -+@cindex SubPlot -+@cindex InPlot -+@cindex Identity -+@cindex Perspective -+@cindex RestoreM -+@cindex View -+@cindex ColumnPlot -+ -+These functions control how and where further plotting will be placed. There is a curtain order of calling of these functions for the better plot view. First one should be SubPlot() or InPlot() for specifying the place. After it a Rotate() and Aspect(). And finally any other plotting functions may be called. Alternatevely you can use ColumnPlot() for position plots in the column one by another without gap between plot axis (bounding boxes). -+ -+@deftypemethod mglGraph @code{void} SubPlot (@code{int} nx, @code{int} ny, @code{int} m, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+Puts further plotting in a @var{m}-th cell of @var{nx}*@var{ny} grid of the whole frame area. This function set off any aspects or rotations. So it should be used first for creating the subplot. From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size @var{dx}, @var{dy}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} InPlot (@code{float} x1, @code{float} x2, @code{float} y1, @code{float} y2, @code{bool} rel=@code{false}) -+Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [@var{x1}, @var{x2}]*[@var{y1}, @var{y2}]. The coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} are normalized to interval [0, 1]. If parameter @var{rel}=@code{true} then the relative position to current SubPlot() (or last InPlot() with @var{rel}=@code{false}) is used. This function set off any aspects or rotations. So it should be used first for creating subplot. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ColumnPlot (@code{int} num, @code{int} ind) -+Puts further plotting in @var{ind}-th cell of column with @var{num} cells. The position is relative to previous SubPlot() call (or InPlot() with @var{rel}=@code{false}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Rotate (@code{float} TetX, @code{float} TetZ, @code{float} TetY=@code{0}) -+Rotates a further plotting relative to each axis (x, z, y) consecutively on angles @var{TetX}, @var{TetZ}, @var{TetY}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} RotateN (@code{float} Tet, @code{float} x, @code{float} y, @code{float} z) -+Rotates a further plotting around vector @{x,y,z@}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Aspect (@code{float} Ax, @code{float} Ay, @code{float} Az) -+Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio @var{Ax:Ay:Az}. For the best effect it should be used after Rotate() function. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Perspective (@code{float} a) -+Add (switch on) the perspective to plot. The parameter @math{a ~ 1/z_@{eff@} \in [0,1)}. By default (@code{a=0}) the perspective is off. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Identity () -+Clears transformation matrix. This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is equivalent to the call of @code{InPlot(0,1,0,1)}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} RestoreM () -+Restore transformation matrix after last @code{InPlot()}. This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is useful to restore back the transformation matrix after @code{Identity()} call. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} View (@code{float} tetx, @code{float} tetz, @code{float} tety= @code{0}) -+Sets angle of view independently from Rotate() but usually don't rotate actually. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Export to file, Primitives drawing, Transformation matrix, MathGL core -+@section Export to file -+@cindex WriteFrame -+@cindex WritePNG -+@cindex WriteGIF -+@cindex WriteIDTF -+@cindex WriteSVG -+@cindex WriteBMP -+@cindex WriteEPS -+@cindex WriteJPEG -+@cindex SetSize -+@cindex Flush -+@cindex Finish -+@cindex ShowImage -+ -+These functions export current view to a graphic file. The filename @var{fname} should have appropriate extension. Parameter @var{descr} gives the short description of the picture. Just now the transparency is supported in PNG and SVG files. -+ -+@deftypemethod mglGraph @code{void} WriteFrame (@code{const char *}fname=@code{NULL}, @code{const char *}descr=@code{NULL}) -+Exports current frame to a file @var{fname} which type is determined by the extension. Parameter @var{descr} adds description to file (can be @code{NULL}). If @var{fname}=@code{NULL} then the file @samp{frame####.jpg} is used, where @samp{####} is current frame id and name @samp{frame} is defined by @var{PlotId} class property. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WritePNG (@code{const char *}fname, @code{const char *}descr=@code{NULL}, @code{int} compr=@code{NULL}, @code{bool} alpha=@code{true}) -+Exports current frame to PNG file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file, @var{alpha} gives the transparency type. By default there are no description added and transparent image used. This function does nothing if NO_PNG is defined during compilation of MathGL library. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WriteJPEG (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to JPEG file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there is no description added. This function does nothing if NO_JPEG is defined during compilation of MathGL library. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WriteGIF (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to GIF file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there is no description added. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WriteBMP (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to BMP file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. There is no compression used. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WriteEPS (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to EPS file. The vector representation is used if possible. So it is not recommended for the export of large data plot. It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file. By default there is no description added. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WriteSVG (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to SVG (Scalable Vector Graphics) file. The vector representation is used. In difference of EPS format, SVG format support transparency that allows to correctly draw half-transparent plot (like SurfA(), Surf3A(), CloudQ() or CloudP()). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} WriteIDTF (@code{const char *}fname, @code{const char *}descr=@code{NULL}) -+Exports current frame to IDTF file. Later this file can be converted to U3D format. The vector representation is used. So, the output file may be too large for graphic of large data array (especially for surfaces). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ShowImage (@code{const char *}viewer=@code{"kuickshow"}, @code{bool} nowait=@code{false}) -+Displays the current picture using external program @var{viewer} for viewing. The function save the picture to temporary file and call @var{viewer} to display it. If @var{nowait}=@code{true} then the function return immediately (it will not wait while window will be closed). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SetSize (@code{int} width, @code{int} height) -+Sets size of picture in pixels. This function @strong{must be} called before any other plotting because it completely remove picture contents. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Finish () -+Finishes plotting and create a picture. Normally this function is called internally. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flush () -+Flushes the plotting commands to frame. This function may be useful if one wants to remove array before the finishing of the plot (i.e. before calling @code{Finish()}). Also call of this function separate the objects in mglGraphIDTF. Most of plots call this function internally. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Primitives drawing, Text printing, Export to file, MathGL core -+@section Primitives drawing -+@cindex Ball -+@cindex Clf -+@cindex Line -+@cindex Curve -+@cindex Glyph -+@cindex Mark -+@cindex Error -+@cindex Face -+@cindex FaceX -+@cindex FaceY -+@cindex FaceZ -+@cindex Cone -+@cindex Drop -+@cindex Sphere -+ -+These functions draw some simple objects like line, point, sphere, drop, cone and so on. -+ -+@deftypemethod mglGraph @code{void} Clf (@code{mglColor} Back=@code{WC}) -+Clear the picture and will it by color @var{Back}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Ball (@code{float} x, @code{float} y, @code{float} z, @code{mglColor} col=@code{RC}, @code{float} alpha=@code{1}) -+Draws a point (ball) at position @{@var{x}, @var{y}, @var{z}@} with color @var{col}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Ball (@code{mglPoint} p, @code{char} col=@code{'r'}) -+Draws a point (ball) at position @var{p} with color @var{col}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Error (@code{mglPoint} p, @code{mglPoint} e, @code{char} *pen=@code{NULL}) -+Draws a 3d error box at position @var{p} with sizes @var{e} and style @var{pen}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Line (@code{mglPoint} p1, @code{mglPoint} p2, @code{char *}stl=@code{"B"}, @code{int}num=@code{2}) -+Draws a geodesic line (straight line in Cartesian coordinates) from point @var{p1} to @var{p2} using line style @var{stl}. Parameter @var{num} define the ``quality'' of the line. If @var{num}=@code{2} then the stright line will be drawn in all coordinate system (independently on transformation formulas (@pxref{Transformation}). Contrary, for large values (for example, =@code{100}) the geodesic line will be drawn in corresponding coordinate system (straight line in Cartesian coordinates, circle in polar coordinates and so on). Line will be drawn even if it lies out of bounding box. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Curve (@code{mglPoint} p1, @code{mglPoint} d1, @code{mglPoint} p2, @code{mglPoint} d2, @code{const char *}stl=@code{"B"}, @code{int} num=@code{100}) -+Draws Bezier-like curve from point @var{p1} to @var{p2} using line style @var{stl}. At this tangent is codirected with @var{d1}, @var{d2} and proportional to its amplitude. Parameter @var{num} define the ``quality'' of the curve. If @var{num}=@code{2} then the straight line will be drawn in all coordinate system (independently on transformation formulas (@pxref{Transformation}). Contrary, for large values (for example, =@code{100}) the spline like Bezier curve will be drawn in corresponding coordinate system. Curve will be drawn even if it lies out of bounding box. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Face (@code{mglPoint} p1, @code{mglPoint} p2, @code{mglPoint} p3, @code{mglPoint} p4, @code{const char *}stl=@code{"w"}, @code{int} num=@code{2}) -+Draws the solid quadrangle (face) with vertexes @var{p1}, @var{p2}, @var{p3}, @var{p4} and with color(s) @var{stl}. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Face will be drawn even if it lies out of bounding box. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} FaceX (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} wy, @code{float} wz, @code{const char *}stl=@code{"w"}, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+Draws the solid rectangle (face) perpendicular to x-axis at position @{@var{x0}, @var{y0}, @var{z0}@} with widths @var{wy}, @var{wz} and with color @var{stl}. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Parameters @var{d1}, @var{d2} set additional shift of the last vertex (i.e. to draw quadrangle). Face will be drawn even if it lies out of bounding box. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} FaceY (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} wx, @code{float} wz, @code{const char *}stl=@code{"w"}, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+Draws the solid rectangle (face) perpendicular to y-axis at position @{@var{x0}, @var{y0}, @var{z0}@} with widths @var{wx}, @var{wz} and with color @var{stl}. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Parameters @var{d1}, @var{d2} set additional shift of the last vertex (i.e. to draw quadrangle). Face will be drawn even if it lies out of bounding box. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} FaceZ (@code{float} x0, @code{float} y0, @code{float} z0, @code{float} wx, @code{float} wy, @code{const char *}stl=@code{"w"}, @code{float} dx=@code{0}, @code{float} dy=@code{0}) -+Draws the solid rectangle (face) perpendicular to z-axis at position @{@var{x0}, @var{y0}, @var{z0}@} with widths @var{wx}, @var{wy} and with color @var{stl}. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Parameters @var{d1}, @var{d2} set additional shift of the last vertex (i.e. to draw quadrangle). Face will be drawn even if it lies out of bounding box. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Sphere (@code{mglPoint} p, @code{float} r, @code{const char *}stl=@code{"r"}) -+Draw the sphere with radius @var{r} and center at point @var{p} and color @var{stl}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Drop (@code{mglPoint} p, @code{mglPoint} q, @code{float} r, @code{mglColor} col, @code{float} shift=@code{1}, @code{float} ap=@code{1}) -+@deftypemethodx mglGraph @code{void} Drop (@code{mglPoint} p, @code{mglPoint} q, @code{float} r, @code{const char *}col="r", @code{float} shift=@code{1}, @code{float} ap=@code{1}) -+Draw the drop with radius @var{r} at point @var{p} elongated in direction @var{q} and with color @var{col}. Parameter @var{shift} set the degree of drop oblongness: @samp{0} is sphere, @samp{1} is maximally oblongness drop. Parameter @var{ap} set relative width of the drop (this is analogue of ``ellipticity'' for the sphere). @sref{Drops sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Cone (@code{mglPoint} p1, @code{mglPoint} p2, @code{float} r1, @code{float} r2=@code{-1}, @code{const char *}stl=@code{"B"}, @code{bool} edge=@code{false}) -+Draw tube (or truncated cone if @var{edge}=@code{false}) between points @var{p1}, @var{p2} with radius at the edges @var{r1}, @var{r2}. If @var{r2}<0 then it is supposed that @var{r2}=@var{r1}. The cone color is defined by string @var{stl}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Mark (@code{mglPoint} p, @code{char} mark=@code{'.'}) -+Draws a marks of different type at position @var{p}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Glyph (@code{float} x, @code{float} y, @code{float} f, @code{int} nt, @code{const short *}trig, @code{int} nl, @code{const short *}line) -+Draw a set of triangles (or lines if @var{trig}=@code{NULL}) for glyph which is placed at point @{@var{x}, @var{y}@}. Values in the arrays are normalized by factor @var{f}. Normally this function is used internally. -+@end deftypemethod -+ -+@c ################################################################## -+@node Text printing, Axis and Colorbar, Primitives drawing, MathGL core -+@section Text printing -+@cindex Puts -+@cindex Putsw -+@cindex Text -+@cindex Title -+ -+These functions draw the text. There are functions for drawing text in arbitrary place, in arbitrary direction and along arbitrary curve. The class mglFont (@pxref{mglFont class}) is used for low-level string parsing and printing. It can use arbitrary font-faces and parse many TeX commands. All these functions have 2 variant: for printing 8-bit text (@code{char *}) and for printing Unicode text (@code{wchar_t *}). In first case the conversion in current locale is used. So sometimes you need to specify it by @code{setlocale()} function. The size argument control the size of text: if positive it give the value, if negative it give the value relative to @var{FontSize}. The font type (STIX, arial, courier, times and so on) can be selected by function SetFont(), GetFont(). @xref{Font settings}. -+ -+The font parameters are described by string. This string may contain several characters of font type (@samp{rbiwou}) and/or align (@samp{LRC}) specification. Also it may contain the text color @samp{wkrgbcymhRGBCYMHW} (@pxref{mglColor class}) after symbol @samp{:}. The font types are: @samp{r} -- roman font, @samp{i} -- italic style, @samp{b} -- bold style, @samp{w} -- wired style, @samp{o} -- over-lined text, @samp{u} -- underlined text. By default roman font is used. The align types are: @samp{L} -- align left (default), @samp{C} -- align center, @samp{R} -- align right. Also a parsing of the LaTeX-like syntax is provided (for detail @pxref{mglFont class}). For example, string @samp{iC:b} correspond to italic font style for centered text which printed by blue color. -+ -+@deftypemethod mglGraph @code{void} Puts (@code{mglPoint} p, @code{const char *}text, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}, @code{char} dir=@code{0}, @code{float} shift=@code{0}) -+@deftypemethodx mglGraph @code{void} Putsw (@code{mglPoint} p, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}, @code{char} dir=@code{0}, @code{float} shift=@code{0}) -+The function plots the string @var{text} at position @var{p} with fonts specifying by the criteria @var{how}. The size of font is set by @var{size} parameter (default is @var{FontSize}). Parameter @var{dir} specifies the additional string align. The aligns are: @samp{x} -- align as x-label, @samp{y} -- align as y-label, @samp{z} -- align as z-label, @samp{i} -- align as x-label but inverse writing direction, @samp{t} -- no align (default), @samp{n} -- align in x-y plane. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} Puts (@code{mglPoint} p, @code{mglPoint} l, @code{const char *}text, @code{char}where=@code{'t'}, @code{float} size=@code{-1}) -+@deftypemethodx mglGraph @code{float} Putsw (@code{mglPoint} p, @code{mglPoint} l, @code{const wchar_t *}text, @code{char}where=@code{'t'}, @code{float} size=@code{-1}) -+The function plots the string @var{text} at position @var{p} along direction @var{l} with specified @var{size}. Parameter @var{where} set to print text above the line (@samp{T}) or under the line (@samp{t}). Function return the width of the string. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Text (@code{mglPoint} p, @code{const char *}text, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}, @code{char} dir=@code{0}) -+@deftypemethodx mglGraph @code{void} Text (@code{mglPoint} p, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}, @code{char} dir=@code{0}) -+The function plots the string @var{text} at position @var{p} with fonts @var{how}. These functions are obsolete -- use Puts(), Putsw() functions instead. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Printf (@code{mglPoint} p, @code{const char *}arg, ...) -+Print formatted string at point @var{p}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Title (@code{const char *}text, @code{const char *}font=@code{0}, @code{float} size=@code{-2}) -+@deftypemethodx mglGraph @code{void} Title (@code{const wchar_t *}text, @code{const char *}font=@code{0}, @code{float} size=@code{-2}) -+Print string @var{text} as title of the picture (at the top of the picture). Can be used at any place (even inside SubPlot()). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Text (@code{const mglData &}y, @code{const char *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} Text (@code{const mglData &}y, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} Text (@code{const mglData &}x, @code{const mglData &}y, @code{const char *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} Text (@code{const mglData &}x, @code{const mglData &}y, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} Text (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+@deftypemethodx mglGraph @code{void} Text (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const wchar_t *}text, @code{const char *}font=@code{NULL}, float size=@code{-1}) -+The function draws @var{text} along the curve between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} by font style @var{font} and with size @var{size}. The string @var{font} may contain symbols @samp{t} for printing the text under the curve (default), or @samp{T} for printing the text above the curve. The sizes of 1st dimension must be equal for all arrays @var{x.nx=y.nx=z.nx}. If array @var{x} is not specified then its an automatic array is used with values equidistantly distributed in interval [@var{Min}.x, @var{Max}.x] (@pxref{Ranges (bounding box)}). If array @var{z} is not specified then @var{z}[i] = @var{zVal} is used. @sref{Text sample} -+@end deftypemethod -+ -+@c ################################################################## -+@node Axis and Colorbar, Legend, Text printing, MathGL core -+@section Axis and Colorbar -+@cindex Axis -+@cindex Box -+@cindex Grid -+@cindex Colorbar -+@cindex Label -+ -+These functions draw the ``things for measuring'', like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information @pxref{Axis settings}. -+ -+@deftypemethod mglGraph @code{void} Axis (@code{const char *}dir=@code{"xyz"}, @code{bool} adjust=@code{false}) -+Draws axes with ticks (@pxref{Axis settings}) in directions determined by string parameter @var{dir}.If string contain the symbol @samp{_} then tick labels are not printed. Font for ticks labels is determined by @var{FontDef} (@pxref{Font settings}). Ticks will be adjusted if @var{adjust}=@code{true} (by call of @code{AdjustTicks()}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Colorbar (@code{const char *}sch=@code{NULL}, @code{int} where=@code{0}) -+Draws colorbar with color scheme @var{sch} (current scheme if @code{sch=NULL}) at edge of plot. Parameter @var{where} specifies the position of the colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{Dens sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Colorbar (@code{const char *}sch, @code{int} where, @code{float} x, @code{float} y, @code{float} w, @code{float} h) -+@deftypemethodx mglGraph @code{void} Colorbar (@code{int} where, @code{float} x, @code{float} y, @code{float} w, @code{float} h) -+Draws colorbar with color scheme @var{sch} (current scheme if not specified) at arbitrary position of subplot @{@var{x}, @var{y}@} (supposed to be in range [0,1]). Parameter @var{where} specifies the position of colorbar labels: @samp{0} - at left, @samp{1} - at right, @samp{2} - at bottom, @samp{3} - at top. Parameters @var{w}, @var{h} set the relative width and height of the colorbar. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Colorbar (@code{const mglData &}v, @code{const char *}sch=@code{NULL}, @code{int} where=@code{0}) -+Draws colorbar with sharp colors @var{sch} (current palette if @code{sch=NULL}) for values @var{v} at edge of plot. Parameter @var{where} specifies the position of the colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{ContD sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Grid (@code{const char *}dir=@code{"xyz"}, @code{const char *}pen=@code{"B-"}) -+Draws grid lines perpendicular to direction determined by string parameter @var{dir}. The step of grid lines is the same as tick step for an Axis(). The style of lines is determined by @var{pen} parameter (default value is dark blue solid line (@samp{B-}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Box (@code{mglColor} col=@code{NC}, @code{bool} ticks=@code{true}) -+@deftypemethodx mglGraph @code{void} Box (@code{const char *}col, @code{bool} ticks=@code{true}) -+Draws bounding box outside the plotting volume with color @var{col}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Label (@code{char} dir, @code{const char *}text, @code{int} pos=@code{+1}, @code{float} size=@code{-1.4}, @code{float} shift=@code{0}) -+@deftypemethodx mglGraph @code{void} Label (@code{char} dir, @code{const wchar_t *}text, @code{int} pos=@code{+1}, @code{float} size=@code{-1.4}, @code{float} shift=@code{0}) -+Prints the label @var{text} for axis @var{dir}=@samp{x},@samp{y},@samp{z},@samp{t} (here @samp{t} is ``ternary'' axis @math{t=1-x-y}). The position of label is determined by @var{pos} parameter. If @var{pos}=0 then label is printed at the center of axis. If @var{pos}>0 then label is printed at the maximum of axis. If @var{pos}<0 then label is printed at the minimum of axis. Parameter @var{size} determines the font size for the label. By default the font size is 1.4 times larger than the one for ticks @var{FontSize} (@pxref{Font settings}). @xref{Text printing}. -+@end deftypemethod -+ -+@c ################################################################## -+@node Legend, 1D plotting, Axis and Colorbar, MathGL core -+@section Legend -+@cindex Legend -+@cindex AddLegend -+@cindex ClearLegend -+ -+These functions draw legend to the graph (useful for @ref{1D plotting}). Legend entry is a pair of strings: one for style of the line, another one with description text (with included LaTeX parsing). The array of string may be used directly or by accumulating first to the internal arrays (by function AddLegend()) and further plotting it. The position of the legend can be selected automatic or manually. Parameters @var{font} and @var{size} specify the font style and size (@pxref{Font settings}). Parameter @var{llen} set the relative width of the line sample and the text indent. If line style string for entry is empty then the corresponding text is printed without indent. @sref{Legend sample} -+ -+@deftypemethod mglGraph @code{void} Legend (@code{int} where=@code{0x3}, @code{const char *}font=@code{"rL"}, @code{float} size=@code{-0.8}, @code{float} llen=@code{0.1}) -+Draws legend of accumulated legend entries by font @var{font} with @var{size}. Parameter @var{where} sets the position of the legend: @samp{0} is bottom left corner, @samp{1} is bottom right corner, @samp{2} is top left corner, @samp{3} is top right corner (is default). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Legend (@code{int} n, @code{wchar_t **}text, @code{char **}style, @code{int} where=@code{0x3}, @code{const char *}font=@code{"rL"}, @code{float} size=@code{-0.8}, @code{float} llen=@code{0.1}) -+Draws legend with @var{n}-th elements of string array @var{text} by font @var{font} with @var{size}. Entry strings @var{text} describe curves with line style @var{style} (including marks). Parameter @var{where} sets the position of the legend: @samp{0} is bottom left corner, @samp{1} is bottom right corner, @samp{2} is top left corner, @samp{3} is top right corner (is default). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Legend (@code{float} x, @code{float} y, @code{const char *}font=@code{"rL"}, @code{float} size=@code{-0.8}, @code{float} llen=@code{0.1}) -+Draws legend of accumulated legend entries by font @var{font} with @var{size}. Position of legend is determined by parameter @var{x}, @var{y} which supposed to be normalized to interval [0,1]. -+@end deftypemethod -+@deftypemethod mglGraph @code{void} Legend (@code{int} n, @code{wchar_t **}text, @code{char **}style, @code{float} x, @code{float} y, @code{const char *}font=@code{"rL"}, @code{float} size=@code{-0.8}, @code{float} llen=@code{0.1}) -+Draws legend with @var{n}-th elements of string array @var{text} by font @var{font} with @var{size}. Entry strings @var{text} describe curves with line style @var{style} (including marks). Position of legend is determined by parameter @var{x}, @var{y} which supposed to be normalized to interval [0,1]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} AddLegend (@code{const char *}text, @code{const char *}style) -+@deftypemethodx mglGraph @code{void} AddLegend (@code{const wchar_t *}text, @code{const char *}style) -+Adds string @var{text} to internal legend accumulator. The style of described line and mark is specified in string @var{style} (@pxref{Line styles}). Maximal number of entries is 100. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ClearLegend () -+Clears saved legend strings. -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{bool} LegendBox -+Switch on/off drawing box near legend. By default (=@code{true}) box is drawn. -+@end deftypecv -+ -+@c ################################################################## -+@node 1D plotting, 2D plotting, Legend, MathGL core -+@section 1D plotting -+ -+These functions perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve @{x(i),y(i),z(i)@}, i=1...n. There are 5 generally different types of data representations: simple line plot (Plot), line plot with filling under it (Area), stairs plot (Step), bar plot (Bars, Barh) and vertical lines (Stem). Each type of plotting has similar interface. There are 3D version and two 2D versions. One of last requires single array. The parameters of line and marks are specified by the string argument. If the string parameter is NULL then solid line with color from palette Pal is used (@pxref{Palette and colors}). Also there are some special 1d plots having slightly different interface: surface of curve rotation (Torus), chart (Chart) and error boxes (Error), marks with variable size (Mark), tubes (Tube) and so on. @xref{Line styles}. -+ -+ -+@menu -+* Plot:: -+* Radar:: -+* Tens:: -+* Area:: -+* Region:: -+* Bars:: -+* Barh:: -+* Stem:: -+* Step:: -+* Torus:: -+* Chart:: -+* Mark:: -+* TextMark:: -+* Error:: -+* Tube:: -+@end menu -+ -+@c ================================================================== -+@node Plot, Radar, , 1D plotting -+@subsection Plot -+@cindex Plot -+ -+These functions draw continuous lines between points. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Area}, @ref{Step}, @ref{Stem}, @ref{Tube}, @ref{Mark}, @ref{Error}, @ref{Belt}, @ref{Tens}. @sref{Plot sample} -+ -+@deftypemethod mglGraph @code{void} Plot (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Plot (@code{const mglData &}x, @code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Plot (@code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Plot2 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}=@var{a}(2*k,:), @var{y}=@var{a}(2*k+1,:), k \in 0 ... @var{a.ny}/2. This function is obsolete -- use Plot() and SubData() functions instead. -+@end deftypemethod -+@deftypemethod mglGraph @code{void} Plot3 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space, where @var{x}=@var{a}(3*k,:), @var{y}=@var{a}(3*k+1,:), @var{z}=@var{a}(3*k+2,:), k \in 0 ... @var{a.ny}/3. This function is obsolete -- use Plot() and SubData() functions instead. -+@end deftypemethod -+ -+@c ================================================================== -+@node Radar, Tens, Plot, 1D plotting -+@subsection Radar -+@cindex Radar -+ -+@deftypemethod mglGraph @code{void} Plot (@code{const mglData &}a, @code{const char *}pen=@code{NULL}, @code{float} r=@code{-1}) -+This functions draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). The plots are drawn for each row if one of the data is the matrix. Parameter @var{r} set the additional shift of data (i.e. the data @var{a}+@var{r} is used instead of @var{a}). If @code{r<0} then @code{r=max(0, -min(a)}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). If @var{pen} containt @samp{#} symbol then "grid" (radial lines and circle for @var{r}) is drawn See also @ref{Plot}. @sref{Radar sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Tens, Area, Radar, 1D plotting -+@subsection Tens -+@cindex Tens -+ -+These functions draw continuous lines between points with color defined by the special array (look like tension plot). The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color scheme (@pxref{Color scheme}) and style and/or width of line (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with current color scheme is used. See also @ref{Plot}, @ref{Mesh}, @ref{Fall}. @sref{Tens sample} -+ -+@deftypemethod mglGraph @code{void} Tens (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}c, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space with color defined by @var{c}[i]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Tens (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}c, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}) with color defined by @var{c}[i]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Tens (@code{const mglData &}y, @code{const mglData &}c, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}) with color defined by @var{c}[i], where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Area, Region, Tens, 1D plotting -+@subsection Area -+@cindex Area -+ -+These functions draw continuous lines between points and fills it to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Bars}, @ref{Stem}. @sref{Area sample} -+ -+@deftypemethod mglGraph @code{void} Area (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space and fills it down to @var{z} = Org.z. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Area (@code{const mglData &}x, @code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{bool} sum=@code{false}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}) and fills it down to @var{y} = Org.y. Parameter @var{sum} set to draw a lines one above another (like summation). Note, you can reach the same effect if call @code{y.CumSum("y");} before plot. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Area (@code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{bool} sum=@code{false}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}) and fills it down to @var{y} = Org.y, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. Parameter @var{sum} set to draw a lines one above another (like summation). Note, you can reach the same effect if call @code{y.CumSum("y");} before plot. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Area2 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}) and fills it down to @var{y} = Org.y, where @var{x}=@var{a}(2*k,:), @var{y}=@var{a}(2*k+1,:), k \in 0 ... @var{a.ny}/2. This function is obsolete -- use Area() and SubData() functions instead. -+@end deftypemethod -+@deftypemethod mglGraph @code{void} Area3 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}) -+The function draws continuous lines between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space and fills it down to @var{z} = Org.z, where @var{x}=@var{a}(3*k,:), @var{y}=@var{a}(3*k+1,:), @var{z}=@var{a}(3*k+2,:), k \in 0 ... @var{a.ny}/3. This function is obsolete -- use Area() and SubData() functions instead. -+@end deftypemethod -+ -+@c ================================================================== -+@node Region, Bars, Area, 1D plotting -+@subsection Region -+@cindex Region -+ -+These functions fill area between 2 curves. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y1.nx=y2.nx} and all dimensions of arrays @var{y1} and @var{y2} must be equal too. String @var{pen} specifies the color (@pxref{Line styles}). By default (@code{pen=NULL}) color from palette is used (@pxref{Palette and colors}). See also @ref{Area}, @ref{Bars}, @ref{Stem}. @sref{Region sample} -+ -+@deftypemethod mglGraph @code{void} Region (@code{const mglData &}x, @code{const mglData &}y1, @code{const mglData &}y2, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}, @code{bool} inside=@code{true}) -+The function fills area between curves @{@var{x}[i], @var{y}[i]@} and @{@var{x}[i], @var{y2}[i]@} at z=@var{zVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Region (@code{const mglData &}y1, @code{const mglData &}y2, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}, @code{bool} inside=@code{true}) -+The function fills area between curves @{@var{x}[i], @var{y}[i]@} and @{@var{x}[i], @var{y2}[i]@}, where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x] at z=@var{zVal}. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Bars, Barh, Region, 1D plotting -+@subsection Bars -+@cindex Bars -+ -+These functions draw vertical bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Barh}, @ref{Area}, @ref{Stem}, @ref{Chart}, @ref{Default sizes}. @sref{Bars sample} -+ -+@deftypemethod mglGraph @code{void} Bars (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}pen=@code{NULL}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Bars (@code{const mglData &}x, @code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Bars (@code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Bars2 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}=@var{a}(2*k,:), @var{y}=@var{a}(2*k+1,:), k \in 0 ... @var{a.ny}/2. This function is obsolete -- use Bars() and SubData() functions instead. -+@end deftypemethod -+@deftypemethod mglGraph @code{void} Bars3 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}) -+The function draws vertical bars from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z, where @var{x}=@var{a}(3*k,:), @var{y}=@var{a}(3*k+1,:), @var{z}=@var{a}(3*k+2,:), k \in 0 ... @var{a.ny}/3. This function is obsolete -- use Bars() and SubData() functions instead. -+@end deftypemethod -+ -+@c ================================================================== -+@node Barh, Stem, Bars, 1D plotting -+@subsection Barh -+@cindex Barh -+ -+These functions draw horizontal bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Barh}, @ref{Default sizes}. @sref{Barh sample} -+ -+@deftypemethod mglGraph @code{void} Barh (@code{const mglData &}y, @code{const mglData &}v, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws horizontal bars from points @{@var{v}[i], @var{y}[i]@} down to @var{x} = Org.x in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Barh (@code{const mglData &}v, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws horizontal bars from points @{@var{v}[i], @var{y}[i]@} down to @var{x} = Org.x in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{y}[i] values are equidistantly distributed in interval [@var{Min}.y, @var{Max}.y]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Stem, Step, Barh, 1D plotting -+@subsection Stem -+@cindex Stem -+ -+These functions draw vertical lines from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Area}, @ref{Bars}, @ref{Plot}. @sref{Stem sample} -+ -+@deftypemethod mglGraph @code{void} Stem (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}pen=@code{NULL}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Stem (@code{const mglData &}x, @code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Stem (@code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Stem2 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i]@} down to @var{y} = Org.y in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}=@var{a}(2*k,:), @var{y}=@var{a}(2*k+1,:), k \in 0 ... @var{a.ny}/2. This function is obsolete -- use Stem() and SubData() functions instead. -+@end deftypemethod -+@deftypemethod mglGraph @code{void} Stem3 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}) -+The function draws vertical lines from points @{@var{x}[i], @var{y}[i], @var{z}[i]@} down to @var{z} = Org.z, where @var{x}=@var{a}(3*k,:), @var{y}=@var{a}(3*k+1,:), @var{z}=@var{a}(3*k+2,:), k \in 0 ... @var{a.ny}/3. This function is obsolete -- use Stem() and SubData() functions instead. -+@end deftypemethod -+ -+@c ================================================================== -+@node Step, Torus, Stem, 1D plotting -+@subsection Step -+@cindex Step -+ -+These functions draw continuous stairs for points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Stem}, @ref{Tile}, @ref{Boxs}. @sref{Step sample} -+ -+@deftypemethod mglGraph @code{void} Step (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}pen=@code{NULL}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Step (@code{const mglData &}x, @code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Step (@code{const mglData &}y, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Step2 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}=@var{a}(2*k,:), @var{y}=@var{a}(2*k+1,:), k \in 0 ... @var{a.ny}/2. This function is obsolete -- use Step() and SubData() functions instead. -+@end deftypemethod -+@deftypemethod mglGraph @code{void} Step3 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}) -+The function draws continuous stairs for points @{@var{x}[i], @var{y}[i], @var{z}[i]@}, where @var{x}=@var{a}(3*k,:), @var{y}=@var{a}(3*k+1,:), @var{z}=@var{a}(3*k+2,:), k \in 0 ... @var{a.ny}/3. This function is obsolete -- use Step() and SubData() functions instead. -+@end deftypemethod -+ -+@c ================================================================== -+@node Torus, Chart, Step, 1D plotting -+@subsection Torus -+@cindex Torus -+ -+These functions draw surface which is result of curve @{@var{r}, @var{z}@} rotation around @var{AxialDir} axis (@pxref{Other settings}). The sizes of 1st dimension @strong{must be equal} for all arrays @var{r.nx=z.nx}. String @var{pen} specifies the color (@pxref{Line styles}). By default (@code{pen=NULL}) color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Axial}. @sref{Torus sample} -+ -+@deftypemethod mglGraph @code{void} Torus (@code{const mglData &}r, @code{const mglData &}z, @code{const char *}pen=@code{NULL}) -+The function draws surface which is result of curve @{@var{r}[i], @var{z}[i]@} rotation. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Torus (@code{const mglData &}z, @code{const char *}pen=@code{NULL}) -+The function draws surface which is result of curve @{@var{r}[i], @var{z}[i]@} rotation, where @var{r}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Torus2 (@code{const mglData &}a, @code{const char *}pen=@code{NULL}) -+The function draws surface which is result of curve @{@var{x}[i], @var{y}[i]@} rotation, where @var{r}=@var{a}(2*k,:), @var{z}=@var{a}(2*k+1,:), k \in 0 ... @var{a.ny}/2. This function is obsolete -- use Torus() and SubData() functions instead. -+@end deftypemethod -+ -+@c ================================================================== -+@node Chart, Mark, Torus, 1D plotting -+@subsection Chart -+@cindex Chart -+ -+@deftypemethod mglGraph @code{void} Chart (@code{const mglData &}a, @code{const char *}col=@code{NULL}) -+The function draws colored stripes (boxes) for data in array @var{a}. The number of stripes is equal to the number of rows in @var{a} (equal to @var{a.ny}). The color of each next stripe is cyclically changed from colors specified in string @var{col} or in palette Pal (@pxref{Palette and colors}). Spaces in colors denote transparent ``color'', i.e. if @var{col} contain space(s) then corresponding stripe(s) are not drawn. The stripe width is proportional to value of element in @var{a}. Chart is plotted only for data with non-negative elements. If string @var{col} have symbol @samp{#} then black border lines are drawn. The most nice form the chart have in 3d (after rotation of coordinates) or in cylindrical coordinates (becomes so called Pie chart). @sref{Chart sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Mark, TextMark, Chart, 1D plotting -+@subsection Mark -+@cindex Mark -+ -+These functions draw marks with size @var{r}*@var{MarkSize} (@pxref{Default sizes}) at points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). If you need to draw markers of the same size then you may use @ref{Plot} function. See also @ref{Plot}, @ref{TextMark}, @ref{Stem}, @ref{Error}. @sref{Mark sample} -+ -+@deftypemethod mglGraph @code{void} Mark (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}r, @code{const char *}pen=@code{NULL}) -+The function draws marks for points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Mark (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}r, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Mark (@code{const mglData &}y, @code{const mglData &}r, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node TextMark, Error, Mark, 1D plotting -+@subsection TextMark -+@cindex TextMark -+ -+These functions draw string @var{text} as marks with size proportional to @var{r}*@var{MarkSize} (@pxref{Default sizes}) at points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}, @ref{Mark}, @ref{Stem}. @sref{TextMark sample} -+ -+@deftypemethod mglGraph @code{void} TextMark (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}r, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}) -+@deftypemethodx mglGraph @code{void} TextMark (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}r, @code{const char *}text, @code{const char *}fnt=@code{NULL}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} TextMark (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}r, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} TextMark (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}r, @code{const char *}text, @code{const char *}fnt=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} TextMark (@code{const mglData &}y, @code{const mglData &}r, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} TextMark (@code{const mglData &}y, @code{const mglData &}r, @code{const char *}text, @code{const char *}fnt=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} TextMark (@code{const mglData &}y, @code{const wchar_t *}text, @code{const char *}fnt=@code{NULL}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} TextMark (@code{const mglData &}y, @code{const char *}text, @code{const char *}fnt=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws textual marks for points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. The mark sizes @var{r}[i]=1 for all points. -+@end deftypemethod -+ -+@c ================================================================== -+@node Error, Tube, TextMark, 1D plotting -+@subsection Error -+@cindex Error -+ -+These functions draw error boxes at points @{@var{x}[i], @var{y}[i]@} on plane @var{z} = @var{zVal} (by default @var{z}=@var{Min.z}). This can be useful, for example, in experimental points, or to show numeric error or some estimations and so on. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}. @sref{Error sample} -+ -+@deftypemethod mglGraph @code{void} Error (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ex, @code{const mglData &}ey, @code{const char *}pen=@code{NULL}, @code{float}zVal=@code{NAN}) -+Draws a error box @{@var{ex}, @var{ey}@} in point position @{@var{x}, @var{y}@}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Error (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ey, @code{const wchar_t *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+Draws a error box @var{ey} (along only one direction) in point position @{@var{x}, @var{y}@}. -+@end deftypemethod -+@deftypemethod mglGraph @code{void} Error (@code{const mglData &}y, @code{const mglData &}ey, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+Draws a error box @var{ey} (along only one direction) in point position @{@var{x}, @var{y}@}, where @var{x} values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Tube, , Error, 1D plotting -+@subsection Tube -+@cindex Tube -+ -+These functions draw the tube with variable radius @var{r}[i] along the curve between points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx=r.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). See also @ref{Plot}. @sref{Tube sample} -+ -+@deftypemethod mglGraph @code{void} Tube (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}r, @code{const char *}pen=@code{NULL}) -+@deftypemethodx mglGraph @code{void} Tube (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{float} r, @code{const char *}pen=@code{NULL}) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i], @var{z}[i]@} in 3D space. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Tube (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}r, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} Tube (@code{const mglData &}x, @code{const mglData &}y, @code{float} r, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Tube (@code{const mglData &}y, @code{const mglData &}r, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+@deftypemethodx mglGraph @code{void} Tube (@code{const mglData &}y, @code{float} r, @code{const char *}pen=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws tube with radius @var{r} between points @{@var{x}[i], @var{y}[i]@} in plane @var{z}=@var{zVal} (default in plane @var{z}=@var{Min.z}), where @var{x}[i] values are equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@c ################################################################## -+@node 2D plotting, 3D plotting, 1D plotting, MathGL core -+@section 2D plotting -+ -+These functions perform plotting of 2D data. 2D means that data depend from 2 independent parameters like matrix @math{f(x_i,y_j), i=1...n, j=1...m}. There are 6 generally different types of data representations: simple mesh lines plot (Mesh), surface plot (Surf), surface plot by boxes (Boxs), surface plot by tiles (Tile), waterfall-like plot (Fall), belt plot (Belt), density plot (Dens), contour lines plot (Cont), solid contours plot (ContF) and its rotational figure (Axial). Cont, ContF and Axial functions have variants for automatic and manual selection of level values for contours. Also there are functions for plotting data grid lines according to the data format (Grid) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Mesh:: -+* Fall:: -+* Belt:: -+* Surf:: -+* Boxs:: -+* Tile:: -+* Dens:: -+* Cont:: -+* ContF:: -+* ContD:: -+* Axial:: -+* Grid:: -+@end menu -+ -+@c ================================================================== -+@node Mesh, Fall, , 2D plotting -+@subsection Mesh -+@cindex Mesh -+ -+@deftypemethod mglGraph @code{void} Mesh (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws mesh lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Mesh lines are plotted for each z slice of the data. See also @ref{Surf}, @ref{Fall}, NeshNum (@pxref{Other settings}), @ref{Cont}, @ref{Tens}. @sref{Mesh sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Mesh (@code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Fall, Belt, Mesh, 2D plotting -+@subsection Fall -+@cindex Fall -+ -+@deftypemethod mglGraph @code{void} Fall (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws fall lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If @var{sch} contain @samp{x} then lines are drawn along x-direction else (by default) lines are drawn along y-direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Fall lines are plotted for each z slice of the data. See also @ref{Belt}, @ref{Mesh}, @ref{Tens}, NeshNum (@pxref{Other settings}). @sref{Fall sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Fall (@code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Belt, Surf, Fall, 2D plotting -+@subsection Belt -+@cindex Belt -+ -+@deftypemethod mglGraph @code{void} Belt (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws belts for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. This plot can be used as 3d generalization of Plot (@pxref{Plot}). String @var{sch} sets the color scheme. Previous color scheme is used by default. If @var{sch} contain @samp{x} then belts are drawn along x-direction else (by default) belts are drawn along y-direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Belts are plotted for each z slice of the data. See also @ref{Fall}, @ref{Surf}, @ref{Plot}, NeshNum (@pxref{Other settings}). @sref{Belt sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Belt (@code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Surf, Boxs, Belt, 2D plotting -+@subsection Surf -+@cindex Surf -+ -+@deftypemethod mglGraph @code{void} Surf (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Mesh}, @ref{Dens}, @ref{Belt}, @ref{Tile}, @ref{Boxs}, @ref{SurfC}, @ref{SurfA}. @sref{Surf sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf (@code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Boxs, Tile, Surf, 2D plotting -+@subsection Boxs -+@cindex Boxs -+ -+@deftypemethod mglGraph @code{void} Boxs (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws vertical boxes for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{Tile}, @ref{Step}. @sref{Boxs sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Boxs (@code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Tile, Dens, Boxs, 2D plotting -+@subsection Tile -+@cindex Tile -+ -+@deftypemethod mglGraph @code{void} Tile (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws horizontal tiles for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. Such plot can be used as 3d generalization of Step (@pxref{Step}). String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{Boxs}, @ref{Step}, @ref{TileS}. @sref{Tile sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Tile (@code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dens, Cont, Tile, 2D plotting -+@subsection Dens -+@cindex Dens -+ -+@deftypemethod mglGraph @code{void} Dens (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws density plot for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{Cont}, @ref{ContF}, @ref{DensXYZ}. @sref{Dens sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Dens (@code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cont, ContF, Dens, 2D plotting -+@subsection Cont -+@cindex Cont -+ -+@deftypemethod mglGraph @code{void} Cont (@code{const mglData &}v, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}). Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Dens}, @ref{ContF}, @ref{Axial}, @ref{ContXYZ}. @sref{Cont sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Cont (@code{const mglData &}v, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Cont (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Cont (@code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContF, ContD, Cont, 2D plotting -+@subsection ContF -+@cindex ContF -+ -+@deftypemethod mglGraph @code{void} ContF (@code{const mglData &}v, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws solid (or filled) contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}). Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v} (must be @code{v.nx>2}). String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Dens}, @ref{Cont}, @ref{Axial}, @ref{ContFXYZ}. @sref{ContF sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContF (@code{const mglData &}v, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContF (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContF (@code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContD, Axial, ContF, 2D plotting -+@subsection ContD -+@cindex ContD -+ -+@deftypemethod mglGraph @code{void} ContD (@code{const mglData &}v, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws solid (or filled) contour lines for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal} (or for @var{z=v}[k] if @code{zVal==NAN}) with manual colors. Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v} (must be @code{v.nx>2}). String @var{sch} sets the contour colors: the color of k-th contour is determined by character @code{sch[k%strlen(sch)]}. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Dens}, @ref{Cont}, @ref{ContF}. @sref{ContD sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContD (@code{const mglData &}v, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContD (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContD (@code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Axial, Grid, ContD, 2D plotting -+@subsection Axial -+@cindex Axial -+ -+@deftypemethod mglGraph @code{void} Axial (@code{const mglData &}v, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws surface which is result of contour plot rotation for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. Contours are plotted for @var{z}[i,j]=@var{v}[k] where @var{v}[k] are values of data array @var{v}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then wire plot is produced. If string contain symbols @samp{x}, @samp{y} or @samp{z} then rotation axis @var{AxialDir} (@pxref{Other settings}) will be set to specified direction. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Cont}, @ref{ContF}, @ref{Torus}, @ref{Surf3}. @sref{Axial sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Axial (@code{const mglData &}v, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Axial (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Axial (@code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Grid, , Axial, 2D plotting -+@subsection Grid -+@cindex Grid -+ -+@deftypemethod mglGraph @code{void} Grid (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws grid lines for density plot of surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} at @var{z} = @var{zVal}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Grid is plotted for each z slice of the data. See also @ref{Dens}, @ref{Cont}, @ref{ContF}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Grid (@code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node 3D plotting, Dual plotting, 2D plotting, MathGL core -+@section 3D plotting -+ -+These functions perform plotting of 3D data. 3D means that data depend from 3 independent parameters like matrix @math{f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l}. There are 4 generally different types of data representations: isosurface or surface of constant value (Surf3), density plot at slices (Dens3), contour lines plot at slices (Cont3), solid contours plot at slices (ContF3) and cloud-like plot (Cloud). Surf3, Cont3 and ContF3 functions have variants for automatic and manual selection of level values for surfaces/contours. Also there are functions for plotting data grid lines according to the data format (Grid3) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Surf3:: -+* Dens3:: -+* Cont3:: -+* ContF3:: -+* Grid3:: -+* Cloud:: -+* Beam:: -+@end menu -+ -+@c ================================================================== -+@node Surf3, Dens3, , 3D plotting -+@subsection Surf3 -+@cindex Surf3 -+ -+@deftypemethod mglGraph @code{void} Surf3 (@code{float} val, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also @ref{Cloud}, @ref{Dens3}, @ref{Surf3C}, @ref{Surf3A}, @ref{Axial}. @sref{Surf3 sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3 (@code{float} val, @code{const mglData &}a, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3 (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3 (@code{const mglData &}a, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dens3, Cont3, Surf3, 3D plotting -+@subsection Dens3 -+@cindex Dens3 -+@cindex DensA -+ -+@deftypemethod mglGraph @code{void} Dens3 (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws density plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Density is plotted at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Cont3}, @ref{ContF3}, @ref{Dens}, @ref{Grid3}. @sref{Dens3 sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Dens3 (@code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} DensA (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}) -+Draws density plots at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} DensA (@code{const mglData &}a, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cont3, ContF3, Dens3, 3D plotting -+@subsection Cont3 -+@cindex Cont3 -+@cindex ContA -+ -+@deftypemethod mglGraph @code{void} Cont3 (@code{const mglData &}v, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws contour plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Contours are plotted for values specified in array @var{v} at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Dens3}, @ref{ContF3}, @ref{Cont}, @ref{Grid3}. @sref{Cont3 sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Cont3 (@code{const mglData &}v, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Cont3 (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Cont3 (@code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContA (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+Draws contour plots at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContA (@code{const mglData &}a, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContF3, Grid3, Cont3, 3D plotting -+@subsection ContF3 -+@cindex ContF3 -+@cindex ContFA -+ -+@deftypemethod mglGraph @code{void} ContF3 (@code{const mglData &}v, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws solid (or filled) contour plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Contours are plotted for values specified in array @var{v} at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Dens3}, @ref{Cont3}, @ref{ContF}, @ref{Grid3}. @sref{ContF3 sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContF3 (@code{const mglData &}v, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContF3 (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+The same as first one with vector @var{v} of @var{num}-th elements equidistantly distributed in range [@var{Cmin}, @var{Cmax}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContF3 (@code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContFA (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{int} num=@code{7}) -+Draws contour plots at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContFA (@code{const mglData &}a, @code{const char *}sch=@code{NULL}, @code{int} num=@code{7}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Grid3, Cloud, ContF3, 3D plotting -+@subsection Grid3 -+@cindex Grid3 -+@cindex GridA -+ -+@deftypemethod mglGraph @code{void} Grid3 (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}stl=@code{NULL}) -+The function draws grid for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). Density is plotted at slice @var{sVal} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{stl} have symbol @samp{#} then grid lines are drawn. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Cont3}, @ref{ContF3}, @ref{Dens3}, @ref{Grid}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Grid3 (@code{const mglData &}a, @code{char} dir, @code{int} sVal=@code{-1}, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} GridA (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}) -+Draws grids at all central slices of the 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} GridA (@code{const mglData &}a, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Cloud, Beam, Grid3, 3D plotting -+@subsection Cloud -+@cindex CloudP -+@cindex CloudQ -+ -+@deftypemethod mglGraph @code{void} CloudQ (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} alpha=@code{1}) -+The function draws cloud plot for 3d data specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). This plot is a set of cubes with color and transparency proportional to value of @var{a}. The resulting plot is like cloud -- low value is transparent but higher ones are not. The number of plotting cells depend on MeshNum (@pxref{Other settings}). String @var{sch} sets the color scheme. Previous color scheme is used by default. Parameter @var{alpha} changes the overall transparency of plot. The minor dimensions of arrays @var{x}, @var{y}, @var{z} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). See also @ref{Surf3}. @sref{CloudQ sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} CloudQ (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} alpha=@code{1}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} CloudP (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} alpha=@code{1}) -+The same as first one but the semi-transparent points are used instead of cubes. @sref{CloudP sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} CloudP (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} alpha=@code{1}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Beam, , Cloud, 3D plotting -+@subsection Beam -+@cindex Beam -+ -+@deftypemethod mglGraph @code{void} Beam (@code{float} val, @code{const mglData &}tr, @code{const mglData &}g1, @code{const mglData &}g2, @code{const mglData &}a, @code{float} r, @code{const char *}stl=@code{NULL}, @code{int} flag=@code{0}) -+Draws the isosurface for 3d array @var{a} at constant values of @var{a}=@var{val}. This is special kind of plot for @var{a} specified in accompanied coordinates along curve @var{tr} with orts @var{g1}, @var{g2} and with transverse scale @var{r}. Variable @var{flag} is bitwise: @samp{0x1} - draw in accompanied (not laboratory) coordinates; @samp{0x2} - draw projection to @math{\rho-z} plane; @samp{0x4} - draw normalized in each slice field. The x-size of data arrays @var{tr}, @var{g1}, @var{g2} must be nx>2. The y-size of data arrays @var{tr}, @var{g1}, @var{g2} and z-size of the data array @var{a} must be equal. @xref{Surf3}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Beam (@code{const mglData &}tr, @code{const mglData &}g1, @code{const mglData &}g2, @code{const mglData &}a, @code{float} r, @code{const char *}stl=@code{NULL}, @code{int} flag=@code{0}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+ -+ -+@c ################################################################## -+@node Dual plotting, Vector fields, 3D plotting, MathGL core -+@section Dual plotting -+ -+These plotting functions draw @emph{two matrix} simultaneously. There are 5 generally different types of data representations: surface or isosurface colored by other data (SurfC, Surf3C), surface or isosurface transpared by other data (SurfA, Surf3A), tiles with variable size (TileS), mapping diagram (Map), STFA diagram (STFA). Surf3A and Surf3C have variants for automatic and manual selection of level values for isosurfaces. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* SurfC:: -+* Surf3C:: -+* SurfA:: -+* Surf3A:: -+* TileS:: -+* Map:: -+* STFA:: -+@end menu -+ -+@c ================================================================== -+@node SurfC, Surf3C, , Dual plotting -+@subsection SurfC -+@cindex SurfC -+ -+@deftypemethod mglGraph @code{void} SurfC (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} and color it by matrix @var{c}[i,j]. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. All dimensions of arrays @var{z} and @var{c} must be equal. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{SurfA}, @ref{Surf3C}. @sref{SurfC sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SurfC (@code{const mglData &}z, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Surf3C, SurfA, SurfC, Dual plotting -+@subsection Surf3C -+@cindex Surf3C -+ -+@deftypemethod mglGraph @code{void} Surf3C (@code{float} val, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const mglData &}c, @code{const char *}stl=@code{NULL}) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as Surf3() function but the color of isosurface depends on values of array @var{c}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. All dimensions of arrays @var{z} and @var{c} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also @ref{Surf3}, @ref{SurfC}, @ref{Surf3A}. @sref{Surf3C sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3C (@code{float} val, @code{const mglData &}a, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3C (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const mglData &}c, @code{const char *}stl=@code{NULL}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3C (@code{const mglData &}a, @code{const mglData &}c, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node SurfA, Surf3A, Surf3C, Dual plotting -+@subsection SurfA -+@cindex SurfA -+ -+@deftypemethod mglGraph @code{void} SurfA (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+The function draws surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@} and transparent it by matrix @var{c}[i,j]. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string @var{sch} have symbol @samp{#} then grid lines are drawn. All dimensions of arrays @var{z} and @var{c} must be equal. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{Surf}, @ref{SurfC}, @ref{Surf3A}, @ref{TileS}. @sref{SurfA sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} SurfA (@code{const mglData &}z, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Surf3A, TileS, SurfA, Dual plotting -+@subsection Surf3A -+@cindex Surf3A -+ -+@deftypemethod mglGraph @code{void} Surf3A (@code{float} val, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const mglData &}c, @code{const char *}stl=@code{NULL}) -+The function draws isosurface plot for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as Surf3() function but the transparency of isosurface depends on values of @var{b} array. This allows one to remove the part of isosurface where @var{b} is negligibly small (useful for phase plotting of a beam or a pulse). String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. All dimensions of arrays @var{z} and @var{c} must be equal. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also @ref{Surf3}, @ref{SurfA}, @ref{Surf3C}. @sref{Surf3A sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3A (@code{float} val, @code{const mglData &}a, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3A (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const mglData &}c, @code{const char *}stl=@code{NULL}, @code{int} num=@code{3}) -+Draws @var{num}-th uniformly distributed in range [@var{Cmin}, @var{Cmax}] isosurfaces for 3d data specified parametrically. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf3A (@code{const mglData &}a, @code{const mglData &}c, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}) -+The same as previous with @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node TileS, Map, Surf3A, Dual plotting -+@subsection TileS -+@cindex TileS -+ -+@deftypemethod mglGraph @code{void} TileS (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}r, @code{const char *}sch=@code{NULL}) -+The function draws horizontal tiles for surface specified parametrically @{@var{x}[i,j], @var{y}[i,j], @var{z}[i,j]@}. It is mostly the same as Tile() but the size of tiles is determined by @var{r} array. This is some kind of ``transparency'' useful for exporting to EPS files. String @var{sch} sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays @var{x}, @var{y}, @var{z} should be equal @var{x.nx=z.nx && y.nx=z.ny} or @var{x.nx=y.nx=z.nx && x.ny=y.ny=z.ny}. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{z}). Surface is plotted for each z slice of the data. See also @ref{SurfA}, @ref{Tile}. @sref{TileS sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} TileS (@code{const mglData &}z, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Map, STFA, TileS, Dual plotting -+@subsection Map -+@cindex Map -+ -+@deftypemethod mglGraph @code{void} Map (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{int} ks=@code{0}, @code{bool} pnts=@code{true}) -+The function draws mapping plot for matrices @{@var{ax}, @var{ay} @} which parametrically depend on coordinates @var{x}, @var{y}. The previous position of the cell (point) is marked by color. Height is proportional to Jacobian(ax,ay). This plot is like Arnold diagram ???. If @code{pnts=false} then face is drawn otherwise the color ball at matrix knots are drawn. Parameter @var{ks} specifies the slice of matrices which will be used. String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be the same. The minor dimensions of arrays @var{x}, @var{y}, @var{ax} should be equal. Arrays @var{x}, @var{y} can be vectors (not matrix as @var{ax}). @xref{Color scheme}. @sref{Map sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Map (@code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{int} ks=@code{0}, @code{bool} pnts=@code{true}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node STFA, , Map, Dual plotting -+@subsection STFA -+@cindex STFA -+ -+@deftypemethod mglGraph @code{void} STFA (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}re, @code{const mglData &}im, @code{int} dn, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+Draws spectrogram of complex array @var{re}+i*@code{im} for Fourier size of @var{dn} points at plane @var{z=zVal}. Parameter @var{dn} is arbitrary even integer. For example in 1D case, result is density plot of data @math{res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn} with size @{int(nx/dn), dn, ny@}. At this array @var{re}, @var{im} parametrically depend on coordinates @var{x}, @var{y}. String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{re} and @var{im} must be the same. The minor dimensions of arrays @var{x}, @var{y}, @var{re} should be equal. Arrays @var{x}, @var{y} can be vectors (not matrix as @var{re}). @xref{Color scheme}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} STFA (@code{const mglData &}re, @code{const mglData &}im, @code{int} dn, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Vector fields, Other plotting, Dual plotting, MathGL core -+@section Vector fields -+ -+These functions perform plotting of 2D and 3D vector fields. There are 5 generally different types of vector fields representations: simple vector field (Vect, VectL), vector field with coloring (VectC), vector field by dew-drops (Dew), flow threads (Flow), flow pipes (Pipe). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* Traj:: -+* Vect:: -+* VectL:: -+* VectC:: -+* Dew:: -+* Flow:: -+* Pipe:: -+@end menu -+ -+@c ================================================================== -+@node Traj, Vect, , Vector fields -+@subsection Traj -+@cindex Traj -+ -+@deftypemethod mglGraph @code{void} Traj (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{float} len=@code{0}) -+@deftypemethodx mglGraph @code{void} Traj (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}, @code{float} len=@code{0}) -+The function draws vectors @{@var{ax}, @var{ay}, @var{az}@} along a curve @{@var{x}, @var{y}, @var{z}@}. The length and color of arrows are proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. The color is specified by the string argument @var{sch}. Previous color scheme is used by default. Parameter @var{len} set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if @var{len}=0). The minor sizea of all arrays must be equal and large 2. Vectors are plotted for each column of the arrays. See also @ref{Vect}. @sref{Traj sample} -+@end deftypemethod -+ -+@c ================================================================== -+@node Vect, VectL, Traj, Vector fields -+@subsection Vect -+@cindex Vect -+ -+@deftypemethod mglGraph @code{void} Vect (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} flag=@code{0}) -+The function draws plane vector field plot for the field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. The length and color of arrows are proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of arrows depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. Parameter @var{flag} setup the hachures (arrows). It is compination of vlaues: @code{MGL_VEC_COL} for drawing bi-color arrow, @code{MGL_VEC_LEN} for drawing fixed length arrows, @code{MGL_VEC_DOT} for drawing hachures with dots instead of arrows, @code{MGL_VEC_END} for drawing arrows to the cell point, @code{MGL_VEC_MID} for drawing arrows with center at cell point. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{VectL}, @ref{VectC}, @ref{Flow}, @ref{Dew}. @sref{Vect sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Vect (@code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} flag=@code{0}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Vect (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{int} flag=@code{0}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the length and color of arrows is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Vect 3D sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Vect (@code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{int} flag=@code{0}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node VectL, VectC, Vect, Vector fields -+@subsection VectL -+@cindex VectL -+ -+These functions are obsolete -- use Vect() functions instead. -+ -+@deftypemethod mglGraph @code{void} VectL (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws plane vector field plot for the field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. The length of hachures is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of hachures depend on @var{MeshNum} (@pxref{Other settings}). Points are denote the start of hachures. The color is specified by the string argument @var{sch}. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Vect}, @ref{VectC}, @ref{Flow}, @ref{Dew}. @sref{VectL sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} VectL (@code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} VectL (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the length of hachures is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{VectL 3D sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} VectL (@code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node VectC, Dew, VectL, Vector fields -+@subsection VectC -+@cindex VectC -+ -+These functions are obsolete -- use Vect() functions instead. -+ -+@deftypemethod mglGraph @code{void} VectC (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws plane vector field plot for the field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. The color of hachures is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of hachures depend on @var{MeshNum} (@pxref{Other settings}). Points are denote the start of hachures. The color is specified by the string argument @var{sch}. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Vect}, @ref{VectL}, @ref{Flow}, @ref{Dew}. @sref{VectC sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} VectC (@code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} VectC (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of hachures is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{VectC 3D sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} VectC (@code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dew, Flow, VectC, Vector fields -+@subsection Dew -+@cindex Dew -+ -+@deftypemethod mglGraph @code{void} Dew (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The function draws dew-drops for plane vector field @{@var{ax}, @var{ay}@} depending parametrically on coordinates @var{x}, @var{y} at level @var{z=zVal}. Note that this is very expensive plot in memory usage and creation time! The color of drops is proportional to @math{\sqrt@{ax^2+ay^2@}}. The number of drops depend on @var{MeshNum} (@pxref{Other settings}). The color is specified by the string argument @var{sch}. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Vect}, @ref{VectC}. @sref{Dew sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Dew (@code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Flow, Pipe, Dew, Vector fields -+@subsection Flow -+@cindex Flow -+ -+@deftypemethod mglGraph @code{void} Flow (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The function draws flow threads for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} at level z = @var{zVal}. Number of threads is proportional to @var{num}. Parameter @var{central} sets the thread start from center (if true) or only from edges (if false). The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Pipe}, @ref{VectC}, @ref{Vect}. @sref{Flow sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flow (@code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flow (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Flow 3D sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flow (@code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flow (@code{mglPoint} p0, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}) -+The function draws flow thread for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} from point @{@var{p0}.x, @var{p0}.z@} at level z = @var{p0}.z. The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme. Previous color scheme is used by default. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Pipe}, @ref{VectC}, @ref{Vect}. @sref{Flow sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flow (@code{mglPoint} p0, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flow (@code{mglPoint} p0, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Flow 3D sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Flow (@code{mglPoint} p0, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ================================================================== -+@node Pipe, , Flow, Vector fields -+@subsection Pipe -+@cindex Pipe -+ -+@deftypemethod mglGraph @code{void} Pipe (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The function draws flow pipes for the plane vector field @{@var{ax}, @var{ay}@} parametrically depending on coordinates @var{x}, @var{y} at level z = @var{zVal}. Number of pipes is proportional to @var{num}. Parameter @var{central} sets the pipe start from center (if true) or only from edges (if false). The color of lines is proportional to @math{\sqrt@{ax^2+ay^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String @var{sch} sets the color scheme. Previous color scheme is used by default. Parameter @var{r0} set the base pipe radius. If @var{r0}<0 then pipe radius is inverse proportional to amplitude. The size of @var{ax} and @var{ay} must be equal. The minor dimensions of arrays @var{x}, @var{y} and @var{ax} must be equal too. Arrays @var{x} and @var{y} can be vectors (not matrices as @var{ax}). The vector field is plotted for each z slice of @var{ax}, @var{ay}. See also @ref{Pipe}, @ref{VectC}, @ref{Vect}. @sref{Pipe sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Pipe (@code{const mglData &}ax, @code{const mglData &}ay, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{5}, @code{bool} central=@code{true}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Pipe (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+This is 3D version of the first functions. Here arrays @var{ax}, @var{ay}, @var{az} must be 3-ranged tensors with equal sizes and the color of line is proportional to @math{\sqrt@{ax^2+ay^2+az^2@}}. @sref{Pipe 3D sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Pipe (@code{const mglData &}ax, @code{const mglData &}ay, @code{const mglData &}az, @code{const char *}sch=@code{NULL}, @code{float} r0=@code{0.05}, @code{int} num=@code{3}, @code{bool} central=@code{true}) -+The same as previous with @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+ -+@c ################################################################## -+@node Other plotting, Nonlinear fitting, Vector fields, MathGL core -+@section Other plotting -+ -+These functions perform miscelaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular mesh (TriPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]), simple plot (SimplePlot). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@menu -+* DensXYZ:: -+* ContXYZ:: -+* ContFXYZ:: -+* Dots:: -+* Crust:: -+* TriPlot:: -+* Plots by formula:: -+* SimplePlot:: -+@end menu -+ -+@c ================================================================== -+@node DensXYZ, ContXYZ, , Other plotting -+@subsection DensXYZ -+@cindex DensX -+@cindex DensY -+@cindex DensZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. For example, code like -+@example -+gr->DensX(c.Sum("x"),"BbcyrR",-1); -+gr->DensY(c.Sum("y"),0,1); -+gr->DensZ(c.Sum("z"),0,-1); -+@end example -+will produce the following picture. See also @ref{ContXYZ}, @ref{ContFXYZ}, @ref{Dens}. @sref{Dens projection sample} -+ -+@deftypemethod mglGraph @code{void} DensX (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws density plot for data @var{a} at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} DensY (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws density plot for data @var{a} at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} DensZ (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws density plot for data @var{a} at z = @var{sVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContXYZ, ContFXYZ, DensXYZ, Other plotting -+@subsection ContXYZ -+@cindex ContX -+@cindex ContY -+@cindex ContZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. For example, code like -+@example -+gr->ContX(c.Sum("x"),"BbcyrR",-1); -+gr->ContY(c.Sum("y"),0,1); -+gr->ContZ(c.Sum("z"),0,-1); -+@end example -+will produce the following picture. See also @ref{ContFXYZ}, @ref{DensXYZ}, @ref{Cont}. @sref{Cont projection sample} -+ -+@deftypemethod mglGraph @code{void} ContX (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th contour lines for data @var{a} at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContY (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th contour lines for data @var{a} at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContZ (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th contour lines for data @var{a} at z = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContX (@code{const mglData &}v, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws contour lines for data @var{a}=@var{v}[i] at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContY (@code{const mglData &}v, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws contour lines for data @var{a}=@var{v}[i] at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContZ (@code{const mglData &}v, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws contour lines for data @var{a}=@var{v}[i] at z = @var{sVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node ContFXYZ, Dots, ContXYZ, Other plotting -+@subsection ContFXYZ -+@cindex ContFX -+@cindex ContFY -+@cindex ContFZ -+ -+These plotting functions draw density plot in x, y, or z plain. If @var{a} is a tensor (3-dimensional data) then interpolation to a given @var{sVal} is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also @ref{ContXYZ}, @ref{DensXYZ}, @ref{ContF}. -+ -+@deftypemethod mglGraph @code{void} ContFX (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContFY (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContFZ (@code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}, @code{int} num=@code{7}) -+Draws @var{num}-th solid contours for data @var{a} at z = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContFX (@code{const mglData &}v, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws solid contours for data @var{a}=@var{v}[i] at x = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContFY (@code{const mglData &}v, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws solid contours for data @var{a}=@var{v}[i] at y = @var{sVal}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ContFZ (@code{const mglData &}v, @code{const mglData &}a, @code{const char *}stl=@code{NULL}, @code{float} sVal=@code{NAN}) -+Draws solid contours for data @var{a}=@var{v}[i] at z = @var{sVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node Dots, Crust, ContFXYZ, Other plotting -+@subsection Dots -+@cindex Dots -+ -+@deftypemethod mglGraph @code{void} Dots (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+@deftypemethodx mglGraph @code{void} Dots (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}sch=@code{NULL}) -+The function draws the arbitrary placed points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If array @var{a} is specified then it define the transparency of dots. Arrays @var{x}, @var{y}, @var{z}, @var{a} must have equal sizes. See also @ref{Crust}, @ref{Mark}, @ref{Plot}. @sref{Dots sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Dots (@code{const mglData &}tr, @code{const char *}sch=@code{NULL}) -+The same as previous with @var{x=tr}(0,:), @var{y=tr}(1,:), @var{z=tr}(2,:) and if @var{tr}.nx>3 then @var{a=tr}(3,:). -+@end deftypemethod -+ -+@c ================================================================== -+@node Crust, TriPlot, Dots, Other plotting -+@subsection Crust -+@cindex Crust -+ -+@deftypemethod mglGraph @code{void} Crust (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}, @code{float} er=@code{0}) -+The function reconstruct and draws the surface for arbitrary placed points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. Parameter @var{er} set relative radius for (increase it for removing holes). String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. Arrays @var{x}, @var{y}, @var{z} must have equal sizes. See also @ref{Dots}, @ref{TriPlot}. @sref{Crust sample} -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Crust (@code{const mglData &}tr, @code{const char *}sch=@code{NULL}, @code{float} er=@code{0}) -+The same as previous with @var{x=tr}(0,:), @var{y=tr}(1,:), @var{z=tr}(2,:). -+@end deftypemethod -+ -+@c ================================================================== -+@node TriPlot, Plots by formula, Crust, Other plotting -+@subsection TriPlot -+@cindex TriPlot -+ -+@deftypemethod mglGraph @code{void} TriPlot (@code{const mglData &}id, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}c, @code{const char *}sch=@code{NULL}) -+@deftypemethodx mglGraph @code{void} TriPlot (@code{const mglData &}id, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const char *}sch=@code{NULL}) -+The function draws the surface of triangles. Triangle vertexes are set by indexes @var{id} of data points @{@var{x}[i], @var{y}[i], @var{z}[i]@}. String @var{sch} sets the color scheme. Previous color scheme is used by default. If string contain @samp{#} then wire plot is produced. First dimensions of @var{id} must be 3 or greater. Arrays @var{x}, @var{y}, @var{z} must have equal sizes. Parameter @var{c} set the colors of triangles (if @var{id}.ny=@var{c}.nx) or colors of vertexes (if @var{x}.nx=@var{c}.nx). See also @ref{Dots}, @ref{Crust}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} TriPlot (@code{const mglData &}id, @code{const mglData &}x, @code{const mglData &}y, @code{const char *}sch=@code{NULL}, @code{float} zVal=@code{NAN}) -+The same as previous with @var{z}[i]=@var{zVal}. -+@end deftypemethod -+ -+@c ================================================================== -+@node Plots by formula, SimplePlot, TriPlot, Other plotting -+@subsection Plots by formula -+@cindex Plot -+@cindex Surf -+ -+These functions perform plotting of 1D or 2D functions specified by textual formula. You do not need to create the data arrays to plot it. The parameter @var{stl} set the line style (@pxref{Line styles}) for @code{Plot()} or color scheme (@pxref{Color scheme}) for @code{Surf()}. The parameter @var{n} set the minimal number of points along coordinate(s) for plots. At this time (v. 1.7) there is no adaptive increase of data points numbers but in future it will appear. -+ -+@deftypemethod mglGraph @code{void} Plot (@code{const char *}eqY, @code{const char *}stl=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} n=@code{100}) -+The function draws function @samp{eqY(x)} at plane z=@var{zVal} where @samp{x} variable is changed in range [@var{Min}.x, @var{Max}.x]. See also @ref{Plot}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Plot (@code{const char *}eqX, @code{const char *}eqY, @code{const char *}eqZ, @code{const char *}stl=@code{NULL}, @code{float} zVal=@code{NAN}, @code{int} n=@code{100}) -+The function draws parametrical curve @{@samp{eqX(t)}, @samp{eqY(t)}, @samp{eqZ(t)}@} where @samp{t} variable is changed in range [0, 1]. See also @ref{Plot}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf (@code{const char *}eqZ, @code{const char *}stl=@code{NULL}, @code{int} n=@code{100}); -+The function draws surface for function @samp{eqY(x,y)} where @samp{x}, @samp{y} variables are changed in range [@var{Min}, @var{Max}]. See also @ref{Surf}. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Surf (@code{const char *}eqX, @code{const char *}eqY, @code{const char *}eqZ, @code{const char *}stl=@code{NULL}, @code{int} n=@code{100}) -+The function draws parametrical surface @{@samp{eqX(u,v)}, @samp{eqY(u,v)}, @samp{eqZ(u,v)}@} where @samp{u}, @samp{v} variables are changed in range [0, 1]. See also @ref{Surf}. -+@end deftypemethod -+ -+@c ================================================================== -+@node SimplePlot, , Plots by formula, Other plotting -+@subsection SimplePlot -+@cindex SimplePlot -+ -+@deftypemethod mglGraph @code{void} SimplePlot (@code{const mglData &}a, @code{int} type=@code{0}, @code{const char *}stl=@code{NULL}) -+Plots the array @var{a} depending on it's dimensions and @var{type} parameter. String @var{stl} specifies the style of plotting. For 1d data: @code{type=0} -- @ref{Plot}, @code{type=1} -- @ref{Area}, @code{type=2} -- @ref{Step}, @code{type=3} -- @ref{Stem}, @code{type=4} -- @ref{Bars}. For 2d data: @code{type=0} -- @ref{Surf}, @code{type=1} -- @ref{Dens}, @code{type=2} -- @ref{Mesh}, @code{type=3} -- @ref{Cont}. For 3d data: @code{type=0} -- @ref{Surf3}, @code{type=1} -- @ref{Dens3}, @code{type=2} -- @ref{Cont3}, @code{type=2} -- @ref{Cloud}. -+@end deftypemethod -+ -+@c ################################################################## -+@node Nonlinear fitting, Frames/Animation, Other plotting, MathGL core -+@section Nonlinear fitting -+@cindex Fit -+@cindex FitS -+@cindex PutsFit -+@cindex FitPnts -+@cindex Fit2 -+@cindex Fit3 -+ -+These functions fit data to formula. Fitting goal is to find formula parameters for the best fit the data points, i.e. to minimize the sum @math{\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2}. At this, approximation function @samp{f} can depend only on one argument @samp{x} (1D case), on two arguments @samp{x,y} (2D case) and on three arguments @samp{x,y,z} (3D case). The function @samp{f} also may depend on parameters. Normally the list of fitted parameters is specified by @var{var} string (like, @samp{abcd}). Usually user should supply initial values for fitted parameters by @var{ini} variable. But if he/she don't supply it then the zeros are used. Parameter @var{print}=@code{true} switch on printing the found coefficients to @var{Message} (@pxref{Error handling}). -+ -+Functions Fit() and FitS() do not draw the obtained data themselves. They fill the data @var{fit} by formula @samp{f} with found coefficients and return the @math{\chi^2} error of approximation. At this, the @samp{x,y,z} coordinates are equidistantly distributed in the interval @var{Min}--@var{Max}. Number of points in @var{fit} is selected as maximal value of @var{fit} size and the value of @var{FitPnts}. Note, that this functions use GSL library and do something only if MathGL was compiled with GSL support. @sref{Fitting sample} -+ -+@deftypemethod mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-, y- and z-directions for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-, and y-directions for 2d array specified parametrically @var{a}[i,j](@var{x}[i,j], @var{y}[i,j]) for each data slice. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array specified parametrically @var{a}[i](@var{x}[i]) for each data slice. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} FitS (@code{mglData &}fit, @code{const mglData &}a, @code{const mglData &}s, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array with @var{x} equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-, y- and z-directions for 3d array specified parametrically @var{a}[i,j,k](@var{x}[i,j,k], @var{y}[i,j,k], @var{z}[i,j,k]) with @var{s}[i,j,k]=1. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-, and y-directions for 2d array specified parametrically @var{a}[i,j](@var{x}[i,j], @var{y}[i,j]) with @var{s}[i,j]=1 for each data slice. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}x, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array specified parametrically @var{a}[i](@var{x}[i]) with @var{s}[i]=1 for each data slice. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} Fit (@code{mglData &}fit, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-direction for 1d array @var{a} with @var{s}=1 and @var{x} equidistantly distributed in interval [@var{Min}.x, @var{Max}.x]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} Fit2 (@code{mglData &}fit, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} Fit2 (@code{mglData &}fit, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-, and y-directions for 2d array @var{a} with @var{s}=1 and @var{x}, @var{y} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{float} Fit3 (@code{mglData &}fit, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{float *}ini=@code{NULL}, @code{bool} print=@code{false}) -+@deftypemethodx mglGraph @code{float} Fit3 (@code{mglData &}fit, @code{const mglData &}a, @code{const char *}func, @code{const char *}var, @code{mglData &}ini, @code{bool} print=@code{false}) -+Fit data along x-, y- and z-directions for 3d array @var{a} with @var{s}=1 and @var{x}, @var{y}, @var{z} equidistantly distributed in interval [@var{Min}, @var{Max}]. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} PutsFit (@code{mglPoint} p, @code{const char *}prefix=@code{NULL}, @code{const char *}font=@code{NULL}, @code{float} size=@code{-1}) -+Print last fitted formula with found coefficients (as numbers) at position @var{p0}. The string @var{prefix} will be printed before formula. All other parameters are the same as in @ref{Text printing}. -+@end deftypemethod -+ -+@deftypecv {General option} mglGraph @code{int} FitPnts -+Minimal number of points for output array after nonlinear fitting. -+@end deftypecv -+ -+@c ################################################################## -+@node Frames/Animation, IDTF functions, Nonlinear fitting, MathGL core -+@section Frames/Animation -+@cindex NewFrame -+@cindex EndFrame -+@cindex GetNumFrame -+ -+These functions provide ability to create several pictures simultaneously. For most of cases it is useless but for widget classes (@pxref{Widget classes}) they can provide a way to show animation. Also you can write several frames into animated GIF file. -+ -+@deftypemethod mglGraph @code{int} NewFrame () -+Creates new frame. Function returns current frame id. This is not thread safe function in OpenGL mode! Use direct list creation in multi-threading drawing. The function @code{EndFrame()} @strong{must} be call after the finishing of the frame drawing for each call of this function. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} EndFrame () -+Finishes the frame drawing. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{int} GetNumFrame () -+Gets the number of created frames. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} ResetFrames () -+Reset frames counter (start it from zero). -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} StartGIF (@code{const char *}fname, @code{int} ms=@code{100}) -+Start writing frames into animated GIF file @var{fname}. Parameter @var{ms} set the delay between frames in milliseconds. You @strong{should not} change the picture size during writing the cinema. Use CloseGIF() to finalize writing. Note, that this function is disabled in OpenGL mode. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{int} CloseGIF () -+Finish writing animated GIF and close connected pointers. -+@end deftypemethod -+ -+@c ################################################################## -+@node IDTF functions, , Frames/Animation, MathGL core -+@section IDTF functions -+@cindex NewFrame -+@cindex EndFrame -+@cindex GetNumFrame -+ -+These functions provide IDTF specific features. In all other cases they do nothing. -+ -+@deftypemethod mglGraph @code{void} VertexColor (@code{bool} enable) -+Enables smooth color change. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} Compression (@code{bool} enable) -+Gives smaller files, but quality degrades. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} StartGroup (const char *name) -+Starts group definition. Groups contain objects and other groups, they are used to select a part of a model to zoom to or to make invizible or to make transparent and so on. -+@end deftypemethod -+ -+@deftypemethod mglGraph @code{void} EndGroup () -+Ends group definition. -+@end deftypemethod -+ ---- mathgl-1.10.2.1.orig/texinfo/Makefile.in -+++ mathgl-1.10.2.1/texinfo/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -34,11 +34,15 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = texinfo --DIST_COMMON = $(mathgl_en_TEXINFOS) $(mathgl_ru_TEXINFOS) \ -- $(srcdir)/Makefile.am $(srcdir)/Makefile.in -+DIST_COMMON = $(mathgl_en_TEXINFOS) $(srcdir)/Makefile.am \ -+ $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d -@@ -47,14 +51,14 @@ CONFIG_CLEAN_FILES = - CONFIG_CLEAN_VPATH_FILES = - SOURCES = - DIST_SOURCES = --INFO_DEPS = mathgl_en.info mathgl_ru.info -+INFO_DEPS = mathgl_en.info - TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex - am__TEXINFO_TEX_DIR = $(top_srcdir)/config --DVIS = mathgl_en.dvi mathgl_ru.dvi --PDFS = mathgl_en.pdf mathgl_ru.pdf --PSS = mathgl_en.ps mathgl_ru.ps --HTMLS = mathgl_en.html mathgl_ru.html --TEXINFOS = mathgl_en.texi mathgl_ru.texi -+DVIS = mathgl_en.dvi -+PDFS = mathgl_en.pdf -+PSS = mathgl_en.ps -+HTMLS = mathgl_en.html -+TEXINFOS = mathgl_en.texi - TEXI2DVI = texi2dvi - DVIPS = dvips - RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ -@@ -290,7 +294,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = png . -+SUBDIRS = . - CLEANFILES = mathgl_en.info mathgl_en.info-1 mathgl_en.info-2 mathgl_en.info-3 \ - mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 - -@@ -298,18 +302,23 @@ MAKEINFOHTML = texi2html - TEXI2PDF = texi2pdf - AM_MAKEINFOHTMLFLAGS = --split=chapter - AM_MAKEINFOFLAGS = --no-validate --info_TEXINFOS = mathgl_en.texi mathgl_ru.texi -+info_TEXINFOS = mathgl_en.texi - mathgl_en_TEXINFOS = \ --example_en.texi gpl-3.0.texi overview_en.texi samples_en.texi \ --class_en.texi fdl.texi data_en.texi \ --core_en.texi gpl-2.0.texi mgl_en.texi -- --mathgl_ru_TEXINFOS = \ --samples_ru.texi class_ru.texi overview_ru.texi appendix_ru.texi \ --data_ru.texi mgl_ru.texi core_ru.texi example_ru.texi fdl.texi \ --gpl-2.0.texi gpl-3.0.texi -+ example_en.texi gpl-3.0.texi overview_en.texi samples_en.texi \ -+ class_en.texi fdl.texi data_en.texi \ -+ core_en.texi gpl-2.0.texi mgl_en.texi - -+ -+#Disabled. This throws UTF8 errors on attempt to build, and drops texinfo -+#into interactive mode. -+#info_TEXINFOS += mathgl_ru.texi -+#mathgl_ru_TEXINFOS = \ -+# samples_ru.texi class_ru.texi overview_ru.texi appendix_ru.texi \ -+# data_ru.texi mgl_ru.texi core_ru.texi example_ru.texi fdl.texi \ -+# gpl-2.0.texi gpl-3.0.texi - mglpng = $(DESTDIR)$(docdir)/png_static -+images = ${shell $(top_builddir)/examples/mgl_example -list} -+png_images = ${images:=.png} - all: all-recursive - - .SUFFIXES: -@@ -392,48 +401,6 @@ mathgl_en.html: mathgl_en.texi $(mathgl_ - rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ - exit 1; \ - fi -- --mathgl_ru.info: mathgl_ru.texi $(mathgl_ru_TEXINFOS) -- restore=: && backupdir="$(am__leading_dot)am$$$$" && \ -- rm -rf $$backupdir && mkdir $$backupdir && \ -- if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ -- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ -- done; \ -- else :; fi && \ -- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -- -o $@ `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi; \ -- then \ -- rc=0; \ -- else \ -- rc=$$?; \ -- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ -- fi; \ -- rm -rf $$backupdir; exit $$rc -- --mathgl_ru.dvi: mathgl_ru.texi $(mathgl_ru_TEXINFOS) -- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ -- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ -- $(TEXI2DVI) -o $@ `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi -- --mathgl_ru.pdf: mathgl_ru.texi $(mathgl_ru_TEXINFOS) -- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ -- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ -- $(TEXI2PDF) -o $@ `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi -- --mathgl_ru.html: mathgl_ru.texi $(mathgl_ru_TEXINFOS) -- rm -rf $(@:.html=.htp) -- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -- -o $(@:.html=.htp) `test -f 'mathgl_ru.texi' || echo '$(srcdir)/'`mathgl_ru.texi; \ -- then \ -- rm -rf $@; \ -- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ -- mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ -- else \ -- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ -- rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ -- exit 1; \ -- fi - .dvi.ps: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< -@@ -520,17 +487,11 @@ mostlyclean-aminfo: - -rm -rf mathgl_en.aux mathgl_en.cp mathgl_en.cps mathgl_en.fn mathgl_en.fns \ - mathgl_en.ky mathgl_en.kys mathgl_en.log mathgl_en.pg \ - mathgl_en.tmp mathgl_en.toc mathgl_en.tp mathgl_en.tps \ -- mathgl_en.vr mathgl_en.vrs mathgl_ru.aux mathgl_ru.cp \ -- mathgl_ru.cps mathgl_ru.fn mathgl_ru.fns mathgl_ru.ky \ -- mathgl_ru.kys mathgl_ru.log mathgl_ru.pg mathgl_ru.tmp \ -- mathgl_ru.toc mathgl_ru.tp mathgl_ru.tps mathgl_ru.vr \ -- mathgl_ru.vrs -+ mathgl_en.vr mathgl_en.vrs - - clean-aminfo: -- -test -z "mathgl_en.dvi mathgl_en.pdf mathgl_en.ps mathgl_en.html mathgl_ru.dvi \ -- mathgl_ru.pdf mathgl_ru.ps mathgl_ru.html" \ -- || rm -rf mathgl_en.dvi mathgl_en.pdf mathgl_en.ps mathgl_en.html mathgl_ru.dvi \ -- mathgl_ru.pdf mathgl_ru.ps mathgl_ru.html -+ -test -z "mathgl_en.dvi mathgl_en.pdf mathgl_en.ps mathgl_en.html" \ -+ || rm -rf mathgl_en.dvi mathgl_en.pdf mathgl_en.ps mathgl_en.html - - maintainer-clean-aminfo: - @list='$(INFO_DEPS)'; for i in $$list; do \ -@@ -546,7 +507,7 @@ maintainer-clean-aminfo: - # (which will cause the Makefiles to be regenerated when you run `make'); - # (2) otherwise, pass the desired values on the `make' command line. - $(RECURSIVE_TARGETS): -- @failcom='exit 1'; \ -+ @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -571,7 +532,7 @@ $(RECURSIVE_TARGETS): - fi; test -z "$$fail" - - $(RECURSIVE_CLEAN_TARGETS): -- @failcom='exit 1'; \ -+ @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -781,8 +742,6 @@ dvi: dvi-recursive - - dvi-am: $(DVIS) - --html: html-recursive -- - html-am: $(HTMLS) - - info: info-recursive -@@ -903,8 +862,6 @@ mostlyclean: mostlyclean-recursive - mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ - mostlyclean-libtool - --pdf: pdf-recursive -- - pdf-am: $(PDFS) - - ps: ps-recursive -@@ -935,8 +892,14 @@ uninstall-am: uninstall-dvi-am uninstall - uninstall-local uninstall-pdf-am uninstall-ps-am - - --#install-data-local: install-html install-pdf --install-data-local: install-html -+all-local: png_build -+ -+png_build: -+ $(top_builddir)/examples/mgl_example -+ mv ${png_images} png/ -+ touch mathgl.texi -+ -+install-data-local: install-html install-pdf - mkdir -p $(mglpng) - cp -r $(top_srcdir)/texinfo/png_static/*.png $(mglpng) - -@@ -944,7 +907,12 @@ uninstall-local: - rm -rf $(mglpng) - - #all-local: html pdf --all-local: html -+all-local: html pdf -+ -+html: png_build -+ -+pdf: png_build -+ texi2pdf mathgl_en.texi - - # 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. ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/data.texi -@@ -0,0 +1,579 @@ -+@c ------------------------------------------------------------------ -+@node mglData class, Other classes, Widget classes, Top -+@chapter mglData class -+ -+Class for working with data array. This class is defined in @code{#include }. The class has functions for easy and safe allocation, resizing, loading and saving, modifying of data arrays. Also it can numerically differentiate and integrate data, interpolate, fill data by formula and so on. Class supports data with dimensions up to 3 (like function of 3 variables - x,y,z). The internal representation of numbers is float. Float type was chosen because it has smaller size in memory and usually it has enough precision in plotting purposes. -+ -+@menu -+* Public variables:: -+* Create and delete:: -+* Fill:: -+* Rearrange:: -+* File I/O:: -+* Make another data:: -+* Functions on direction:: -+* Interpolation:: -+* Informational functions:: -+* Operators:: -+* Global functions:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Public variables, Create and delete, , mglData class -+@section Public variables -+ -+@deftypecv {Variable} mglData @code{float *} a -+Data array itself. The flat data representation is used. For example, matrix [nx x ny] is presented as flat (1d-) array with length nx*ny. The element with indexes @{i, j, k@} is a[i+nx*j+nx*ny*k] (indexes are zero based). -+@end deftypecv -+@deftypecv {Variable} mglData @code{int} nx -+Number of points in 1st dimensions ('x' dimension). -+@end deftypecv -+@deftypecv {Variable} mglData @code{int} ny -+Number of points in 2nd dimensions ('y' dimension). -+@end deftypecv -+@deftypecv {Variable} mglData @code{int} nz -+Number of points in 3d dimensions ('z' dimension). -+@end deftypecv -+@deftypecv {Variable} mglData @code{char *} id -+Column (or slice if nz>1) names -- one character per column. -+@end deftypecv -+ -+ -+@c ------------------------------------------------------------------ -+@node Create and delete, Fill, Public variables, mglData class -+@section Create and delete -+@cindex mglData -+@cindex Set -+ -+@defop Constructor mglData @code{} mglData (@code{int} mx=@code{1}, @code{int} my=@code{1}, @code{int} mz=@code{1}) -+Default constructor. Allocates the memory for data array and initializes it by zero. -+@end defop -+@defop Constructor mglData @code{} mglData (@code{const char *}fname) -+Initializes the data by reading from file. -+@end defop -+@defop Constructor mglData @code{} mglData (@code{const mglData} &dat) -+Initiates by other @code{mglData} instance. -+@end defop -+@deftypemethod mglData @code{void} Create (@code{int} mx, @code{int} my=@code{1}, @code{int} mz=@code{1}) -+Creates or recreates the array with specified size and fills it by zero. This function does nothing if one of parameters @var{mx}, @var{my}, @var{mz} is zero or negative. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Set (@code{const float *}A, @code{int} NX, @code{int} NY=@code{1}, @code{int} NZ=@code{1}) -+Allocates memory and copies the data from the @strong{flat} @code{float*} array. -+@end deftypemethod -+@deftypemethod mglData @code{void} Set (@code{const double *}A, @code{int} NX, @code{int} NY=@code{1}, @code{int} NZ=@code{1}) -+Allocates memory and copies the data from the @strong{flat} @code{double*} array. -+@end deftypemethod -+@deftypemethod mglData @code{void} Set (@code{const float **}A, @code{int} N1, @code{int} N2) -+Allocates memory and copies the data from the @code{float**} array with dimensions @var{N1}, @var{N2}, i.e. from array defined as @code{float a[N1][N2];}. -+@end deftypemethod -+@deftypemethod mglData @code{void} Set (@code{const double **}A, @code{int} N1, @code{int} N2) -+Allocates memory and copies the data from the @code{double**} array with dimensions @var{N1}, @var{N2}, i.e. from array defined as @code{double a[N1][N2];}. -+@end deftypemethod -+@deftypemethod mglData @code{void} Set (@code{const float ***}A, @code{int} N1, @code{int} N2) -+Allocates memory and copies the data from the @code{float***} array with dimensions @var{N1}, @var{N2}, @var{N3}, i.e. from array defined as @code{float a[N1][N2][N3];}. -+@end deftypemethod -+@deftypemethod mglData @code{void} Set (@code{const double ***}A, @code{int} N1, @code{int} N2) -+Allocates memory and copies the data from the @code{double***} array with dimensions @var{N1}, @var{N2}, @var{N3}, i.e. from array defined as @code{double a[N1][N2][N3];}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Set (@code{gsl_vector *}v) -+Allocates memory and copies the data from the @code{gsl_vector *} structure. -+@end deftypemethod -+@deftypemethod mglData @code{void} Set (@code{gsl_matrix *}m) -+Allocates memory and copies the data from the @code{gsl_matrix *} structure. -+@end deftypemethod -+@deftypemethod mglData @code{inline void} Set (@code{const mglData &}dat) -+Copies the data from mglData instance @var{dat}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Set (@code{const std::vector &}d) -+@deftypemethodx mglData @code{void} Set (@code{const std::vector &}d) -+@deftypemethodx mglData @code{void} Set (@code{const std::vector &}d) -+Allocates memory and copies the data from the @code{std::vector} array. -+@end deftypemethod -+ -+ -+@deftypemethod mglData @code{void} Set (@code{const char *}str, @code{int} NX, @code{int} NY=@code{1}, @code{int} NZ=@code{1}) -+Allocates memory and scanf the data from the string. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Fill, Rearrange, Create and delete, mglData class -+@section Fill -+@cindex Fill -+@cindex Modify -+ -+@deftypemethod mglData @code{void} Fill (@code{float} x1, @code{float} x2, @code{char} dir=@code{'x'}) -+Equidistantly fills the data values to range [@var{x1}, @var{x2}] in direction @var{dir}=@{@samp{x},@samp{y},@samp{z}@}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Fill (@code{const char *}eq, @code{mglPoint} Min, @code{mglPoint} Max, @code{const mglData *}vdat=0, @code{const mglData *}wdat=0) -+Fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}, @samp{v}, @samp{w}. Coordinates @samp{x}, @samp{y}, @samp{z} are supposed to be normalized in range @var{Min} x @var{Max} (in difference from @code{Modify} functions). Variable @samp{u} is the original value of the array. Variables @samp{v} and @samp{w} are values of @var{vdat}, @var{wdat} which can be @code{NULL} (i.e. can be omitted). -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Modify (@code{const char *}eq, @code{int} dim=@code{0}) -+Function fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in range [0,1]. Variable @samp{u} is the original value of the array. Modification will be fulfilled only for slices >=@var{dim}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Modify (@code{const char *}eq, @code{const mglData &}v) -+@deftypemethodx mglData @code{void} Modify (@code{const char *}eq, @code{const mglData &}v, @code{const mglData &}w) -+Function fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}, @samp{v}, @samp{w}. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in range [0,1]. Variable @samp{u} is the original value of the array. Variables @samp{v} and @samp{w} are values of @var{vdat}, @var{wdat}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Put (@code{float} val, @code{int} i=@code{-1}, @code{int} j=@code{-1}, @code{int} k=@code{-1}) -+Function sets value(s) of array a[@var{i}, @var{j}, @var{k}] = @var{val}. Negative indexes @var{i}, @var{j}, @var{k}=-1 set the value @var{val} to whole range in corresponding direction(s). For example, @code{Put(val,-1,0,-1);} sets a[i,0,j]=@var{val} for i=0...(nx-1), j=0...(nz-1). -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Put (@code{const mglData &}v, @code{int} i=@code{-1}, @code{int} j=@code{-1}, @code{int} k=@code{-1}) -+Function copies value(s) from array @var{v} to the range of original array. Negative indexes @var{i}, @var{j}, @var{k}=-1 set the range in corresponding direction(s). At this minor dimensions of array @var{v} should be large than corresponding dimensions of this array. For example, @code{Put(v,-1,0,-1);} sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Rearrange, File I/O, Fill, mglData class -+@section Rearrange -+@cindex Rearrange -+@cindex Extend -+@cindex Transpose -+@cindex Squeeze -+@cindex Crop -+@cindex InsertRows -+@cindex InsertColumns -+@cindex InsertSlices -+@cindex DeleteRows -+@cindex DeleteColumns -+@cindex DeleteSlices -+@cindex Insert -+@cindex Delete -+ -+@deftypemethod mglData @code{void} Rearrange (@code{int} mx, @code{int} my=@code{0}, @code{int} mz=@code{0}) -+Rearrange dimensions without changing data array so that resulting sizes should be @var{mx}*@var{my}*@var{mz} < nx*ny*nz. If some of parameter @var{my} or @var{mz} are zero then it will be selected to optimal fill of data array. For example, if @var{my}=0 then it will be change to @var{my}=nx*ny*nz/@var{mx} and @var{mz} will be 1. -+@end deftypemethod -+@deftypemethod mglData @code{void} Extend (@code{int} n1, @code{int} n2=@code{0}) -+Increase the dimensions of the data by inserting new (|@var{n1}|+1)-th slices after (for @var{n1}>0) or before (for @var{n1}<0) of existed one. It is possible to insert 2 dimensions simultaneously for 1d data by using parameter @var{n2}. Data to new slices is copy from existed one. For example, for @var{n1}>0 new array will be -+@iftex -+@math{a_{ij}^{new} = a_i^{old}} where j=0...@var{n1}. Correspondingly, for @var{n1}<0 new array will be @math{a_{ij}^{new} = a_j^{old}} where i=0...|@var{n1}|. -+@end iftex -+@ifnottex -+a_ij^new = a_i^old where j=0...@var{n1}. Correspondingly, for @var{n1}<0 new array will be a_ij^new = a_j^old where i=0...|@var{n1}|. -+@end ifnottex -+@end deftypemethod -+@deftypemethod mglData @code{void} Transpose (@code{const char *}dim=@code{"yx"}) -+Transposes (shift order of) dimensions of the data. New order of dimensions is specified int string @var{dim}. This function may be useful also for the reading of one-dimensional data. -+@end deftypemethod -+@deftypemethod mglData @code{void} Squeeze (@code{int} rx, @code{int} ry=@code{1}, @code{int} rz=@code{1}, @code{bool} smooth=@code{true}) -+Reduces the data size by excluding data elements which indexes are not divisible by @var{rx}, @var{ry}, @var{rz} correspondingly. -+@end deftypemethod -+@deftypemethod mglData @code{void} Crop (@code{int} n1, @code{int} n2, @code{char} dir=@code{'x'}) -+ Cuts off edges of the data @var{i}<@var{n1} and @var{i}>@var{n2} if @var{n2}>0 or @var{i}>@code{n[xyz]}-@var{n2} if @var{n2}<=0 along direction @var{dir}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} InsertRows (@code{int} at, @code{int} num=@code{1}, @code{const char *}eq=@code{NULL}) -+Insert @var{num} rows (slice along y-direction) at position @var{at} and fill it by formula @var{eq} (if @var{eq}!=0) or by zeros. -+@end deftypemethod -+@deftypemethod mglData @code{void} InsertColumns (@code{int} at, @code{int} num=@code{1}, @code{const char *}eq=@code{NULL}) -+Insert @var{num} columns (slice along x-direction) at position @var{at} and fill it by formula @var{eq} (if @var{eq}!=0) or by zeros. -+@end deftypemethod -+@deftypemethod mglData @code{void} InsertSlices (@code{int} at, @code{int} num=@code{1}, @code{const char *}eq=@code{NULL}) -+Insert @var{num} slices (slice along z-direction) at position @var{at} and fill it by formula @var{eq} (if @var{eq}!=0) or by zeros. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} DeleteRows (@code{int} at, @code{int} num=@code{1}) -+Delete @var{num} rows (slice along y-direction) at position @var{at}. -+@end deftypemethod -+@deftypemethod mglData @code{void} DeleteColumns (@code{int} at, @code{int} num=@code{1}) -+Delete @var{num} columns (slice along x-direction) at position @var{at}. -+@end deftypemethod -+@deftypemethod mglData @code{void} DeleteSlices (@code{int} at, @code{int} num=@code{1}) -+Delete @var{num} slices (slice along z-direction) at position @var{at}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Insert (@code{char} dir, @code{int} pos=@code{0}, @code{int} num=@code{1}) -+Insert @var{num} slices along @var{dir}-direction at position @var{pos} and fill it by zeros. -+@end deftypemethod -+@deftypemethod mglData @code{void} Delete (@code{char} dir, @code{int} pos=@code{0}, @code{int} num=@code{1}) -+Delete @var{num} slices along @var{dir}-direction at position @var{pos}. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node File I/O, Make another data, Rearrange, mglData class -+@section File I/O -+@cindex Read -+@cindex ReadMat -+@cindex ReadAll -+@cindex ReadRange -+@cindex ReadHDF -+@cindex Save -+@cindex SaveHDF -+@cindex Export -+@cindex Import -+ -+@deftypemethod mglData @code{void} Read (@code{const char *}fname) -+Reads data from tab-separated text file with auto determining sizes of the data. -+@end deftypemethod -+@deftypemethod mglData @code{void} Read (@code{const char *}fname, @code{int} mx, @code{int} my=@code{1}, @code{int} mz=@code{1}) -+Reads data from text file with specified data sizes. This function does nothing if one of parameters @var{mx}, @var{my} or @var{mz} is zero or negative. -+@end deftypemethod -+@deftypemethod mglData @code{void} ReadMat (@code{const char *}fname, @code{int} dim=@code{2}) -+Read data from text file with size specified at beginning of the file by first @var{dim} numbers. At this, variable @var{dim} set data dimensions. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} ReadRange (@code{const char *}templ, @code{float} from, @code{float} to, @code{float} step=@code{1.f}, @code{bool} as_slice=@code{false}) -+Join data arrays from several text files. The file names are determined by function call @code{sprintf(fname,templ,val);}, where @var{val} changes from @var{from} to @var{to} with step @var{step}. The data load one-by-one in the same slice if @var{as_slice}=@code{false} or as slice-by-slice if @var{as_slice}=@code{true}. -+@end deftypemethod -+@deftypemethod mglData @code{void} ReadAll (@code{const char *}templ, @code{bool} as_slice=@code{false}) -+Join data arrays from several text files which filenames satisfied the template @var{templ} (for example, @var{templ}=@code{"t_*.dat"}). The data load one-by-one in the same slice if @var{as_slice}=@code{false} or as slice-by-slice if @var{as_slice}=@code{true}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Save (@code{const char *}fname, @code{int} ns=@code{-1}) @code{const} -+Saves the whole data array (for @var{ns}=@code{-1}) or only ns-th slice to text file. If @var{ns}>0 then only @var{ns}-th slice (or column for 2D array) will be saved. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} ReadHDF (@code{const char *}fname, @code{const char *}dname) -+Reads data array named @var{dname} from HDF file. This function does nothing if NO_HDF5 was defined during library compilation. -+@end deftypemethod -+@deftypemethod mglData @code{void} SaveHDF (@code{const char *}fname, @code{const char *}dname, @code{bool} rewrite=@code{false}) @code{const} -+Saves data array named @var{dname} from HDF file. This function does nothing if NO_HDF5 was defined during library compilation. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Import (@code{const char *}fname, @code{const char *}scheme, @code{float} v1=@code{0}, float v2=@code{1}) -+Reads data from bitmap file (now support only PNG format). The RGB values of bitmap pixels are transformed to float values in range [@var{v1}, @var{v2}] using color scheme @var{scheme} (@pxref{Color scheme}). -+@end deftypemethod -+@deftypemethod mglData @code{void} Export (@code{const char *}fname, @code{const char *}scheme, @code{float} v1=@code{0}, float v2=@code{0}, @code{int} ns=@code{-1}) const -+Saves data matrix (or @code{ns}-th slice for 3d data) to bitmap file (now support only PNG format). The data values are transformed from range [@var{v1}, @var{v2}] to RGB pixels of bitmap using color scheme @var{scheme} (@pxref{Color scheme}). If @var{v1}>=@var{v2} then the values of @var{v1}, @var{v2} are automatically determined as minimal and maximal value of the data array. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Make another data, Functions on direction, File I/O, mglData class -+@section Make another data -+@cindex SubData -+@cindex Column -+@cindex SetColumnId -+@cindex Hist -+@cindex Momentum -+@cindex Sum -+@cindex Max -+@cindex Min -+@cindex Combine -+@cindex Evaluate -+@cindex Resize -+@cindex Trace -+ -+@deftypemethod mglData @code{mglData} SubData (@code{int} xx, @code{int} yy=@code{-1}, @code{int} zz=@code{-1}) @code{const} -+Extracts sub-array data from the original data array keeping fixed positive index. For example @code{SubData(-1,2)} extracts 3d row (indexes are zero based), @code{SubData(4,-1)} extracts 5th column, @code{SubData(-1,-1,3)} extracts 4th slice and so on. The most convenient way is to use this function as initialization of other @code{mglData} variable like @code{mglData a1(a.SubData(-1,-1,3))}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{mglData} SubData (@code{const mglData &}xx, @code{const mglData &}yy, @code{const mglData &}zz) @code{const} -+Extracts sub-array data from the original data array for indexes specified by arrays @var{xx}, @var{yy}, @var{zz} (indirect access). The resulting array have the same dimensions as input arrays for 2D and 3D arguments. This function work like previous one for 1D arguments (or numbers). The dimensions of all argument must be the same if they are 2D or 3D arrays. -+@end deftypemethod -+ -+@deftypemethod mglData @code{mglData} Column (@code{const char *}eq) @code{const} -+Get column (or slice) of the data filled by formula @var{eq} of other named columns. For example, @code{Column("n*w^2/exp(t)");}. The column ids must be defined first by @code{SetColumnId()} function. -+@end deftypemethod -+@deftypemethod mglData @code{void} SetColumnId (@code{const char *}ids) -+Set the symbol id for data columns. The string must contain one symbol 'a'...'z' per column (without spaces). -+@end deftypemethod -+ -+@deftypemethod mglData @code{mglData} Trace () @code{const} -+Gets array of diagonal elements a[i,i] (for 2D case) or a[i,i,i] (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1. -+@end deftypemethod -+ -+@deftypemethod mglData @code{mglData} Hist (@code{int} n, @code{float} v1=@code{0}, @code{float} v2=@code{1}, @code{int} nsub=@code{0}) @code{const} -+Creates @var{n}-th points distribution of the data values in range [@var{v1}, @var{v2}]. Parameter @var{nsub} define the number of additional interpolated points (for smoothness of histogram). -+@end deftypemethod -+@deftypemethod mglData @code{mglData} Hist (@code{const mglData &}w, @code{int} n, @code{float} v1=@code{0}, @code{float} v2=@code{1}, @code{int} nsub=@code{0}) @code{const} -+Creates @var{n}-th points distribution of the data values in range [@var{v1}, @var{v2}]. Array @var{w} specifies weights of the data elements. Parameter @var{nsub} define the number of additional interpolated points (for smoothness of histogram). -+@end deftypemethod -+@deftypemethod mglData @code{mglData} Momentum (@code{char} dir, @code{const char *}how) @code{const} -+Get momentum (1D-array) of the data along direction @var{dir}. String @var{how} contain kind of momentum. The momentum is defined like as -+@iftex -+@math{res_k = \sum_{ij} how(x_i,y_j,z_k) a_{ij}/\sum_{ij} a_{ij}} -+@end iftex -+@ifnottex -+res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij -+@end ifnottex -+if @var{var}=@samp{z} and so on. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in range [0,1]. -+@end deftypemethod -+ -+@deftypemethod mglData @code{mglData} Sum (@code{const char *}dir) @code{const} -+Gets array which is the result of summation in given direction or direction(s). -+@end deftypemethod -+@deftypemethod mglData @code{mglData} Max (@code{const char *}dir) @code{const} -+Gets array which is the maximal data values in given direction or direction(s). -+@end deftypemethod -+@deftypemethod mglData @code{mglData} Min (@code{const char *}dir) @code{const} -+Gets array which is the maximal data values in given direction or direction(s). -+@end deftypemethod -+ -+@deftypemethod mglData @code{mglData} Combine (@code{const mglData &}a) @code{const} -+Return direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on). -+@end deftypemethod -+@deftypemethod mglData @code{mglData} Evaluate (@code{const mglData &}idat, @code{bool} norm=@code{true}) @code{const} -+@deftypemethodx mglData @code{mglData} Evaluate (@code{const mglData &}idat, @code{const mglData &}jdat, @code{bool} norm=@code{true}) @code{const} -+@deftypemethodx mglData @code{mglData} Evaluate (@code{const mglData &}idat, @code{const mglData &}jdat, @code{const mglData &}kdat, @code{bool} norm=@code{true}) @code{const} -+Get array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data @var{idat}, @var{jdat}, @var{kdat}. Coordinates from @var{idat}, @var{jdat}, @var{kdat} are supposed to be normalized in range [0,1] (if @var{norm}=@code{true}) or in range [0,nx], [0,ny], [0,nz] correspondingly. -+@end deftypemethod -+@deftypemethod mglData @code{mglData} Resize (@code{int} mx, @code{int} my=@code{1}, @code{int} mz=@code{1}, @code{float} x1=@code{0}, @code{float} x2=@code{1}, @code{float} y1=@code{0}, @code{float} y2=@code{1}, @code{float} z1=@code{0}, @code{float} z2=@code{1}) @code{const} -+Resizes the data to new size @var{mx}, @var{my}, @var{mz} from box (part) [@var{x1},@var{x2}] x [@var{y1},@var{y2}] x [@var{z1},@var{z2}] of original array. Initially x,y,z coordinates are supposed to be in [0,1]. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Functions on direction, Interpolation, Make another data, mglData class -+@section Functions on direction -+@cindex CumSum -+@cindex Integral -+@cindex Diff -+@cindex Diff2 -+@cindex Swap -+@cindex Mirror -+@cindex Sew -+@cindex Smooth -+@cindex Envelop -+@cindex Norm -+@cindex NormSl -+ -+These functions change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain @samp{x}, @samp{y} or @samp{z} characters for 1-st, 2-nd and 3-d dimension correspondengly. -+ -+@deftypemethod mglData @code{void} CumSum (@code{const char *}dir) -+Cumulative summation of the data in given direction or directions. -+@end deftypemethod -+@deftypemethod mglData @code{void} Integral (@code{const char *}dir) -+Integrates (like cumulative summation) the data in given direction or directions. -+@end deftypemethod -+@deftypemethod mglData @code{void} Diff (@code{const char *}dir) -+Differentiates the data in given direction or directions. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} Diff (@code{const mglData &}x, @code{const mglData &}y) -+@deftypemethodx mglData @code{void} Diff (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z) -+Differentiates the data specified parametrically in direction @var{x} with @var{y}, @var{z}=constant. Parametrical differentiation uses the formula (for 2D case): @math{da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j)} where @math{a_i=da/di, a_j=da/dj} denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments -- for example, if you have 2D data a(i,j) which depend on coordinates @{x(i,j), y(i,j)@} then usual derivative along @samp{x} will be @code{Diff(x,y);} and usual derivative along @samp{y} will be @code{Diff(y,x);}. -+@end deftypemethod -+ -+ -+@deftypemethod mglData @code{void} Diff2 (@code{const char *}dir) -+Double-differentiates (like Laplace operator) the data in given direction. -+@end deftypemethod -+@deftypemethod mglData @code{void} Swap (@code{const char *}dir) -+Swaps the left and right part of the data in given direction (useful for Fourier spectrum). -+@end deftypemethod -+@deftypemethod mglData @code{void} Mirror (@code{const char *}dir) -+Mirror the left-to-right part of the data in given direction. Looks like change the value index @var{i}->@var{n-i}. -+@end deftypemethod -+@deftypemethod mglData @code{void} Sew (@code{const char *}dir, @code{float} da=@code{2*M_PI}) -+Remove value steps (like phase jumps after inverse trigonometric functions) with period @var{da} in given direction. -+@end deftypemethod -+@deftypemethod mglData @code{void} Smooth (@code{int} Type, @code{const char *}dir, @code{float} delta=@code{0}) -+Smooths the data on specified direction or directions by method @var{Type}. Now 4 methods are supported: @code{SMOOTH_NONE} does nothing for @var{delta}=0 or approaches data to zero with the step @var{delta}, @code{SMOOTH_LINE_3} linear averaging by 3 points, @code{SMOOTH_LINE_5} linear averaging by 5 points, @code{SMOOTH_QUAD_5} quadratic averaging by 5 points. Parameter @var{delta} forbids to change values of array more than @var{delta} from the original ones. String @var{dirs} specifies the dimensions which will be smoothed. It may contain characters: 'x' for 1st dimension, 'y' for 2nd dimension, 'z' for 3d dimension. -+@end deftypemethod -+@deftypemethod mglData @code{void} Smooth (@code{const char *}dir) -+Smooths the data on specified direction(s). This is the same as @code{Smooth()} but argument @var{Type} is specified in string as @samp{0} for @code{SMOOTH_NONE}, @samp{3} for @code{SMOOTH_LINE_3}, @samp{5} for @code{SMOOTH_LINE_5}. If string @var{dir} don't contain digits @samp{035} then @var{Type}=@code{SMOOTH_QUAD_5} is used. -+@end deftypemethod -+@deftypemethod mglData @code{void} Envelop (@code{char} dir=@code{'x'}) -+Find envelop for data values along direction @var{dir}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{void} NormSl (@code{float} v1=@code{0}, @code{float} v2=@code{1}, @code{char} dir=@code{'z'}, @code{bool} keep_en=@code{true}, @code{bool} sym=@code{false}) -+Normalizes data slice-by-slice along direction @var{dir} the data in slices to range [@var{v1},@var{v2}]. If flag @var{sym}=@code{true} then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. If @var{keep_en} is set then maximal value of k-th slice will be limited by -+@iftex -+@math{\sqrt{\sum a_{ij}(k)/\sum a_{ij}(0)}}. -+@end iftex -+@ifnottex -+@math{\sqrt@{\sum a_ij(k)/\sum a_ij(0)@}}. -+@end ifnottex -+@end deftypemethod -+@deftypemethod mglData @code{void} Norm (@code{float} v1=@code{0}, @code{float} v2=@code{1}, @code{bool} sym=@code{false}, @code{int} dim=@code{0}) -+Normalizes the data to range [@var{v1},@var{v2}]. If flag @var{sym}=@code{true} then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. Modification will be applied only for slices >=@var{dim}. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Interpolation, Informational functions, Functions on direction, mglData class -+@section Interpolation -+@cindex Spline -+@cindex Spline1 -+@cindex Linear -+@cindex Linear1 -+@cindex Spline5 -+@cindex v -+ -+@deftypemethod mglData @code{float} Spline (@code{float} x, @code{float} y=@code{0}, @code{float} z=@code{0}) @code{const} -+Interpolates data by cubic spline to the given point @var{x} in [0...nx-1], @var{y} in [0...ny-1], @var{z} in [0...nz-1]. -+@end deftypemethod -+@deftypemethod mglData @code{float} Spline1 (@code{float} x, @code{float} y=@code{0}, @code{float} z=@code{0}) @code{const} -+Interpolates data by cubic spline to the given point @var{x}, @var{y}, @var{z} which assumed to be normalized in range [0, 1]. -+@end deftypemethod -+@deftypemethod mglData @code{float} Linear (@code{float} x, @code{float} y=@code{0}, @code{float} z=@code{0}) @code{const} -+Interpolates data by linear function to the given point @var{x} in [0...nx-1], @var{y} in [0...ny-1], @var{z} in [0...nz-1]. -+@end deftypemethod -+@deftypemethod mglData @code{float} Linear1 (@code{float} x, @code{float} y=@code{0}, @code{float} z=@code{0}) @code{const} -+Interpolates data by linear function to the given point @var{x}, @var{y}, @var{z} which assumed to be normalized in range [0, 1]. -+@end deftypemethod -+@deftypemethod mglData @code{float} v (@code{int} i, @code{int} j=@code{0}, @code{int} k=@code{0}) @code{const} -+Gets the value in specified cell of the data with border checking. -+@end deftypemethod -+@deftypemethod mglData @code{float} Spline5 (@code{float} x, @code{float} y, @code{float} z, @code{float} &dx, @code{float} &dy, @code{float} &dz) @code{const} -+Interpolate by 5-th order splain the data to given point @var{x}, @var{y}, @var{z} which normalized in range [0, 1] and evaluate its derivatives. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Informational functions, Operators, Interpolation, mglData class -+@section Informational functions -+@cindex PrintInfo -+@cindex Maximal -+@cindex Minimal -+@cindex Momentum -+@cindex Find -+@cindex Last -+@cindex FindAny -+ -+@deftypemethod mglData @code{void} PrintInfo (@code{char *}buf, @code{bool} all=@code{false}) @code{const} -+Print information about the data (sizes and momentum) to string @var{buf}. Parameter @var{all} set to print most of information (if @code{true}) or just basic one like dimensions, maximal an minimal values. -+@end deftypemethod -+@deftypemethod mglData @code{void} PrintInfo (@code{FILE *}fp) @code{const} -+Print information about the data (sizes and momentum) to FILE (for example, stdout) -+@end deftypemethod -+ -+@deftypemethod mglData @code{float} Maximal () @code{const} -+Gets maximal value of the data. -+@end deftypemethod -+@deftypemethod mglData @code{float} Minimal () @code{const} -+Gets minimal value of the data. -+@end deftypemethod -+ -+@deftypemethod mglData @code{float} Maximal (@code{int} &i, @code{int} &j, @code{int} &k) @code{const} -+Gets maximal value of the data and its position in the array to variables @var{i}, @var{j}, @var{k}. -+@end deftypemethod -+@deftypemethod mglData @code{float} Minimal (@code{int} &i, @code{int} &j, @code{int} &k) @code{const} -+Gets minimal value of the data and its position in the array to variables @var{i}, @var{j}, @var{k}. -+@end deftypemethod -+@deftypemethod mglData @code{float} Maximal (@code{float} &i, @code{float} &j, @code{float} &k) @code{const} -+Gets maximal value of the data and its approximated (interpolated) position to variables @var{i}, @var{j}, @var{k}. -+@end deftypemethod -+@deftypemethod mglData @code{float} Minimal (@code{float} &i, @code{float} &j, @code{float} &k) @code{const} -+Gets minimal value of the data and its approximated (interpolated) position to variables @var{i}, @var{j}, @var{k}. -+@end deftypemethod -+ -+@deftypemethod mglData @code{float} Momentum (@code{char} dir, @code{float} &m, @code{float} &w) @code{const} -+Gets zero-momentum (energy, @math{I=\sum a_i}) and write first momentum (median, @math{m = \sum \xi_i a_i/I}) and second momentum (width, @math{w^2 = \sum (\xi_i-m)^2 a_i/I}) to variables. Here @math{\xi} is corresponding coordinate if @var{dir} is @samp{'x'}, @samp{'y'} or @samp{'z'}. Otherwise median is @math{m = \sum a_i/N}, width is @math{w^2 = \sum (a_i-m)^2/N}. -+@end deftypemethod -+@deftypemethod mglData @code{float} Momentum (@code{char} dir, @code{float} &m, @code{float} &w, @code{float} &s, @code{float} &k) @code{const} -+Gets zero-momentum (energy, @math{I=\sum a_i}) and write first momentum (median, @math{m = \sum \xi_i a_i/I}), second momentum (width, @math{w^2 = \sum (\xi_i-m)^2 a_i/I}, third momentum (skewness, @math{s = \sum (\xi_i-m)^3 a_i/ I w^3}) and fourth momentum (kurtosis, @math{k = \sum (\xi_i-m)^4 a_i / 3 I w^4})) to variables. Here @math{\xi} is corresponding coordinate if @var{dir} is @samp{'x'}, @samp{'y'} or @samp{'z'}. Otherwise median is @math{m = \sum a_i/N}, width is @math{w^2 = \sum (a_i-m)^2/N} and so on. -+@end deftypemethod -+ -+@deftypemethod mglData @code{float} Find (@code{const char *}cond, @code{int} &i, @code{int} &j, @code{int} &k) @code{const} -+Find position (after specified in @var{i}, @var{j}, @var{k}) of first nonzero value of formula @var{cond}. Function return the data value at found position. -+@end deftypemethod -+@deftypemethod mglData @code{float} Last (@code{const char *}cond, @code{int} &i, @code{int} &j, @code{int} &k) @code{const} -+Find position (before specified in @var{i}, @var{j}, @var{k}) of last nonzero value of formula @var{cond}. Function return the data value at found position. -+@end deftypemethod -+@deftypemethod mglData @code{int} Find (@code{const char *}cond, @code{char} dir, @code{int} i=@code{0}, @code{int} j=@code{0}, @code{int} k=@code{0}) @code{const} -+Return position of first in direction @var{dir} nonzero value of formula @var{cond}. The search is started from point @{i,j,k@}. -+@end deftypemethod -+@deftypemethod mglData @code{bool} FindAny (@code{const char *}cond) @code{const} -+Determines if any nonzero value of formula in the data array. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node Operators, Global functions, Informational functions, mglData class -+@section Operators -+ -+@deftypemethod mglData @code{void} operator= (@code{const mglData &}d) -+Copies data from other variable. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator*= (@code{const mglData &}d) -+Multiplies the data by the other one for each element. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator/= (@code{const mglData &}d) -+Divides the data by the other one for each element. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator+= (@code{const mglData &}d) -+Adds the other data. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator-= (@code{const mglData &}d) -+Subtracts the other data. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator*= (@code{float} d) -+Multiplies each element by the number. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator/= (@code{float} d) -+Divides each element by the number. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator+= (@code{float} d) -+Adds the number to each element. -+@end deftypemethod -+@deftypemethod mglData @code{void} operator-= (@code{float} d) -+Subtracts the number to each element. -+@end deftypemethod -+ -+ -+@deftypefn {Library Function} mglData operator+ (@code{const mglData &}a, @code{const mglData &}b) -+Adds the other data. -+@end deftypefn -+@deftypefn {Library Function} mglData operator+ (@code{float} a, @code{const mglData &}b) -+Adds the number. -+@end deftypefn -+@deftypefn {Library Function} mglData operator+ (@code{const mglData &}a, @code{float} b) -+Adds the number. -+@end deftypefn -+ -+@deftypefn {Library Function} mglData operator- (@code{const mglData &}a, @code{const mglData &}b) -+Subtracts the other data. -+@end deftypefn -+@deftypefn {Library Function} mglData operator- (@code{float} a, @code{const mglData &}b) -+Subtracts from the number. -+@end deftypefn -+@deftypefn {Library Function} mglData operator- (@code{const mglData &}a, @code{float} b) -+Subtracts the number. -+@end deftypefn -+ -+@deftypefn {Library Function} mglData operator* (@code{const mglData &}a, @code{const mglData &}b) -+Multiplies by the other data. -+@end deftypefn -+@deftypefn {Library Function} mglData operator* (@code{float} a, @code{const mglData &}b) -+Multiplies by the number. -+@end deftypefn -+@deftypefn {Library Function} mglData operator* (@code{const mglData &}a, @code{float} b) -+Multiplies by the number. -+@end deftypefn -+ -+@deftypefn {Library Function} mglData operator/ (@code{const mglData &}a, @code{const mglData &}b) -+Divides by the other data. -+@end deftypefn -+@deftypefn {Library Function} mglData operator/ (@code{const mglData &}a, @code{float} b) -+Divides by the number. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node Global functions, , Operators, mglData class -+@section Global functions -+ -+These functions are not methods of @code{mglData} class. However it have additional functionality to handle data. So I put it in this chapter. -+ -+@deftypefn {Global function} @code{mglData} mglTransform (@code{const mglData &}real, @code{const mglData &}imag, @code{const char *}type) -+Do integral transformation of complex data @var{real}, @var{imag} on specified direction. Now only Fourier transformation is supported. The order of transformations is specified in string @var{type}: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: @samp{f} is forward Fourier transformation, @samp{i} is inverse Fourier transformation, @samp{n} or @samp{ } is no transformation. -+@end deftypefn -+ -+@deftypefn {Global function} @code{mglData} mglTransformA @code{const mglData &}ampl, @code{const mglData &}phase, @code{const char *}type) -+Do integral transformation of complex data @var{ampl}, @var{phase} on specified direction. Now only Fourier transformation is supported. The order of transformations is specified in string @var{type}: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: @samp{f} is forward Fourier transformation, @samp{i} is inverse Fourier transformation, @samp{n} or @samp{ } is no transformation. -+@end deftypefn -+ -+@deftypefn {Global function} @code{mglData} mglSTFA (@code{const mglData &}real, @code{const mglData &}imag, @code{int dn, }@code{char} dir=@code{'x'}) -+Short time Fourier analysis for real and imaginary parts. Output is amplitude of partial Fourier of length @var{dn}. For example if @var{dir}=@samp{x}, result will have size @{int(nx/dn), dn, ny@} and it will contain @math{res[i,j,k]=|\sum_d^dn exp(I*j*d)*(real[i*dn+d,k]+I*imag[i*dn+d,k])|/dn}. -+@end deftypefn -+ -+@deftypefn {Global function} @code{mglData} mglPDE (@code{const char *}ham, @code{const mglData &}ini_re, @code{const mglData &}ini_im, @code{mglPoint} Min, @code{mglPoint} Max, @code{float} dz=@code{0.1}, @code{float} k0=@code{100}) -+Solves equation du/dz = i*k0*@var{ham}(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters @var{ini_re}, @var{ini_im} specify real and imaginary part of initial field distribution. Parameters @var{Min}, @var{Max} set the bounding box for the solution. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter @var{dz} set the step along evolutionary coordinate z. At this moment, simplified form of function @var{ham} is supported -- all ``mixed'' terms (like @samp{x*p}->x*d/dx) are excluded. For example, in 2D case this function is effectively @math{ham = f(p,z) + g(x,z,u)}. However commutable combinations (like @samp{x*q}->x*d/dy) are allowed. Here variable @samp{u} is used for field amplitude |u|. This allow one solve nonlinear problems -- for example, for nonlinear Shrodinger equation you may set @code{ham="p^2 + q^2 - u^2"}. You may specify imaginary part for wave absorption, like @code{ham = "p^2 + i*x*(x>0)"}, but only if dependence on variable @samp{i} is linear (i.e. @math{ham = hre+i*him}). @sref{PDE sample} -+@end deftypefn -+ -+@deftypefn {Global function} @code{mglData} mglRay (@code{const char *}ham, @code{mglPoint} r0, @code{mglPoint} p0, @code{float} dt=@code{0.1}, @code{float} tmax=@code{10}) -+Solves GO ray equation like dr/dt = d @var{ham}/dp, dp/dt = -d @var{ham}/dr. This is Hamiltonian equations for particle trajectory in 3D case. Here @var{ham} is Hamiltonian which may depend on coordinates @samp{x}, @samp{y}, @samp{z}, momentums @samp{p}=px, @samp{q}=py, @samp{v}=pz and time @samp{t}: @math{ham = H(x,y,z,p,q,v,t)}. The starting point (at @code{t=0}) is defined by variables @var{r0}, @var{p0}. Parameters @var{dt} and @var{tmax} specify the integration step and maximal time for ray tracing. Result is array of @{x,y,z,p,q,v,t@} with dimensions @{7 * int(@var{tmax}/@var{dt}+1) @}. -+@end deftypefn -+ -+@deftypefn {Global function} @code{mglData} mglQO2d (@code{const char *}ham, @code{const mglData &}ini_re, @code{const mglData &}ini_im, @code{const mglData &}ray, @code{float} r=@code{1}, @code{float} k0=@code{100}, @code{mglData *}xx=@code{0}, @code{mglData *}yy=@code{0}, @code{bool} UseR=@code{true}) -+Solves equation du/dt = i*k0*@var{ham}(p,q,x,y,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators (see @code{mglPDE()} for details). Parameters @var{ini_re}, @var{ini_im} specify real and imaginary part of initial field distribution. Parameters @var{ray} set the reference ray, i.e. the ray around which the accompanied coordinate system will be maked. You may use, for example, the array created by @code{mglRay()} function. Note, that the reference ray @strong{must be} smooth enough to make accompanied coodrinates unambiguity. Otherwise errors in the solution may appear. If @var{xx} and @var{yy} are non-zero then Cartesian coordinates for each point will be written into them. @sref{Beam tracing sample} -+@end deftypefn -+ -+@deftypefn {Global function} @code{mglData} mglJacobian (@code{const mglData &}x, @code{const mglData &}y) -+@deftypefnx {Global function} @code{mglData} mglJacobian (@code{const mglData &}x, @code{const mglData &}y, @code{const mglData &}z) -+Computates the Jacobian for transformation @{i,j,k@} to @{@var{x},@var{y},@var{z}@} where initial coordinates @{i,j,k@} are data indexes normalized in range [0,1]. The Jacobian is determined by formula det||@math{dr_\alpha/d\xi_\beta}|| where @math{r}=@{@var{x},@var{y},@var{z}@} and @math{\xi}=@{i,j,k@}. All dimensions must be the same for all data arrays. Data must be 3D if all 3 arrays @{@var{x},@var{y},@var{z}@} are specified or 2D if only 2 arrays @{@var{x},@var{y}@} are specified. -+@end deftypefn -+ ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/appendix.texi -@@ -0,0 +1,17 @@ -+The full list of TeX-like commands recognizable by MathGL is shown below. If command is not recognized then it will be printed as is by ommitting @samp{\} symbol. For example, @samp{\#} produce ``#'', @samp{\\} produce ``\'', @samp{\qq} produce ``qq''. -+@c All commands are typed without @samp{\} sign. -+ -+@strong{Change case}: _, ^, @@. -+ -+@strong{Text style}: \big, \b, \textbf, \i, \textit, \bi, \r, \textrm, \a, \overline, \u, \underline, \w, \wire, #, \color[wkrgbcymhRGBCYMHWlenupqLENUPQ] -+ -+@strong{Roots}: \sqrt, \sqrt3, \sqrt4 -+ -+@strong{Fractions}: \frac, \stack, \overset, \underset, \stackr, \stackl -+ -+@strong{Accents}: \hat, \tilde, \dot, \ddot, \dddot, \ddddot, \acute, \check, \grave, \vec, \bar, \breve -+ -+@strong{Special symbols}: \textquotedbl, \textdollar, \And, \textasciigrave, \textsubw, \colon, \less, \greater, \lbrack, \backslash, \rbrack, \textasciicircum, \lbrace, \vert, \rbrace, \textasciitilde, \aa, \ae, \textexclamdown, \textcent, \sterling, \textcurrency, \yen, \textbrokenbar, \S, \textasciidieresis, \textcopyright, \textordfeminine, \guillemotleft, \neg, \textregistered, \textasciimacron, \textdegree, \pm, \texttwosuperior, \textthreesuperior, \textasciiacute, \textmu, \P, \cdotp, \textonesuperior, \textordmasculine, \guillemotright, \textonequarter, \textonehalf, \textthreequarters, \textquestiondown, \AA, \AE, \DH, \times, \O, \TH, \ss, \dh, \div, \o, \th, \DJ, \dj, \textcrh, \L, \l, \OE, \oe, \NG, \ng, \textcrb, \texthtc, \textflorin, \texthvlig, \texthtk, \textctd, \textctl, \textctn, \textctt, \textdotlessj, \textbarl, \textcrlambda, \lambdabar, \Ohorn, \ohorn, \texthtp, \textlooptoprevesh, \textlhookt, \texthtt, \Uhorn, \uhorn, \Zbar, \textbenttailyogh, \textcrtwo, \textcrinvglotstop, \textpipe, \textdoublepipe, \textdoublebarpipe, \textexclam, \textturna, \textscripta, \textturnscripta, \texthtb, \textopeno, \textctc, \textrtaild, \texthtd, \textreve, \textschwa, \texthtg, \textscriptg, \textscg, \textgamma, \textramshorns, \textturnh, \texthth, \texththeng, \textbari, \textiota, \textturnmrleg, \textltailm, \textltailn, \textrtailn, \textscn, \textbaro, \textscoelig, \textcloseomega, \textphi, \textturnr, \textscr, \textinvscr, \textrtails, \textesh, \textbardotlessjvar, \textvibyi, \textctesh, \textturnt, \textrtailt, \textbaru, \textrtailz, \textctz, \textyogh, \textctyogh, \textglotstop, \textrevglotstop, \textinvglotstop, \textstretchcvar, \textbullseye, \textscb, \textrhookschwa, \textepsilon, \textrevepsilon, \textrhookrevepsilon, \textcloserevepsilon, \textbardotlessj, \textsci, \textltilde, \textbeltl, \textrtaill, \textlyoghlig, \textturnm, \textturnlonglegr, \textturnrrtail, \textlonglegr, \textrtailr, \textfishhookr, \textlhti, \textupsilon, \textscriptv, \textturnv, \textturnw, \textturny, \textscy, \textcloseepsilon, \texthtscg, \textsch, \textctj, \textturnk, \textscl, \texthtq, \textbarglotstop, \textbarrevglotstop, \textdzlig, \textdyoghlig, \textdctzlig, \texttslig, \texttctctlig, \texttctctlig, \textlongy, \textlongy, \ipasupgamma, \ipasupl, \ipasups, \ipasupx, \ipasuprerglotstpp, \tonebarextrahigh, \tonebarhigh, \tonebarmid, \tonebarlow, \tonebarextralow, \textsuph, \textsuphth, \textsupj, \textsupr, \textsupturnr, \textsupturnrrtail, \textsupinvscr, \textsupw, \textsupy, \cprime, \cdprime, \textturncomma, \rasp, \lasp, \texthamza, \textain, \textraiseglotstop, \textraiserevglotstop, \textlptr, \textrptr, \textuptr, \textdptr, \$\wedge$, \v, \textprimstress, \textmacron, \textacute, \textgrave, \textsecstress, \textlowmacron, \textlowgrave, \textlowacute, \textlengthmark, \texthalflength, \textrhalfring, \textlhalfring, \textraised, \textlowered, \textadvanced, \textretracted, \textbreve, \textdotaccent, \textringaccent, \textogonek, \textsmalltilde, \textdoubleacute, \textrhoticity, \textovercross, \ipavoicing, \ipaunaspirated, \sampi, \Alpha, \Beta, \Gamma, \Delta, \Epsilon, \Zeta, \Eta, \Theta, \Iota, \Kappa, \Lambda, \Mu, \Nu, \Xi, \Omicron, \Pi, \Rho, \Sigma, \Tau, \textsilon, \Phi, \Chi, \Psi, \Omega, \alpha, \beta, \gamma, \delta, \varepsilon, \zeta, \eta, \theta, \iota, \kappa, \lambda, \mu, \nu, \xi, \omicron, \pi, \rho, \varsigma, \sigma, \tau, \silon, \varphi, \chi, \psi, \omega, \varbeta, \vartheta, \silon, \phi, \varpi, \oldKoppa, \oldkoppa, \Stigma, \stigma, \Digamma, \digamma, \Koppa, \koppa, \varkappa, \varrho, \varTheta, \epsilon, \backepsilon, \textsca, \textsce, \textscu, \textlhookd, \textlhookk, \textlhookl, \texthooks, \testhookx, \texthookz, \texthyphen, \nobreakhyphen, \figdash, \endash, \emdash, \horizbar, \Vert, \twolowline, \lq, \rq, \dagger, \dag, \ddagger, \ddag, \textbullet, \enleadertwodots, \dots, \textperthousand, \textpertenthousand, \textprime, \prime, \textdprime, \dprime, \texttrprime, \trprime, \textbackprime, \backprime, \textbackdprime, \backdprime, \textbacktrprime, \backtrprime, \caretinsert, \guilsinglleft, \tieconcat, \hyphenbullet, \fracslash, \Question, \closure, \textAsterisks, \textdiscount, \textqprime, \qprime, \quotsinglbase, \quotsinglright, \textquotedblleft, \textquotedblright, \quotdblbase, \quotdblright, \guilsinglright, \textreferencemark, \Exclam, \overline, \textasterisklow, \textsemicolonreversed, \medmathspace, \supn, \textfranc, \textlira, \textpesetas, \euro, \BbbC, \incare, \Eulerconst, \scrI, \Im, \scrL, \ell, \BbbN, \textnumero, \textcircledP, \wp, \BbbP, \texttrademark, \BbbZ, \textoz, \textohm, \mho, \frakZ, \turnediota, \scrE, \scrF, \Finv, \scrM, \scro, \aleph, \beth, \gimel, \daleth, \Bbbsum, \Game, \sansLturned, \sansLmirrored, \Yup, \itBbbD, \itBbbd, \itBbbe, \itBbbi, \itBbbj, \scrg, \scrH, \frakH, \BbbH, \Planckconst, \hslash, \hbar, \BbbQ, \scrR, \Re, \BbbR, \textrecipe, \Angstrom, \scrB, \frakC, \textestimated, \scre, \Bbbpi, \Bbbgamma, \BbbGamma, \BbbPi, \PropertyLine, \upand, \fraconethird, \fractwothirds, \fraconefifth, \fractwofifths, \fracthreefifths, \fracfourfifths, \fraconesixth, \fracfivesixths, \fraconeeighth, \fracthreeeighths, \fracfiveeighths, \fracseveneights, \ldasharrhead, \leftdasharrow, \leftdasharrowhead, \rightdasharrow, \updasharrow, \leftarrow, \gets, \shortleftarrow, \uparrow, \rightarrow, \to, \shortrightarrow, \downarrow, \leftrightarrow, \updownarrow, \nwarrow, \nearrow, \searrow, \swarrow, \downdasharrow, \barleftarrow, \rightarrowbar, \leftwhitearrow, \upwhitearrow, \rightwhitearrow, \downwhitearrow, \nleftarrow, \nrightarrow, \leftsquigarrow, \rightsquigarrow, \leadsto, \twoheadleftarrow, \twoheaduparrow, \twoheadrightarrow, \twoheaddownarrow, \leftarrowtail, \rightarrowtail, \mapsfrom, \mapsup, \mapsto, \mapsdown, \updownarrowbar, \hookleftarrow, \hookrightarrow, \looparrowleft, \looparrowright, \leftrightsquigarrow, \nleftrightarrow, \downzigzagarrow, \Lsh, \Rsh, \Ldsh, \Rdsh, \linefeed, \carriagereturn, \curvearrowleft, \curvearrowright, \barovernorthwestarrow, \barleftarrowrightarrowbar, \acwopencirclearrow, \cwopencirclearrow, \leftharpoonup, \leftharpoondown, \upharpoonright, \upharpoonleft, \rightharpoonup, \rightharpoondown, \downharpoonright, \downharpoonleft, \rightleftarrows, \updownarrows, \leftrightarrows, \leftleftarrows, \upuparrows, \rightrightarrows, \downdownarrows, \leftrightharpoons, \rightleftharpoons, \nLeftarrow, \nLeftrightarrow, \nRightarrow, \Leftarrow, \Uparrow, \Rightarrow, \Downarrow, \Leftrightarrow, \Updownarrow, \Nwarrow, \Nearrow, \Searrow, \Swarrow, \Lleftarrow, \Rrightarrow, \leftsquigarrow, \rightsquigarrow, \nHuparrow, \nHdownarrow, \whitearrowupfrombar, \circleonrightarrow, \downuparrows, \rightthreearrows, \nvleftarrow, \nvrightarrow, \nvleftrightarrow, \nVleftarrow, \nVrightarrow, \nVleftrightarrow, \leftarrowtriangle, \rightarrowtriangle, \leftrightarrowtriangle, \forall, \complement, \partial, \exists, \nexists, \varnothing, \emptyset, \increment, \nabla, \in, \varin, \notin, \smallin, \ni, \owns, \varni, \nni, \smallni, \QED, \prod, \coprod, \amalg, \sum, \minus, \mp, \dotplus, \slash, \smallsetminus, \setminus, \ast, \circ, \bullet, \surd, \sqrt, \sqrt3, \sqrt4, \cuberoot, \fourthroot, \propto, \varpropto, \infty, \rightangle, \angle, \measuredangle, \sphericalangle, \mid, \nmid, \parallel, \nparallel, \wedge, \vee, \cap, \cup, \smallint, \int, \iint, \iiint, \oint, \oiint, \oiiint, \intclockwise, \varointclockwise, \ointctrclockwise, \therefore, \because, \colon, \Colon, \dotminus, \dashcolon, \dotsminusdots, \kernelcontraction, \sim, \thicksim, \backsim, \ac, \sinewave, \wr, \nsim, \eqsim, \simeq, \nsime, \cong, \simneqq, \ncong, \approx, \thickapprox, \napprox, \approxeq, \approxident, \backcong, \asymp, \Bumpeq, \bumpeq, \doteq, \Doteq, \fallingdotseq, \risingdotseq, \coloneq, \eqcolon, \eqcirc, \circeq, \arceq, \wedgeq, \veeeq, \stareq, \triangleq, \eqdef, \measeq, \questeq, \ne, \neq, \equiv, \nequiv, \Equiv, \leq, \le, \geq, \ge, \leqq, \geqq, \lneqq, \gneqq, \ll, \gg, \between, \nasymp, \nless, \ngtr, \nleq, \ngeq, \lesssim, \gtrsim, \nlesssim, \ngtrsim, \lessgtr, \gtrless, \nlessgtr, \ngtrless, \prec, \succ, \preccurlyeq, \succcurlyeq, \precsim, \succsim, \nprec, \nsucc, \subset, \supset, \nsubset, \nsupset, \subseteq, \supseteq, \nsubseteq, \nsupseteq, \subsetneq, \supsetneq, \cupleftarrow, \cupdot, \uplus, \sqsubset, \sqsupset, \sqsubseteq, \sqsupseteq, \sqcap, \sqcup, \oplus, \ominus, \otimes, \oslash, \odot, \circledcirc, \circledast, \circledequal, \circleddash, \boxplus, \boxminus, \boxtimes, \boxdot, \vdash, \dashv, \top, \bot, \assert, \models, \vDash, \Vdash, \Vvdash, \VDash, \nvdash, \nvDash, \nVdash, \nVDash, \prurel, \scurel, \vartriangleleft, \lhd, \vartriangleright, \rhd, \trianglelefteq, \unlhd, \trianglerighteq, \unrhd, \origof, \imageof, \multimap, \hermitmatrix, \intercal, \veebar, \barwedge, \barvee, \measuredrightangle, \varlrtriangle, \bigwedge, \bigvee, \bigcap, \bigcup, \smalldiamond, \cdot, \star, \divideontimes, \bowtie, \ltimes, \rtimes, \leftthreetimes, \rightthreetimes, \backsimeq, \curlyvee, \curlywedge, \Subset, \Supset, \Cap, \Cup, \pitchfork, \equalparallel, \lessdot, \gtrdot, \lll, \ggg, \lesseqgtr, \gtreqless, \eqless, \eqgtr, \curlyeqprec, \curlyeqsucc, \npreccurlyeq, \nsucccurlyeq, \nsqsubseteq, \nsqsupseteq, \sqsubsetneq, \sqsupsetneq, \lnsim, \gnsim, \precnsim, \succnsim, \ntriangleleft, \ntriangleright, \ntrianglelefteq, \ntrianglerighteq, \vdots, \cdots, \adots, \ddots, \disin, \varisins, \isins, \isindot, \varisinobar, \isinobar, \isinvb, \isinE, \nisd, \varnis, \nis, \varniobar, \niobar, \bagmember, \diameter, \house, \varbarwedge, \vardoublebarwedge, \lceil, \rceil, \lfloor, \rfloor, \drcrop, \dlcrop, \urcrop, \ulcrop, \invnot, \sqlozenge, \profline, \profsurf, \recorder, \target, \viewdata, \cloverleaf, \turnednot, \watchicon, \ulcorner, \urcorner, \llcorner, \lrcorner, \inttop, \intbottom, \frown, \smile, \clangle, \crangle, \varhexagonlrbonds, \cylcty, \profalar, \conictaper, \topbot, \obar, \APLnotslash, \APLnotbackslash, \APLboxupcaret, \APLboxquestion, \rangledownzigzagarrow, \dircurrent, \hexagon, \lparenuend, \lparenextender, \lparenlend, \rparenuend, \rparenextender, \rparenlend, \lbrackuend, \lbrackextender, \lbracklend, \rbrackuend, \rbrackextender, \rbracklend, \lbraceuend, \lbracemid, \lbracelend, \vbraceextender, \rbraceuend, \rbracemid, \rbracelend, \intextender, \harrowextender, \lmoustache, \rmoustache, \sumtop, \sumbottom, \overbracket, \underbracket, \bbrktbrk, \sqrtbottom, \lvboxline, \rvboxline, \carreturn, \varrowextender, \overparen, \underparen, \overbrace, \underbrace, \obrbrak, \ubrbrak, \trapezium, \benzenr, \strns, \fltns, \accurrent, \elinters, \textvisiblespace, \circledone, \circledtwo, \circledthree, \circledfour, \circledfive, \circledsix, \circledseven, \circledeight, \circlednine, \circledA, \circledB, \circledC, \circledD, \circledE, \circledF, \circledG, \circledH, \circledI, \circledJ, \circledK, \circledL, \circledM, \circledN, \circledO, \circledP, \circledQ, \circledR, \circledS, \circledT, \circledU, \circledV, \circledW, \circledX, \circledY, \circledZ, \circleda, \circledb, \circledc, \circledd, \circlede, \circledf, \circledg, \circledh, \circledi, \circledj, \circledk, \circledl, \circledm, \circledn, \circledo, \circledp, \circledq, \circledr, \circleds, \circledt, \circledu, \circledv, \circledw, \circledx, \circledy, \circledz, \circledzero, \bdhrule, \bdvrule, \bdtriplevdash, \bdquadhdash, \bdquadvdash, \bddvrh, \bddvlh, \bduvrh, \bduvlh, \bdbvrh, \bdbvlh, \bddvbh, \bduvbh, \bdbvbh, \bdHrule, \bdVrule, \bddvrH, \bddVrh, \bddVrH, \bddvlH, \bddVlh, \bddVlH, \bduvrH, \bduVrh, \bduVrH, \bduvlH, \bduVlh, \bduVlH, \bdbvrH, \bdbVrh, \bdbVrH, \bdbvlH, \bdbVlh, \bdbVlH, \bddvbH, \bddVbh, \bddVbH, \bduvbH, \bduVbh, \bduVbH, \bdbvbH, \bdbVbh, \bdbVbH, \bdnesw, \bdnwse, \blockuphalf, \blocklowhalf, \blockfull, \blocklefthalf, \blockrighthalf, \blockqtrshaded, \blockhalfshaded, \blockthreeqtrshaded, \mdlgblksquare, \mdlgwhtsquare, \squoval, \blackinwhitesquare, \squarehfill, \squarevfill, \squarehvfill, \squarenwsefill, \squareneswfill, \squarecrossfill, \squaregrayfill, \smblksquare, \smwhtsquare, \hrectangleblack, \hrectangle, \vrectangleblack, \vrectangle, \parallelogramblack, \parallelogram, \bigblacktriangleup, \bigtriangleup, \blacktriangle, \vartriangle, \blacktriangleright, \triangleright, \smallblacktriangleright, \smalltriangleright, \blackpointerright, \whitepointerright, \bigblacktriangledown, \bigtriangledown, \blacktriangledown, \triangledown, \blacktriangleleft, \triangleleft, \smallblacktriangleleft, \smalltriangleleft, \blackpointerleft, \whitepointerleft, \mdlgblkdiamond, \mdlgwhtdiamond, \diamond, \blackinwhitediamond, \fisheye, \lozenge, \mdlgwhtcircle, \dottedcircle, \circlevertfill, \bullseye, \mdlgblkcircle, \circlelefthalfblack, \circlerighthalfblack, \circlebottomhalfblack, \circletophalfblack, \circleurquadblack, \blackcircleulquadwhite, \blacklefthalfcircle, \blackrighthalfcircle, \inversebullet, \inversewhitecircle, \invwhiteupperhalfcircle, \invwhitelowerhalfcircle, \ularc, \urarc, \lrarc, \llarc, \topsemicircle, \botsemicircle, \lrblacktriangle, \llblacktriangle, \ulblacktriangle, \urblacktriangle, \smwhtcircle, \squareleftblack, \squareleftblack, \squareulblack, \squarelrblack, \boxbar, \trianglecdot, \triangleleftblack, \trianglerightblack, \lgwhtcircle, \squareulquad, \squarellquad, \squarelrquad, \squareurquad, \circleulquad, \circlellquad, \circlelrquad, \circleurquad, \ultriangle, \urtriangle, \lltriangle, \mdwhtsquare, \box, \mdblksquare, \mdsmwhtsquare, \mdsmblksquare, \lrtriangle, \bigstar, \bigwhitestar, \astrosun, \conjunction, \phone, \XBox, \danger, \frownie, \smiley, \blacksmiley, \sun, \rightmoon, \leftmoon, \mercury, \female, \earth, \male, \jupiter, \saturn, \neptune, \pluto, \aries, \taurus, \spadesuit, \heartsuit, \diamondsuit, \clubsuit, \varspadesuit, \varheartsuit, \vardiamondsuit, \varclubsuit, \quarternote, \eighthnote, \twonotes, \flat, \natural, \sharp, \acidfree, \dicei, \diceii, \diceiii, \diceiv, \dicev, \dicevi, \circledrightdot, \circledtwodots, \blackcircledrightdot, \blackcircledtwodots, \triangleexclam, \Hermaphrodite, \mdwhtcircl, \mdblkrcl, \mdsmwhtcircl, \neuter, \scissors, \envelope, \checkmark, \maltese, \circledstar, \varstar, \dingasterisk, \lbrbrak, \rbrbrak, \circledsansone, \circledsanstwo, \circledsansthree, \circledsansfour, \circledsansfive, \circledsanssix, \circledsansseven, \circledsanseight, \circledsansnine, \circledsansten, \blackcircledsansone, \blackcircledsanstwo, \blackcircledsansthree, \blackcircledsansfour, \blackcircledsansfive, \blackcircledsanssix, \blackcircledsansseven, \blackcircledsanseight, \blackcircledsansnine, \blackcircledsansten, \draftingarrow, \threedangle, \whiteinwhitetriangle, \perp, \subsetcirc, \supsetcirc, \lbag, \rbag, \veedot, \bsolhsub, \suphsol, \longdivision, \diamondcdot, \wedgedot, \upin, \pullback, \pushout, \leftouterjoin, \rightouterjoin, \fullouterjoin, \bigbot, \bigtop, \DashVDash, \dashVdash, \multimapinv, \vlongdash, \longdashv, \cirbot, \lozengeminus, \concavediamond, \concavediamondtickleft, \concavediamondtickright, \whitesquaretickleft, \whitesquaretickright, \lBrack, \rBrack, \langle, \rangle, \lAngle, \rAngle, \Lbrbrak, \Rbrbrak, \UUparrow, \DDownarrow, \acwgapcirclearrow, \cwgapcirclearrow, \rightarrowonoplus, \longleftarrow, \longrightarrow, \longleftrightarrow, \Longleftarrow, \Longrightarrow, \Longleftrightarrow, \longmapsfrom, \longmapsto, \Longmapsfrom, \Longmapsto, \longrightsquigarrow, \nvtwoheadrightarrow, \nVtwoheadrightarrow, \nvLeftarrow, \nvRightarrow, \nvLeftrightarrow, \twoheadmapsto, \Mapsfrom, \Mapsto, \downarrowbarred, \uparrowbarred, \Uuparrow, \Ddownarrow, \leftbkarrow, \rightbkarrow, \leftdbkarrow, \dbkarow, \drbkarow, \rightdotarrow, \baruparrow, \downarrowbar, \nvrightarrowtail, \nVrightarrowtail, \twoheadrightarrowtail, \nvtwoheadrightarrowtail, \nVtwoheadrightarrowtail, \lefttail, \righttail, \leftdbltail, \rightdbltail, \diamondleftarrow, \rightarrowdiamond, \diamondleftarrowbar, \barrightarrowdiamond, \nwsearrow, \neswarrow, \hknwarrow, \hknearrow, \hksearow, \hkswarow, \tona, \toea, \tosa, \towa, \rdiagovfdiag, \fdiagovrdiag, \seovnearrow, \neovsearrow, \fdiagovnearrow, \rdiagovsearrow, \neovnwarrow, \nwovnearrow, \rightcurvedarrow, \uprightcurvearrow, \downrightcurvedarrow, \leftdowncurvedarrow, \rightdowncurvedarrow, \cwrightarcarrow, \acwleftarcarrow, \acwoverarcarrow, \acwundercurvearrow, \curvearrowrightminus, \curvearrowleftplus, \cwundercurvearrow, \ccwundercurvearrow, \acwcirclearrow, \cwcirclearrow, \rightarrowshortleftarrow, \leftarrowshortrightarrow, \shortrightarrowleftarrow, \rightarrowplus, \leftarrowplus, \rightarrowx, \leftrightarrowcircle, \twoheaduparrowcircle, \leftrightharpoonupdown, \leftrightharpoondownup, \updownharpoonrightleft, \updownharpoonleftright, \leftrightharpoonupup, \updownharpoonrightright, \leftrightharpoondowndown, \updownharpoonleftleft, \barleftharpoonup, \rightharpoonupbar, \barupharpoonright, \downharpoonrightbar, \barleftharpoondown, \rightharpoondownbar, \barupharpoonleft, \downharpoonleftbar, \leftharpoonupbar, \barrightharpoonup, \upharpoonrightbar, \bardownharpoonright, \leftharpoondownbar, \barrightharpoondown, \upharpoonleftbar, \bardownharpoonleft, \leftharpoonsupdown, \upharpoonsleftright, \rightharpoonsupdown, \downharpoonsleftright, \leftrightharpoonsup, \leftrightharpoonsdown, \rightleftharpoonsup, \rightleftharpoonsdown, \leftharpoonupdash, \dashleftharpoondown, \rightharpoonupdash, \dashrightharpoondown, \updownharpoonsleftright, \downupharpoonsleftright, \rightimply, \equalrightarrow, \similarrightarrow, \leftarrowsimilar, \rightarrowsimilar, \rightarrowapprox, \ltlarr, \leftarrowless, \gtrarr, \subrarr, \leftarrowsubset, \suplarr, \leftfishtail, \rightfishtail, \upfishtail, \downfishtail, \Vvert, \mdsmblkcircle, \typecolon, \lBrace, \rBrace, \lParen, \rParen, \llparenthesis, \rrparenthesis, \llangle, \rrangle, \lbrackubar, \rbrackubar, \lbrackultick, \rbracklrtick, \lbracklltick, \rbrackurtick, \langledot, \rangledot, \lparenless, \rparengtr, \Lparengtr, \Rparenless, \lblkbrbrak, \rblkbrbrak, \fourvdots, \vzigzag, \measuredangleleft, \rightanglesqr, \rightanglemdot, \angles, \angdnr, \gtlpar, \sphericalangleup, \turnangle, \revangle, \angleubar, \revangleubar, \wideangledown, \wideangleup, \measanglerutone, \measanglelutonw, \measanglerdtose, \measangleldtosw, \measangleurtone, \measangleultonw, \measangledrtose, \measangledltosw, \revemptyset, \emptysetobar, \emptysetocirc, \emptysetoarr, \emptysetoarrl, \circlehbar, \circledvert, \circledparallel, \obslash, \operp, \obot, \olcross, \odotslashdot, \uparrowoncircle, \circledwhitebullet, \circledbullet, \olessthan, \ogreaterthan, \cirscir, \cirE, \boxdiag, \boxbslash, \boxast, \boxcircle, \boxbox, \boxonbox, \triangleodot, \triangleubar, \triangles, \triangleserifs, \rtriltri, \ltrivb, \vbrtri, \lfbowtie, \rfbowtie, \fbowtie, \lftimes, \rftimes, \hourglass, \blackhourglass, \lvzigzag, \rvzigzag, \Lvzigzag, \Rvzigzag, \iinfin, \tieinfty, \nvinfty, \dualmap, \laplac, \lrtriangleeq, \shuffle, \eparsl, \smeparsl, \eqvparsl, \gleichstark, \thermod, \downtriangleleftblack, \downtrianglerightblack, \blackdiamonddownarrow, \mdlgblklozenge, \circledownarrow, \blackcircledownarrow, \errbarsquare, \errbarblacksquare, \errbardiamond, \errbarblackdiamond, \errbarcircle, \errbarblackcircle, \ruledelayed, \setminus, \dsol, \rsolbar, \xsol, \xbsol, \doubleplus, \tripleplus, \lcurvyangle, \rcurvyangle, \tplus, \tminus, \sumint, \iiiint, \intbar, \intBar, \fint, \circfint, \awint, \rppolint, \scpolint, \npolint, \pointnt, \sqint, \intlharhk, \intx, \intcap, \intcup, \upint, \lowint, \zpipe, \ringplus, \plushat, \simplus, \plusdot, \plussim, \plussubtwo, \plustrif, \commaminus, \minusdot, \minusfdots, \minusrdots, \opluslhrim, \oplusrhrim, \vectimes, \dottimes, \timesbar, \btimes, \smashtimes, \otimeslhrim, \otimesrhrim, \otimeshat, \Otimes, \odiv, \triangleplus, \triangleminus, \triangletimes, \intprod, \intprodr, \fcmp, \amalg, \capdot, \uminus, \barcup, \barcap, \capwedge, \cupvee, \twocups, \twocaps, \closedvarcup, \closedvarcap, \Sqcap, \Sqcup, \closedvarcupsmashprod, \wedgeodot, \veeodot, \Wedge, \Vee, \wedgeonwedge, \veeonvee, \bigslopedvee, \bigslopedwedge, \veeonwedge, \wedgemidvert, \veemidvert, \midbarwedge, \midbarvee, \doublebarwedge, \wedgebar, \wedgedoublebar, \varveebar, \doublebarvee, \veedoublebar, \dsub, \rsub, \eqdot, \dotequiv, \equivVert, \equivVvert, \dotsim, \simrdots, \simminussim, \congdot, \asteq, \hatapprox, \approxeqq, \eqqplus, \pluseqq, \eqqsim, \Coloneq, \eqeq, \eqeqeq, \ddotseq, \equivDD, \ltcir, \gtcir, \ltquest, \gtquest, \leqslant, \geqslant, \lesdot, \gesdot, \lesdoto, \gesdoto, \lesdotor, \gesdotol, \lessapprox, \gtrapprox, \lneq, \gneq, \lnapprox, \gnapprox, \lesseqqgtr, \gtreqqless, \lsime, \gsime, \lsimg, \gsiml, \lgE, \glE, \lesges, \gesles, \eqslantless, \eqslantgtr, \elsdot, \egsdot, \eqqless, \eqqgtr, \eqqslantless, \eqqslantgtr, \simless, \simgtr, \simlE, \simgE, \Lt, \Gt, \partialmeetcontraction, \glj, \gla, \ltcc, \gtcc, \lescc, \gescc, \smt, \lat, \smte, \late, \bumpeqq, \preceq, \succeq, \precneq, \succneq, \preceqq, \succeqq, \precneqq, \succneqq, \precapprox, \succapprox, \precnapprox, \succnapprox, \Prec, \Sc, \subsetdot, \supsetdot, \subsetplus, \supsetplus, \submult, \supmult, \subedot, \supedot, \subseteqq, \supseteqq, \subsim, \supsim, \subsetapprox, \supsetapprox, \subsetneqq, \supsetneqq, \lsqhook, \rsqhook, \csub, \csup, \csube, \csupe, \subsup, \supsub, \subsub, \supsup, \suphsub, \supdsub, \forkv, \topfork, \mlcp, \forks, \forksnot, \shortlefttack, \shortdowntack, \shortuptack, \perps, \vDdash, \dashV, \Dashv, \DashV, \varVdash, \Barv, \vBar, \vBarv, \barV, \Vbar, \Not, \bNot, \revnmid, \cirmid, \midcir, \topcir, \nhpar, \parsim, \interleave, \nhVvert, \threedotcolon, \lllnest, \gggnest, \leqqslant, \leqqslant, \talloblong, \squareurblack, \squarellblack, \diamondleftblack, \diamondrightblack, \diamondtopblack, \diamondbotblack, \dottedsquare, \lgblksquare, \lgwhtsquare, \vysmlblksquare, \vysmlwhtsquare, \pentagonblack, \pentagon, \varhexagon, \varhexagonblack, \hexagonblack, \lgblkcircle, \mdblkdiamond, \mdwhtdiamond, \mdblklozenge, \mdwhtlozenge, \smblkdiamond, \smblklozenge, \smwhtlozenge, \blkhorzoval, \whthorzoval, \blkvertoval, \whtvertoval, \circleonleftarrow, \leftthreearrows, \leftarrowonoplus, \longleftsquigarrow, \nvtwoheadleftarrow, \nVtwoheadleftarrow, \twoheadmapsfrom, \twoheadleftdbkarrow, \leftdotarrow, \nvleftarrowtail, \nVleftarrowtail, \twoheadleftarrowtail, \nvtwoheadleftarrowtail, \nVtwoheadleftarrowtail, \leftarrowx, \leftcurvedarrow, \equalleftarrow, \bsimilarleftarrow, \leftarrowbackapprox, \rightarrowgtr, \rightarrowsupset, \LLeftarrow, \RRightarrow, \bsimilarrightarrow, \rightarrowbackapprox, \similarleftarrow, \leftarrowapprox, \leftarrowbsimilar, \righarrowbsimilar, \medwhitestar, \medblackstar, \smwhitestar, \rightpentagonblack, \rightpentagon, \postalmark, \hzigzag, \hiraganano, \textheng, \texthen, \calB, \calE, \calF, \calH, \calM, \calR. -+ -+IF ANYBODY WILL CHECK WHETHER ALL NAMES CORRESPOND TO RIGHT TEX SYMBOLS I SHALL APPRECIATE IT GREATLY. -+ ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/mgl.texi -@@ -0,0 +1,1601 @@ -+@c ------------------------------------------------------------------ -+@node MGL interface, Samples, Python interface, Top -+@chapter MGL interface -+ -+MathGL library supports (from version 1.3) the simplest scripts for data handling and plotting. These scripts can be used independently (with the help of mgl2png, mgl2eps, mgl2svg programs and others) or in the frame of the library using. -+ -+MGL script language is rather simple. Each string is a command. First word of string is the name of command. Other words are command arguments. Command may have up to 1000 arguments (at least for now). Words are separated from each other by space or tabulation symbol. The upper or lower case of words is sufficient, i.e. variables a and A are different variables. Symbol @samp{#} starts the comment (all characters after # will be ignored). The exception is situation when # is a part of some string. Also options can be specified at the end of string (after symbol @samp{;}, @pxref{Command options (MGL)}). -+ -+If string contain references to external parameters (substrings @samp{$0}, @samp{$1} ... @samp{$9}) then before execution the values of parameter will be substituted instead of reference. It allows to use the same MGL script for different parameters (filenames, paths, condition and so on). -+ -+Argument can be a string, a variable name or a number. -+@itemize @bullet -+@item -+The string is any symbols between ordinary marks @samp{'}. -+ -+@item -+Variable name is arbitrary combination of symbols (except spaces and @samp{'}) started from a letter and with length less than 64. It is possible to use sub-arrays (like in @code{subdata} command) as command argument. For example, @code{a(1)} or @code{a(1,:)} or @code{a(1,:,:)} is second row, @code{a(:,2)} or @code{a(:,2,:)} is third column, @code{a(:,:,0)} is first slice and so on. Also you can extract a part of array from m-th to n-th element by code @code{a(m:n,:,:)} or just @code{a(m:n)}. -+ -+If names for data columns was specified (by set_id command or in the file at string started with @code{##}) then it is possible to use any column combinations defined by formulas, like @code{a('n*w^2/exp(t)')}. -+ -+Also, any expression (without spaces) of existed variables produce temporary variable. For example, @samp{sqrt(dat(:,5)+1)} will produce temporary variable with data values equal to @code{tmp[i,j] = sqrt(dat[i,5,j]+1)}. Such variables can not be used as 1st argument for commands which create (return) the data (like @samp{new}, @samp{read}, @samp{hist} and so on). -+ -+@item -+Special names @code{nan=#QNAN, pi=3.1415926..., on=1, off=0, :=-1} are treated as number if they were not redefined by user. Variables with suffixes are treated as numbers (@pxref{Suffixes}). Also results of formulas with sizes 1x1x1 are treated as number (for example, @samp{pi/dat.nx}). -+@end itemize -+Before the first using all variables must be defined with the help of commands, like, @code{new, var, list, copy} or @code{read}. -+ -+All MGL commands can be divided on several groups. I will use the following notation for a command description: command names are bold, strings are denoted by commas, variable names are italic, numbers are typewriter. Optional arguments are placed in square brackets and default values for them are shown. Detailed description of color, line styles, color schemes, font types, TeX-like symbols and formulas can be found in corresponding section. -+ -+@menu -+* Graphics setup (MGL):: -+* Axis settings (MGL):: -+* Transformation matrix (MGL):: -+* Export to file (MGL):: -+* Primitives drawing (MGL):: -+* Text printing (MGL):: -+* Axis and Colorbar (MGL):: -+* Legend (MGL):: -+* 1D plotting (MGL):: -+* 2D plotting (MGL):: -+* 3D plotting (MGL):: -+* Dual plotting (MGL):: -+* Vector fields (MGL):: -+* Other plotting (MGL):: -+* Nonlinear fitting (MGL):: -+* Data create (MGL):: -+* Data filling (MGL):: -+* Rearrange data (MGL):: -+* File I/O (MGL):: -+* Make another data (MGL):: -+* Commands on direction (MGL):: -+* Operators (MGL):: -+* Program flow (MGL):: -+* Command options (MGL):: -+* Suffixes:: -+* Utilities:: -+@end menu -+ -+ -+@c ################################################################## -+@node Graphics setup (MGL), Transformation matrix (MGL), , MGL interface -+@section Graphics setup (MGL) -+ -+Coomands in this group influences on overall graphics appearance. So all of them should be placed @emph{before} any actual plotting commands. -+ -+@menu -+* Transparency (MGL):: -+* Lighting (MGL):: -+* Fog (MGL):: -+* Default sizes (MGL):: -+* Zooming (MGL):: -+* Cutting (MGL):: -+* Other settings (MGL):: -+@end menu -+ -+@c ================================================================== -+@node Transparency (MGL), Lighting (MGL), , Graphics setup (MGL) -+@subsection Transparency (MGL) -+@cindex alpha -+@cindex alphadef -+@cindex transparent -+@cindex transptype -+ -+There are several commands for setup transparency. The general command is @code{alpha} which switch on/off the transparency for overall plot. It influence only for graphics which created after @code{alpha} call (with one exeption, mglGraphGL). Command @code{alphadef} specify the default value of alpha-channel. You may switch off transparency of selected plot by command @code{transparent}. Finally, command @code{transptype} set the kind of transparency. @sref{Transparent surface sample} -+ -+@deffn {MGL command} alpha @code{[val=on]} -+Sets the transparency on/off. It is recommended to call this command before any plotting command. Default value is @code{off}. Use @code{transparent off} in particular plot to disable its transparency. -+@end deffn -+@deffn {MGL command} alphadef @code{val} -+Default value of alpha channel (transparency) for all plotting commands. -+@end deffn -+@deffn {MGL command} transparent @code{val} -+Temporary switches transparency on/off for the plot. -+@end deffn -+@deffn {MGL command} transptype @code{val} -+This command set the transparency type. Normal transparency (@samp{0}) -- below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces. Glass-like transparency (@samp{1}) -- below and upper things are commutable and just decrease intensity of light by RGB channel. Lamp-like transparency (@samp{2}) -- below and upper things are commutable and are the source of some additional light. I recommend to set @code{alphadef 0.3} or less for lamp-like transparency. -+@end deffn -+ -+@c ================================================================== -+@node Lighting (MGL), Fog (MGL), Transparency (MGL), Graphics setup (MGL) -+@subsection Lighting (MGL) -+@cindex light -+@cindex ambient -+ -+There are several commands for setup lighting. The general command is @code{mgl_set_light()} which switch on/off the lighting for overall plot. It influence only for graphics which created after @code{mgl_set_light()} call (with one exeption, mglGraphGL). Generally MathGL support up to 10 independent light sources. But in OpenGL mode only 8 of light sources is used due to OpenGL limitations. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number @code{0} with white color, located at top of the plot. -+ -+@deffn {MGL command} light @code{[val=on]} -+Sets the using of light on/off for overall plot. It is recommended to call this command before any plotting command. Default value is lightning off. -+@end deffn -+@deffn {MGL command} light @code{num val} -+Switch on/off @var{num}-th light source separately. -+@end deffn -+ -+@deffn {MGL command} light @code{num xpos ypos zpos} ['col'='w' @code{br=0.5}] -+The command adds a light source with identification @var{num} at position @{@var{xpos}, @var{ypos}, @var{zpos}@}. The color of light is @var{col} (white by default). The brightness of light is @var{br} which must be in range [0,1]. -+@end deffn -+ -+@deffn {MGL command} ambient @code{val} -+Sets the brightness of ambient light. The value should be in range [0,1]. Initial value is 0.5. -+@end deffn -+ -+@c ================================================================== -+@node Fog (MGL), Default sizes (MGL), Lighting (MGL), Graphics setup (MGL) -+@subsection Fog (MGL) -+@cindex fog -+ -+@deffn {MGL command} fog @code{val [dz=0.25]} -+Command imitate a fog in the plot. Fog start from relative distance @var{dz} from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-@emph{val*z}). Here @emph{z} is normalized to 1 depth of the plot. If value @var{val}=@code{0} then the fog is absent. @sref{Surface in fog sample} -+@end deffn -+ -+@c ================================================================== -+@node Default sizes (MGL), Zooming (MGL), Fog (MGL), Graphics setup (MGL) -+@subsection Default sizes (MGL) -+@cindex marksize -+@cindex arrowsize -+@cindex linewidth -+@cindex ticklen -+@cindex tickstl -+ -+These commands control the default (initial) values for most graphics parameters including sizes of markers, arrows, linewidth and so on. As any other settings these ones will influence only on plots created after the settings change. -+ -+@deffn {MGL command} marksize @code{val} -+The size of marks. Default value is @code{1}. -+@end deffn -+ -+@deffn {MGL command} arrowsize @code{val} -+The size of arrows for lines and curves. Default value is @code{1}. -+@end deffn -+ -+@deffn {MGL command} linewidth @code{val} -+The variable define the base width for all lines. The value <1 is ignored. Increase of this variables is actual for large bitmap pictures. Default value is @code{1}. -+@end deffn -+ -+@deffn {MGL command} ticklen @code{val} [@code{stt=1}] -+The relative length of axis ticks. Default value is @code{0.1}. Parameter @var{stt}>0 set relative length of subticks which is in @code{sqrt(1+stt)} times smaller. -+@end deffn -+ -+@deffn {MGL command} tickstl 'stl' ['sub'=''] -+The line style of axis ticks (@var{stl}) and subticks (@var{sub}). If @var{stl}='' then default style is used (@samp{k} or @samp{w} depending on transparency type). If @var{sub}='' then ticks style is used (i.e. @var{stl}). -+@end deffn -+ -+@c ================================================================== -+@node Zooming (MGL), Cutting (MGL), Default sizes (MGL), Graphics setup (MGL) -+@subsection Zooming (MGL) -+@cindex plotfactor -+@cindex zoom -+ -+These commands control the overall zooming of the picture or the sub-picture. Normally you can use these variables and commands for removing ``white'' spaces around a plot. -+ -+@deffn {MGL command} plotfactor @code{val} -+The factor of plot size. It is not recommended to set it lower then 1.6. This is some analogue of command @code{zoom} but applied not to overall image but for each @code{inplot}. Use negative value to enable automatic @code{plotfactor} selection. -+@end deffn -+ -+@deffn {MGL command} zoom @code{x1 y1 x2 y2} -+The command changes the scale of graphics that correspond to zoom in/out of the picture. After command call the current plot will be cleared and further the picture will contain plotting from its part [x1,x2]*[y1,y2]. Here picture coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} changes from 0 to 1. Use @code{zoom 0 0 1 1} to return default view. -+@end deffn -+ -+@c ================================================================== -+@node Cutting (MGL), Other settings (MGL), Zooming (MGL), Graphics setup (MGL) -+@subsection Cutting (MGL) -+@cindex cut -+ -+These commands set the condition when the points are excluded (cutted) from the drawing. -+ -+@deffn {MGL command} cut @code{val} -+Determines how points outside bounding box are drawn. If it is @code{true} then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box. -+@end deffn -+ -+@deffn {MGL command} cut @code{x1 y1 z1 x2 y2 z2} -+Lower and upper edge of the box in which never points are drawn. If both edges are the same (the variables are equal) then the cutting box is empty. @sref{CutMinMax sample} -+@end deffn -+ -+@deffn {MGL command} cut 'cond' -+Command set the cutting off condition by formula @var{cond}. This condition determine will point be plotted or not. If value of formula is nonzero then point is omitted, otherwise it plotted. Set argument as @code{''} to disable cutting off condition. @sref{CutOff sample} -+@end deffn -+ -+@c ================================================================== -+@node Other settings (MGL), , Cutting (MGL), Graphics setup (MGL) -+@subsection Other settings (MGL) -+@cindex font -+@cindex rotatetext -+@cindex palette -+@cindex meshnum -+@cindex axialdir -+ -+@deffn {MGL command} font 'fnt' [@code{val=6}] -+Font style for text and labels (see text). Initial style is 'fnt'='rC' give Roman font with centering. Parameter @code{val} sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels. For more detail, @pxref{Font style}. -+@end deffn -+ -+@deffn {MGL command} rotatetext @code{val} -+Set to use or not text rotation along axis. Initial value is @code{on}. -+@end deffn -+ -+@deffn {MGL command} palette 'colors' -+Set the palette as selected colors. Default value is @code{'Hbgrcmyhlnqeup'}. The palette is used mostly in 1D plots for curves which styles are not specified. -+@end deffn -+ -+@deffn {MGL command} meshnum @code{num} -+Sets approximate number of lines in @code{mesh, fall, grid} and also the number of hachures in @code{vect, vectc, dew} and the number of cells in @code{cloud}. By default (=0) it draws all lines/hachures/cells. -+@end deffn -+ -+@deffn {MGL command} axialdir 'dir' -+Set direction around which curve rotated in @code{axial, torus}. Default value is 'z'. -+@end deffn -+ -+@c ================================================================== -+@node Axis settings (MGL), Transformation matrix (MGL), Graphics setup (MGL), MGL interface -+@section Axis settings (MGL) -+@cindex axis -+@cindex caxis -+@cindex xrange -+@cindex yrange -+@cindex zrange -+@cindex xtick -+@cindex ytick -+@cindex ztick -+@cindex ctick -+@cindex crange -+@cindex ctick -+@cindex origin -+@cindex adjust -+ -+These large set of commands control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected and cutting is applied (@pxref{Cutting (MGL)}), after it transformation formulas are applied, and finally the data was normalized in bounding box. -+ -+@deffn {MGL command} axis @code{x1 y1 x2 y2} -+@deffnx {MGL command} axis @code{x1 y1 z1 x2 y2 z2} -+Sets the ranges of coordinates changing. Also it sets the range for coloring (analogous to @code{caxis z1 z2}). Initial ranges are [-1, 1]. -+@end deffn -+ -+@deffn {MGL command} axis 'fx' 'fy' 'fz' -+Sets the transformation formulas for curvilinear coordinates. Each string should contain mathematical expression for real coordinate depending on internal coordinates x, y, z. For example, the cylindrical coordinates are introduced as @code{axis 'x*cos(y)' 'x*sin(y)' 'z'}. For removing of formulas the corresponding parameter should be @code{''}. The using of transformation formulas will slightly slowing the program, i.e. @code{axis '' '' ''} is faster than @code{axis 'x' 'y' 'z'}. Initially all formulas are absent (Cartesian coordinates are used). For more details about functions and formulas, @pxref{mglFormula class}. -+@end deffn -+ -+@deffn {MGL command} axis @code{how} -+Sets one of the predefined transformation formulas for curvilinear coordinate. Paramater @var{how} define the coordinates: @code{0} -- Cartesian coordinates (no transformation); @code{1} -- Polar coordiantes @math{x_n=x*cos(y),y_n=x*sin(y), z_n=z}; @code{2} -- Spherical coordinates @math{x_n=x*sin(y)*cos(z), y_n=x*sin(y)*sin(z), z_n=x*cos(y)}; @code{3} -- Parabolic coordinates @math{x_n=x*y, y_n=(x*x-y*y)/2, z_n=z}; @code{4} -- Paraboloidal coordinates @math{x_n=(x*x-y*y)*cos(z)/2, y_n=(x*x-y*y)*sin(z)/2, z_n=x*y}; @code{5} -- Oblate coordinates @math{x_n=cosh(x)*cos(y)*cos(z), y_n=cosh(x)*cos(y)*sin(z), z_n=sinh(x)*sin(y)}; @code{6} -- Prolate coordinates @math{x_n=sinh(x)*sin(y)*cos(z), y_n=sinh(x)*sin(y)*sin(z), z_n=cosh(x)*cos(y)}; @code{7} -- Elliptic coordinates @math{x_n=cosh(x)*cos(y), y_n=sinh(x)*sin(y), z_n=z}; @code{8} -- Toroidal coordinates @math{x_n=sinh(x)*cos(z)/(cosh(x)-cos(y)), y_n=sinh(x)*sin(z)/(cosh(x)-cos(y)), z_n=sin(y)/(cosh(x)-cos(y))}; @code{9} -- Bispherical coordinates @math{x_n=sin(y)*cos(z)/(cosh(x)-cos(y)), y_n=sin(y)*sin(z)/(cosh(x)-cos(y)), z_n=sinh(x)/(cosh(x)-cos(y))}; @code{10} -- Bipolar coordinates @math{x_n=sinh(x)/(cosh(x)-cos(y)), y_n=sin(y)/(cosh(x)-cos(y)), z_n=z}. -+@end deffn -+ -+@deffn {MGL command} caxis @code{z1 z2} -+Sets the range for surface coloring. Initial range is [-1, 1]. -+@end deffn -+ -+@deffn {MGL command} origin @code{x0 y0 [z0=nan]} -+Center of axis cross section. If one of values is @code{nan} then MathGL library try to select optimal axis position. -+@end deffn -+ -+@deffn {MGL command} ternary @code{val} -+The command sets to draws Ternary plot. This special plot is for 3 dependent coordinates (components) @var{a}, @var{b}, @var{c} so that @var{a}+@var{b}+@var{c}=1. MathGL uses only 2 independent coordinates @var{a}=x and @var{b}=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on. @sref{Ternary plot sample} -+@end deffn -+ -+@deffn {MGL command} xrange dat [@code{add=off fact=0}] -+@deffnx {MGL command} yrange dat [@code{add=off fact=0}] -+@deffnx {MGL command} zrange dat [@code{add=off fact=0}] -+@deffnx {MGL command} crange dat [@code{add=off fact=0}] -+Sets the range for x-,y-,z- coordinate or coloring as minimal and maximal values of data @var{dat}. Parameter @code{add=on} shows that the new range will be joined to existed one (nut will not replace it). Parameter @var{fact} add additional range increase on value (@var{Max}-@var{Min})*@var{fact}. -+@end deffn -+ -+@deffn {MGL command} xrange @code{x1 x2} -+@deffnx {MGL command} yrange @code{x1 x2} -+@deffnx {MGL command} zrange @code{x1 x2} -+@deffnx {MGL command} crange @code{x1 x2} -+Sets the range for x-,y-,z- coordinate or coloring. See also axis. -+@end deffn -+ -+@deffn {MGL command} xtick @code{val [sub=0 org=nan]} -+@deffnx {MGL command} ytick @code{val [sub=0 org=nan]} -+@deffnx {MGL command} ztick @code{val [sub=0 org=nan]} -+Sets step for x-, y-, z-axis ticks (if @var{cal}>0) or it's number (if @var{val}<0) in corresponding direction. Zero value @var{val}=0 sets logarithmic ticks. Parameter @var{sub} sets the number of sub-ticks. Parameter @var{org} set the starting points for ticks. If not @code{org=nan} then the value from @code{origin} is used. -+@end deffn -+ -+@deffn {MGL command} xtick 'templ' -+@deffnx {MGL command} ytick 'templ' -+@deffnx {MGL command} ztick 'templ' -+@deffnx {MGL command} ctick 'templ' -+Sets the template for x-, y-, z-axis ticks or colorbar ticks. It may contain TeX symbols also. If @var{templ}=@code{''} then default template is used (in simplest case it is @samp{%.2g}) with automatic detaching of common multiplier or common component. -+@end deffn -+ -+@deffn {MGL command} xtick @code{val1} 'lbl1' [@code{val2} 'lbl2' ...] -+@deffnx {MGL command} ytick @code{val1} 'lbl1' [@code{val2} 'lbl2' ...] -+@deffnx {MGL command} ztick @code{val1} 'lbl1' [@code{val2} 'lbl2' ...] -+Sets manual positions @var{val1},@var{val2},... and labels @var{lbl1},@var{lbl2},... for ticks along x-, y-, z-axis. Labels may contain TeX symbols also. -+@end deffn -+ -+@deffn {MGL command} adjust 'dir' -+Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) @var{dir}. -+@end deffn -+ -+ -+@c ################################################################## -+@node Transformation matrix (MGL), Export to file (MGL), Axis settings (MGL), MGL interface -+@section Transformation matrix (MGL) -+@cindex aspect -+@cindex rotate -+@cindex subplot -+@cindex inplot -+@cindex identity -+@cindex perspective -+ -+These commands control how and where further plotting will be placed. There is a curtain order of calling of these commands for the better plot view. First one should be @code{subplot} or @code{inplot} for specifying the place. After it a @code{rotate} and @code{aspect}. And finally any other plotting commands may be called. Alternatevely you can use @code{columnplot} for position plots in the column one by another without gap between plot axis (bounding boxes). -+ -+@deffn {MGL command} subplot @code{nx ny m [dx=0 dy=0]} -+Puts further plotting in a @var{m}-th cell of @var{nx}*@var{ny} grid of the whole frame area. This command set off any aspects or rotations. So it should be used first for creating the subplot. From the aesthetical point of view it is not recommended to use this command with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size @var{dx}, @var{dy}. -+@end deffn -+ -+@deffn {MGL command} inplot @code{x1 x2 y1 y2 [rel=off]} -+Puts further plotting in some region of the whole frame surface. This command allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [@var{x1}, @var{x2}]*[@var{y1}, @var{y2}]. The coordinates @var{x1}, @var{x2}, @var{y1}, @var{y2} are normalized to interval [0, 1]. If parameter @var{rel}=@code{on} then the relative position to current @code{subplot} is used. This command set off any aspects or rotations. So it should be used first for creating subplot. -+@end deffn -+ -+@deffn {MGL command} columnplot @code{num ind} -+Puts further plotting in @var{ind}-th cell of column with @var{num} cells. The position is relative to previous @code{subplot} call (or @code{inplot} with @code{rel=off}). -+@end deffn -+ -+@deffn {MGL command} rotate @code{tetz tetx [tety=0]} -+Rotates a further plotting relative to each axis (x, z, y) consecutively on angles @var{tetx}, @var{tetz}, @var{tety}. -+@end deffn -+ -+@deffn {MGL command} rotate @code{tet x y z} -+Rotates a further plotting around vector @{x,y,z@} on angle @var{tet}. -+@end deffn -+ -+@deffn {MGL command} aspect @code{ax ay [az=1]} -+Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio @var{ax:ay:az}. For the best effect it should be used after @code{rotate} command. -+@end deffn -+ -+@deffn {MGL command} perspective @code{val} -+Add (switch on) the perspective to plot. The parameter @math{val ~ 1/z_@{eff@} \in [0,1)}. By default (@code{val=0}) the perspective is off. -+@end deffn -+ -+@c ################################################################## -+@node Export to file (MGL), Primitives drawing (MGL), Transformation matrix (MGL), MGL interface -+@section Export to file (MGL) -+@cindex write -+@cindex setsize -+ -+@deffn {MGL command} write 'fname' [@code{solid=off}] -+Exports current picture/frame to file 'fname' (file type is determined by extension). Solid (usually white) background will be used if @code{solid=on}. If 'fname'='' then the file @samp{frameNNNN.jpg} is used, where @samp{NNNN} is current frame id. -+@end deffn -+ -+@deffn {MGL command} setsize @code{w h} -+Sets size of picture in pixels. This function call @strong{must be} placed before any plotting command because it completely remove picture content. In some program the call of this function is forbidden. -+@end deffn -+ -+ -+@c ################################################################## -+@node Primitives drawing (MGL), Text printing (MGL), Export to file (MGL), MGL interface -+@section Primitives drawing -+@cindex ball -+@cindex clf -+@cindex line -+@cindex curve -+@cindex facex -+@cindex facey -+@cindex facez -+@cindex cone -+@cindex drop -+@cindex sphere -+ -+These commands draw some simple objects like line, point, sphere, drop, cone and so on. -+ -+@deffn {MGL command} clf -+Clear the picture by removes all drawing from it. Does not change transformation matrix. -+@end deffn -+ -+@deffn {MGL command} ball @code{x y} ['col'='r'] -+@deffnx {MGL command} ball @code{x y z} ['col'='r'] -+Draws a point (ball) at position @{@var{x}, @var{y}, @var{z}@} with color defined by string @var{col}. -+@end deffn -+ -+@deffn {MGL command} line @code{x1 y1 x2 y2} ['stl'=''] -+@deffnx {MGL command} line @code{x1 y1 z1 x2 y2 z2} ['stl'=''] -+Draws a geodesic line (straight line in Cartesian coordinates) from point @{@var{x1},@var{y1},@var{z1}@} to @{@var{x2},@var{y2},@var{z2}@} using line style @var{stl}. -+@end deffn -+ -+@deffn {MGL command} curve @code{x1 y1 dx1 dy1 x2 y2 dx2 dy2} ['stl'=''] -+@deffnx {MGL command} curve @code{x1 y1 z1 dx1 dy1 dz1 x2 y2 z2 dx2 dy2 dz2} ['stl'=''] -+Draws Bezier-like curve from point @{@var{x1},@var{y1},@var{z1}@} to @{@var{x2},@var{y2},@var{z2}@} using line style @var{stl}. At this tangent is co-directed with @{@var{dx1},@var{dy1},@var{dz1}@}, @{@var{dx2},@var{dy2},@var{dz2}@} and proportional to its amplitude. -+@end deffn -+ -+@deffn {MGL command} facex @code{x0 y0 z0 wy wz} ['stl'='' @code{d1=0 d2=0}] -+@deffnx {MGL command} facey @code{x0 y0 z0 wx wz} ['stl'='' @code{d1=0 d2=0}] -+@deffnx {MGL command} facez @code{x0 y0 z0 wx wy} ['stl'='' @code{d1=0 d2=0}] -+Draws the solid rectangle (face) perpendicular to [x,y,z]-axis correspondingly at position @{@var{x0}, @var{y0}, @var{z0}@} with color @var{stl} and with widths @var{wx}, @var{wy}, @var{wz} along corresponding directions. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. Parameters @var{d1}!=0, @var{d2}!=0 set additional shift of the last vertex (i.e. to draw quadrangle). -+@end deffn -+ -+@deffn {MGL command} sphere @code{x0 y0 r} ['col'='r'] -+@deffnx {MGL command} sphere @code{x0 y0 z0 r} ['col'='r'] -+Draw the sphere with radius @var{r} and center at point @{@var{x0}, @var{y0}, @var{z0}@} and color @var{stl}. -+@end deffn -+ -+@deffn {MGL command} drop @code{x0 y0 dx dy r} ['col'='b' @code{sh=1 asp=1}] -+@deffnx {MGL command} drop @code{x0 y0 z0 dx dy dz r} ['col'='b' @code{sh=1 asp=1}] -+Draw the drop with radius @var{r} at point @{@var{x0},@var{y0},@var{z0}@} elongated in direction @{@var{dx},@var{dy},@var{dz}@} and with color @var{col}. Parameter @var{sh} set the degree of drop oblongness: @samp{0} is sphere, @samp{1} is maximally oblongness drop. Parameter @var{asp} set relative width of the drop (this is analogue of ``ellipticity'' for the sphere). @sref{Drops sample} -+@end deffn -+ -+@deffn {MGL command} cone @code{x1 y1 z1 x2 y2 z2 r1} [@code{r2=-1} 'st'='' @code{edge=off}] -+Draw tube (or truncated cone if @var{edge}=@code{off}) between points @{@var{x1},@var{y1},@var{z1}@}, @{@var{x2},@var{y2},@var{z2}@} with radiuses at the edges @var{r1}, @var{r2}. If @var{r2}<0 then it is supposed that @var{r2}=@var{r1}. The cone color is defined by string @var{stl}. -+@end deffn -+ -+@deffn {MGL command} rect @code{x1 y1 x2 y2} ['st'=''] -+@deffnx {MGL command} rect @code{x1 y1 z1 x2 y2 z2} ['st'=''] -+Draw rectangle from point @{@var{x1},@var{y1},@var{z1}@} to point @{@var{x2},@var{y2},@var{z2}@} using colors @var{stl}. If @var{stl} have 4 or more colors then it defines colors for each rectangle vertex (useful for making gradients, like @samp{wwrr}) else first color is used for whole rectangle. -+@end deffn -+ -+@c ################################################################## -+@node Text printing (MGL), Axis and Colorbar (MGL), Primitives drawing (MGL), MGL interface -+@section Text printing (MGL) -+@cindex fgets -+@cindex text -+@cindex title -+ -+These commands draw the text. There are commands for drawing text in arbitrary place, in arbitrary direction and along arbitrary curve. It is possible to use arbitrary font-faces and parse many TeX commands. The Unicode text is supported. So sometimes you need to specify locale. The @code{size} argument control the size of text: if positive it give the value, if negative it give the value relative to defined by @code{font} command. @xref{Font style}. -+ -+@deffn {MGL command} text @code{x y} 'text' ['fnt'='' @code{size=-1.4}] -+@deffnx {MGL command} text @code{x y z} 'text' ['fnt'='' @code{size=-1.4}] -+Draws unrotated text string @var{text} at position @{@var{x},@var{y},@var{z}@} with specified style @var{fnt} and @var{size}. By default parameters from @code{font} command are used. -+@end deffn -+ -+@deffn {MGL command} text @code{x y dx dy} 'text' [@code{size=-1.4}] -+@deffnx {MGL command} text @code{x y z dx dy dz} 'text' [@code{size=-1.4}] -+The command plots the string @var{text} at position @{@var{x},@var{y},@var{z}@} along direction @{@var{dx},@var{dy},@var{dz}@} with specified style @var{fnt} and @var{size}. By default parameters from @code{font} command are used. -+@end deffn -+ -+@deffn {MGL command} title 'text' ['fnt'='' @code{size=-2}] -+Print string @var{text} as title of the picture (at the top of the picture). Can be used at any place (even inside @code{subplot}). -+@end deffn -+ -+@deffn {MGL command} fgets @code{x y} 'fname' [@code{n=0} 'fnt'='' @code{size=-1.4}] -+@deffnx {MGL command} fgets @code{x y z} 'fname' [@code{n=0} 'fnt'='' @code{size=-1.4}] -+Draws unrotated @var{n}-th line of file @var{fname} at position @{@var{x},@var{y},@var{z}@} with specified @var{size}. By default parameters from @code{font} command are used. -+@end deffn -+ -+ -+@deffn {MGL command} text xdat 'text' ['fnt'='' @code{size=-1 zval=nan}] -+@deffnx {MGL command} text xdat ydat 'text' ['fnt'='' @code{size=-1 zval=nan}] -+@deffnx {MGL command} text xdat ydat zdat 'text' ['fnt'='' @code{size=-1}] -+The command draws @var{text} along the curve between points @{@var{xdat}[i], @var{ydat}[i], @var{zdat}[i]@} by font style @var{fnt} and with size @var{size}. The string @var{fnt} may contain symbols @samp{t} for printing the text under the curve (default), or @samp{T} for printing the text above the curve. The sizes of 1st dimension must be equal for all arrays @var{xdat.nx=ydat.nx=zdat.nx}. If array @var{xdat} is not specified then its an automatic array is used with values equidistantly distributed along x. If array @var{zdat} is not specified then @var{z}[i] = @var{zval} is used. @sref{Text sample} -+@end deffn -+ -+@c ################################################################## -+@node Axis and Colorbar (MGL), Legend (MGL), Text printing (MGL), MGL interface -+@section Axis and Colorbar (MGL) -+@cindex axis -+@cindex box -+@cindex grid -+@cindex colorbar -+@cindex xlabel -+@cindex ylabel -+@cindex zlabel -+@cindex tlabel -+ -+These commands draw the ``things for measuring'', like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information @pxref{Axis settings (MGL)}. -+ -+@deffn {MGL command} axis ['dir'='xyz' @code{adjust=off}] -+Draws axes with ticks (@pxref{Axis settings (MGL)}) in directions determined by string parameter @var{dir}.If string contain the symbol @samp{_} then tick labels are not printed. Font for ticks labels is determined by command @code{font}. Ticks will be automatically adjusted if @var{adjust}=@code{on} (by call of @code{adjust 'dir'}). -+@end deffn -+ -+@deffn {MGL command} colorbar ['sch'='' @code{pos=0}] -+Draws colorbar with color scheme @var{sch} (current scheme if @code{sch=''}) at edge of plot. Parameter @var{pos} specifies the position of colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{Dens sample} -+@end deffn -+ -+@deffn {MGL command} colorbar 'sch' @code{pos x y w h} -+Draws colorbar with color scheme @var{sch} (current scheme if not specified) at arbitrary position of subplot @{@var{x}, @var{y}@} (supposed to be in range [0,1]). Parameter @var{pos} specifies the position of colorbar labels: @samp{0} - at left, @samp{1} - at right, @samp{2} - at bottom, @samp{3} - at top. Parameters @var{w}, @var{h} set the relative width and height of the colorbar. -+@end deffn -+ -+@deffn {MGL command} colorbar vdat ['sch'='' @code{pos=0}] -+Draws colorbar with sharp colors @var{sch} (current palette if @code{sch=NULL}) for values @var{vdat} at edge of plot. Parameter @var{pos} specifies the position of colorbar: @samp{0} - at right (default), @samp{1} - at left, @samp{2} - at top, @samp{3} - at bottom. @sref{Dens sample} -+@end deffn -+ -+@deffn {MGL command} grid ['dir'='xyz' 'pen'='B'] -+Draws grid lines perpendicular to direction determined by string parameter @var{dir}. The step of grid lines is the same as tick step for an @code{axis}. The style of lines is determined by @var{pen} parameter. -+@end deffn -+ -+@deffn {MGL command} box ['stl'='k'] -+Draws bounding box outside the plotting volume with line style 'stl'. -+@end deffn -+ -+@deffn {MGL command} xlabel 'text' [@code{pos=1 shift=0}] -+@deffnx {MGL command} ylabel 'text' [@code{pos=1 shift=0}] -+@deffnx {MGL command} zlabel 'text' [@code{pos=1 shift=0}] -+@deffnx {MGL command} tlabel 'text' [@code{pos=1 shift=0}] -+Prints the label @var{text} for x-,y-,z-,t-axis (here @samp{t} is ``ternary'' axis @math{t=1-x-y}). The position of label is determined by @var{pos} parameter. If @var{pos}=0 then label is printed at the center of axis. If @var{pos}>0 then label is printed at the maximum of axis (default). If @var{pos}<0 then label is printed at the minimum of axis. The font size is 1.4 times larger than the one for ticks @code{font}. Parameter @code{shift} specify additional shifting of the label. @xref{Text printing (MGL)}. -+@end deffn -+ -+@c ################################################################## -+@node Legend (MGL), 1D plotting (MGL), Axis and Colorbar (MGL), MGL interface -+@section Legend (MGL) -+@cindex legend -+@cindex addlegend -+@cindex clearlegend -+ -+These commands draw legend to the graph (useful for @ref{1D plotting (MGL)}). Legend entry is a pair of strings: one for style of the line, another one with description text (with included LaTeX parsing). The array of string are accumulated first to the internal arrays (by command @code{addlegend}) and are plotted later. The position of the legend can be selected automatic or manually. Parameters @var{fnt} and @var{size} specify the font style and size. Parameter @var{llen} set the relative width of the line sample and the text indent (default value is 0.1). If line style string for entry is empty then the corresponding text is printed without indent. @sref{Legend sample} -+ -+@deffn {MGL command} legend [@code{pos=3} 'fnt'='rL' @code{size=-1 llen=0.1}] -+Draws legend of accumulated legend entries by font @var{fnt} with specified @var{size}. Parameter @var{pos} sets the position of the legend: @samp{0} is bottom left corner, @samp{1} is bottom right corner, @samp{2} is top left corner, @samp{3} is top right corner (is default). -+@end deffn -+ -+@deffn {MGL command} legend @code{x y} ['fnt'='rL' @code{size=-1 llen=0.1}] -+Draws legend of accumulated legend entries by font @var{fnt} with @var{size}. Position of legend is determined by parameter @var{x}, @var{y} which supposed to be normalized to interval [0,1]. -+@end deffn -+ -+@deffn {MGL command} addlegend 'text' 'stl' -+Adds string @var{text} to internal legend accumulator. The style of described line and mark is specified in string @var{stl} (@pxref{Line styles}). Maximal number of entries is 100. -+@end deffn -+ -+@deffn {MGL command} clearlegend -+Clears saved legend strings. -+@end deffn -+ -+@deffn {MGL command} legendbox @code{val} -+Switches on/off the drawing of a box near legend. By default, the box is drawn. -+@end deffn -+ -+ -+ -+@c ################################################################## -+@node 1D plotting (MGL), 2D plotting (MGL), Legend (MGL), MGL interface -+@section 1D plotting (MGL) -+@cindex plot -+@cindex tens -+@cindex area -+@cindex bars -+@cindex barh -+@cindex stem -+@cindex step -+@cindex torus -+@cindex chart -+@cindex mark -+@cindex textmark -+@cindex error -+@cindex tube -+@cindex region -+ -+These commands perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve @{x(i),y(i),z(i)@}, i=1...n. There are 5 generally different types of data representations: simple line plot (Plot), line plot with filling under it (Area), stairs plot (Step), bar plot (Bars, Barh) and vertical lines (Stem). Each type of plotting has similar interface. There are 3D version and two 2D versions. One of last requires single array. The parameters of line and marks are specified by the string argument. If the string parameter is NULL then solid line with color from palette Pal is used (@pxref{Palette and colors}). Also there are some special 1d plots having slightly different interface: surface of curve rotation (Torus), chart (Chart) and error boxes (Error), marks with variable size (Mark), tubes (Tube) and so on. @xref{Line styles}. -+ -+The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension @strong{must be equal} for all arrays @var{x.nx=y.nx=z.nx}. String @var{pen} specifies the color and style of line and marks (@pxref{Line styles}). By default (@code{pen=NULL}) solid line with color from palette is used (@pxref{Palette and colors}). -+ -+@deffn {MGL command} plot ydat ['stl'='' @code{zval=nan}] -+@deffnx {MGL command} plot xdat ydat ['stl'='' @code{zval=nan}] -+@deffnx {MGL command} plot xdat ydat zdat ['stl'=''] -+Draws continuous lines between points @{@var{xdat}[i], @var{ydat}[i], @var{zdat}[i]@}. If array @var{xdat} is not specified then its an automatic array is used with values equidistantly distributed along x. If array @var{zdat} is not specified then @var{zdat}[i] = @var{zval} is used (the default is at the bottom of the bounding box). See also @code{tens, area, step, stem, tube, mark, error, belt}. @sref{Plot sample} -+@end deffn -+ -+@deffn {MGL command} tens ydat cdat ['stl'='' @code{zval=nan}] -+@deffnx {MGL command} tens xdat ydat cdat ['stl'='' @code{zval=nan}] -+@deffnx {MGL command} tens xdat ydat zdat cdat ['stl'=''] -+Draws continuous lines between points @{@var{xdat}[i], @var{ydat}[i], @var{zdat}[i]@} with color defined by @var{cdat}[i] (look like tension plot). If array @var{xdat} is not specified then its an automatic array is used with values equidistantly distributed along x. If array @var{zdat} is not specified then @var{zdat}[i] = @var{zval} is used (the default is at the bottom of the bounding box). See also @code{plot, mesh, fall}. @sref{Tens sample} -+@end deffn -+ -+@deffn {MGL command} area ydat ['stl'='' @code{zval=nan}] -+@deffnx {MGL command} area xdat ydat ['stl'='' @code{zval=nan}] -+@deffnx {MGL command} area xdat ydat zdat ['stl'=''] -+Draws continuous lines between points @{@var{xdat}[i], @var{ydat}[i], @var{zdat}[i]@} and fills it down to axis (to axis plane in 3D). If array @var{xdat} is not specified then its an automatic array is used with values equidistantly distributed along x. If array @var{zdat} is not specified then @var{zdat}[i] = @var{zval} is used (the default is at the bottom of the bounding box). See also @code{plot, bars, stem, region}. @sref{Area sample} -+@end deffn -+ -+@deffn {MGL command} region fdat gdat ['stl'='' @code{inside=off}] -+@deffnx {MGL command} region xdat fdat gdat ['stl'='' @code{inside=off}] -+Fills area between curves @{@var{xdat}[i], @var{fdat}[i]@} and @{@var{xdat}[i], @var{gdat}[i]@}. If array @var{xdat} is not specified then its an automatic array is used with values equidistantly distributed along x. Parameter @code{inside=off} set to fill are with y12}). See also @code{dens, cont, contd, axial, contf[xyz]}. @sref{ContF sample} -+@end deffn -+ -+@deffn {MGL command} contf zdat ['sch'='' @code{num=7 zval=nan}] -+@deffnx {MGL command} contf xdat ydat zdat ['sch'='' @code{num=7 zval=nan}] -+The same as previous one with vector @var{vdat} of @var{num}-th elements equidistantly distributed in color range (see, @code{caxis}). -+@end deffn -+ -+@deffn {MGL command} contd vdat zdat ['sch'='' @code{zval=nan}] -+@deffnx {MGL command} contd vdat xdat ydat zdat ['sch'='' @code{zval=nan}] -+Draws solid (or filled) contours for surface specified parametrically @{@var{xdat}[i,j], @var{ydat}[i,j], @var{zdat}[i,j]@} at @var{z} = @var{zVal} (or for @var{z}=@var{vdat}[k] if @code{zval=nan}) with manual colors. Contours are plotted for @var{zdat}[i,j]=@var{vdat}[k] for all k (must be @code{vdat.nx>2}). The color of k-th contour is @code{sch[k%strlen(sch)]}. See also @code{dens, cont, contf}. @sref{ContD sample} -+@end deffn -+ -+@deffn {MGL command} contd zdat ['sch'='' @code{num=7 zval=nan}] -+@deffnx {MGL command} contd xdat ydat zdat ['sch'='' @code{num=7 zval=nan}] -+The same as previous one with vector @var{vdat} of @var{num}-th elements equidistantly distributed in color range (see, @code{caxis}). -+@end deffn -+ -+@deffn {MGL command} axial vdat zdat ['sch'=''] -+@deffnx {MGL command} axial vdat xdat ydat zdat ['sch'=''] -+Draws surface which is result of contour plot rotation surface specified parametrically @{@var{xdat}[i,j], @var{ydat}[i,j], @var{zdat}[i,j]@}. Contours are plotted for @var{zdat}[i,j]=@var{vdat}[k] for all k. If string @var{sch} have symbol @samp{#} then wire plot is produced. If string @var{sch} contain symbols @samp{x}, @samp{y} or @samp{z} then rotation axis @code{axialdir} will be set to specified direction. If string @var{sch} have symbol @samp{#} then wire plot is produced. See also @code{cont, contf, torus, surf3}. @sref{Axial sample} -+@end deffn -+ -+@deffn {MGL command} axial zdat ['sch'='' @code{num=3}] -+@deffnx {MGL command} axial xdat ydat zdat ['sch'='' @code{num=3}] -+The same as previous one with vector @var{vdat} of @var{num}-th elements equidistantly distributed in color range (see, @code{caxis}). -+@end deffn -+ -+@deffn {MGL command} grid zdat ['sch'='' @code{zval=nan}] -+@deffnx {MGL command} grid xdat ydat zdat ['sch'='' @code{zval=nan}] -+Draws grid lines for density plot of surface specified parametrically @{@var{xdat}[i,j], @var{ydat}[i,j], @var{zdat}[i,j]@} at @var{z} = @var{zVal}. See also @code{dens, cont, contf}. -+@end deffn -+ -+ -+@c ################################################################## -+@node 3D plotting (MGL), Dual plotting (MGL), 2D plotting (MGL), MGL interface -+@section 3D plotting (MGL) -+@cindex surf3 -+@cindex dens3 -+@cindex cont3 -+@cindex conta -+@cindex densa -+@cindex grid3 -+@cindex grida -+@cindex cloud -+@cindex contf3 -+@cindex contfa -+@cindex beam -+ -+These commands perform plotting of 3D data. 3D means that data depend from 3 independent parameters like matrix @math{f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l}. There are 4 generally different types of data representations: isosurface or surface of constant value (Surf3), density plot at slices (Dens3), contour lines plot at slices (Cont3), solid contours plot at slices (ContF3) and cloud-like plot (Cloud). Surf3, Cont3 and ContF3 commands have variants for automatic and manual selection of level values for surfaces/contours. Also there are commands for plotting data grid lines according to the data format (Grid3) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. -+ -+String paramter @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). If array @var{xdat}, @var{ydat}, @var{zdat} is not specified then its an automatic arrays are used with values equidistantly distributed along x, y, z. -+ -+ -+@deffn {MGL command} surf3 adat @code{val} ['sch'=''] -+@deffnx {MGL command} surf3 xdat ydat zdat adat @code{val} ['sch'=''] -+Draws isosurface plot for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]) at @var{a}(x,y,z)=@var{val}. If string contain @samp{#} then wire plot is produced. See also @code{cloud, dens3, surf3c, surf3a, axial}. @sref{Surf3 sample} -+@end deffn -+ -+@deffn {MGL command} surf3 adat ['sch'='' @code{num=5}] -+@deffnx {MGL command} surf3 xdat ydat zdat adat ['sch'='' @code{num=5}] -+Draws @var{num}-th uniformly distributed in color range (see @code{caxis}) isosurfaces for 3d data specified parametrically. -+@end deffn -+ -+@deffn {MGL command} dens3 adat 'dir' [@code{sval=-1} 'sch'=''] -+@deffnx {MGL command} dens3 xdat ydat zdat adat 'dir' [@code{sval=-1} 'sch'=''] -+Draws density plot for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]). Density is plotted at slice @var{sval} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. If string @var{stl} have symbol @samp{#} then grid lines are drawn. See also @code{cont3, contf3, dens, grid3}. @sref{Dens3 sample} -+@end deffn -+ -+@deffn {MGL command} densa adat ['sch'=''] -+@deffnx {MGL command} densa xdat ydat zdat adat ['sch'=''] -+Draws density plots at all central slices of the 3d data specified parametrically. -+@end deffn -+ -+@deffn {MGL command} cont3 vdat adat 'dir' [@code{sval=-1} 'sch'=''] -+@deffnx {MGL command} cont3 vdat xdat ydat zdat adat 'dir' [@code{sval=-1} 'sch'=''] -+Draws contour plot for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]). Contours are plotted for values specified in array @var{vdat} at slice @var{sval} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. If string @var{stl} have symbol @samp{#} then grid lines are drawn. If string @var{stl} contain 't' (or 'T') symbol then contour labels will be drawn below (or above) the contours. See also @code{dens3, contf3, cont, grid3}. @sref{Cont3 sample} -+@end deffn -+ -+@deffn {MGL command} cont3 adat 'dir' [@code{sval=-1} 'sch'='' @code{num=7}] -+@deffnx {MGL command} cont3 xdat ydat zdat adat 'dir' [@code{sval=-1} 'sch'='' @code{num=7}] -+The same as previous one with vector @var{vdat} of @var{num}-th elements equidistantly distributed in color range (see @code{caxis}). -+@end deffn -+ -+@deffn {MGL command} conta adat ['sch'='' @code{num=7}] -+@deffnx {MGL command} conta xdat ydat zdat adat ['sch'='' @code{num=7}] -+Draws contour plots at all central slices of the 3d data specified parametrically. -+@end deffn -+ -+@deffn {MGL command} contf3 vdat adat 'dir' [@code{sval=-1} 'sch'=''] -+@deffnx {MGL command} contf3 vdat xdat ydat zdat adat 'dir' [@code{sval=-1} 'sch'=''] -+Draws solid contour plot for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]). Contours are plotted for values specified in array @var{vdat} at slice @var{sval} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. If string @var{stl} have symbol @samp{#} then grid lines are drawn. See also @code{dens3, cont3, contf, grid3}. @sref{ContF3 sample} -+@end deffn -+ -+@deffn {MGL command} contf3 adat 'dir' [@code{sval=-1} 'sch'='' @code{num=7}] -+@deffnx {MGL command} contf3 xdat ydat zdat adat 'dir' [@code{sval=-1} 'sch'='' @code{num=7}] -+The same as previous one with vector @var{vdat} of @var{num}-th elements equidistantly distributed in color range (see @code{caxis}). -+@end deffn -+ -+@deffn {MGL command} contfa adat ['sch'='' @code{num=7}] -+@deffnx {MGL command} contfa xdat ydat zdat adat ['sch'='' @code{num=7}] -+Draws solid contour plots at all central slices of the 3d data specified parametrically. -+@end deffn -+ -+@deffn {MGL command} grid3 adat 'dir' [@code{sval=-1} 'sch'=''] -+@deffnx {MGL command} grid3 xdat ydat zdat adat 'dir' [@code{sval=-1} 'sch'=''] -+Draws grid for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]). Grid is plotted at slice @var{sval} in @var{dir}=@{@samp{x}, @samp{y}, @samp{z}@} direction. See also @code{cont3, contf3, dens, grid3}. @sref{Dens3 sample} -+@end deffn -+ -+@deffn {MGL command} grida adat ['sch'=''] -+@deffnx {MGL command} grida xdat ydat zdat adat ['sch'=''] -+Draws grids at all central slices of the 3d data specified parametrically. -+@end deffn -+ -+@deffn {MGL command} cloud adat ['sch'=''] -+@deffnx {MGL command} cloud xdat ydat zdat adat ['sch'=''] -+Draws cloud for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]). This plot is a set of cubes with color and transparency proportional to value of @var{adat}. The resulting plot is like cloud -- low value is transparent but higher ones are not. The number of plotting cells depend on @code{meshnum}. Command @var{alpha} changes the overall transparency of plot. See also @code{surf3}. @sref{CloudQ sample} -+@end deffn -+ -+@deffn {MGL command} beam tr g1 g2 adat @code{rval} ['sch'='' @code{flag=0 num=3}] -+Draws @var{num}-th uniformly distributed in color range (see @code{caxis}) isosurfaces for 3d array @var{adat}. This is special kind of plot for @var{adat} specified in accompanied coordinates along curve @var{tr} with orts @var{g1}, @var{g2} and with transverse scale @var{rval}. Variable @var{flag} is bitwise: @samp{0x1} - draw in accompanied (not laboratory) coordinates; @samp{0x2} - draw projection to @math{\rho-z} plane; @samp{0x4} - draw normalized in each slice field. The x-size of data arrays @var{tr}, @var{g1}, @var{g2} must be nx>2. The y-size of data arrays @var{tr}, @var{g1}, @var{g2} and z-size of the data array @var{a} must be equal. @xref{Surf3}. -+@end deffn -+ -+ -+@c ################################################################## -+@node Dual plotting (MGL), Vector fields (MGL), 3D plotting (MGL), MGL interface -+@section Dual plotting (MGL) -+@cindex surfc -+@cindex surf3c -+@cindex surfa -+@cindex surf3a -+@cindex map -+@cindex tile -+@cindex stfa -+ -+These plotting commands draw @emph{two matrix} simultaneously. There are 5 generally different types of data representations: surface or isosurface colored by other data (SurfC, Surf3C), surface or isosurface transpared by other data (SurfA, Surf3A), tiles with variable size (TileS), mapping diagram (Map), STFA diagram (STFA). Surf3A and Surf3C have variants for automatic and manual selection of level values for isosurfaces. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. -+ -+String paramter @var{sch} sets the color scheme (@pxref{Color scheme}). Previous color scheme is used by default. Arrays @var{x}, @var{y}, @var{z} can be vectors (not 3d arrays as @var{a}). If array @var{xdat}, @var{ydat}, @var{zdat} is not specified then its an automatic arrays are used with values equidistantly distributed along x, y, z. -+ -+@deffn {MGL command} surfc zdat cdat ['sch'=''] -+@deffnx {MGL command} surfc xdat ydat zdat cdat ['sch'=''] -+Draws surface specified parametrically @{@var{xdat}[i,j], @var{ydat}[i,j], @var{zdat}[i,j]@} and color it by matrix @var{cdat}[i,j]. See also @code{surf, surfa, surf3c}. @sref{SurfC sample} -+@end deffn -+ -+@deffn {MGL command} surf3c adat cdat @code{val} ['sch'=''] -+@deffnx {MGL command} surf3c xdat ydat zdat adat cdat @code{val} ['sch'=''] -+Draws isosurface plot for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as @code{surf3} command but the color of isosurface depends on values of array @var{cdat}. If string contain @samp{#} then wire plot is produced. See also @code{surf3, sur3a, surfc}. @sref{Surf3C sample} -+@end deffn -+ -+@deffn {MGL command} surf3c adat cdat ['sch'='' @code{num=5}] -+@deffnx {MGL command} surf3c xdat ydat zdat adat cdat ['sch'='' @code{num=5}] -+Draws @var{num}-th uniformly distributed in color range (see @code{caxis}) isosurfaces for 3d data specified parametrically. -+@end deffn -+ -+@deffn {MGL command} surfa zdat cdat ['sch'=''] -+@deffnx {MGL command} surfa xdat ydat zdat cdat ['sch'=''] -+Draws surface specified parametrically @{@var{xdat}[i,j], @var{ydat}[i,j], @var{zdat}[i,j]@} and transparent it by matrix @var{cdat}[i,j]. See also @code{surf, surfc, surf3a, tile}. @sref{SurfA sample} -+@end deffn -+ -+@deffn {MGL command} surf3a adat cdat @code{val} ['sch'=''] -+@deffnx {MGL command} surf3a xdat ydat zdat adat cdat @code{val} ['sch'=''] -+Draws isosurface plot for 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]) at @var{a}(x,y,z)=@var{val}. It is mostly the same as @code{surf3} command but the transparency of isosurface depends on values of array @var{cdat}. If string contain @samp{#} then wire plot is produced. See also @code{surf3, sur3c, surfa}. @sref{Surf3A sample} -+@end deffn -+ -+@deffn {MGL command} surf3a adat cdat ['sch'='' @code{num=5}] -+@deffnx {MGL command} surf3a xdat ydat zdat adat cdat ['sch'='' @code{num=5}] -+Draws @var{num}-th uniformly distributed in color range (see @code{caxis}) isosurfaces for 3d data specified parametrically. -+@end deffn -+ -+@deffn {MGL command} tile zdat rdat ['sch'=''] -+@deffnx {MGL command} tile xdat ydat zdat rdat ['sch'=''] -+Draws horizontal tiles for surface specified parametrically @{@var{xdat}[i,j], @var{ydat}[i,j], @var{zdat}[i,j]@}. It is mostly the same as @code{tile} but the size of tiles is determined by @var{rdat} array. See also @code{surfa, tile}. @sref{TileS sample} -+@end deffn -+ -+@deffn {MGL command} map udat vdat ['sch'='' @code{pnts=on}] -+@deffnx {MGL command} map xdat ydat udat vdat ['sch'='' @code{pnts=on}] -+Draws mapping plot for matrixes @{@var{udat}, @var{vdat} @} which parametrically depend on coordinates @var{xdat}, @var{ydat}. The previous position of the cell (point) is marked by color. Height is proportional to Jacobian(udat,vdat). This plot is like Arnold diagram ???. If @code{pnts=off} then face is drawn otherwise the color ball at matrix knots are drawn. The size of @var{udat} and @var{vdat} must be the same. @sref{Map sample} -+@end deffn -+ -+@deffn {MGL command} stfa re im @code{dn} ['sch'='' @code{pnts=on}] -+@deffnx {MGL command} stfa xdat ydat re im @code{dn} ['sch'='' @code{pnts=on}] -+Draws spectrogram of complex array @var{re}+i*@code{im} for Fourier size of @var{dn} points at plane @var{z=zVal}. Parameter @var{dn} is arbitrary even integer. For example in 1D case, result is density plot of data @math{res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn} with size @{int(nx/dn), dn, ny@}. -+@end deffn -+ -+ -+ -+ -+@c ################################################################## -+@node Vector fields (MGL), Other plotting (MGL), Dual plotting (MGL), MGL interface -+@section Vector fields (MGL) -+@cindex vectc -+@cindex vect -+@cindex flow -+@cindex pipe -+@cindex traj -+@cindex dew -+ -+These commands perform plotting of 2D and 3D vector fields. There are 6 generally different types of vector fields representations: simple vector field (Vect), vector field with coloring (VectC), vector field by dew-drops (Dew), flow threads (Flow), flow pipes (Pipe), vectors along a curve (Traj). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+The color is specified by the string argument @var{sch}. Previous color scheme is used by default. Parameter @var{flag} setup the hachures (arrows). It is compination of vlaues: @code{MGL_VEC_COL=1} for drawing bi-color arrow, @code{MGL_VEC_LEN=2} for drawing fixed length arrows, @code{MGL_VEC_DOT=16} for drawing hachures with dots instead of arrows, @code{MGL_VEC_END=4} for drawing arrows to the cell point, @code{MGL_VEC_MID=8} for drawing arrows with center at cell point. -+ -+The size of @var{udat}, @var{vdat} and @var{wdat} must be equal. The minor dimensions of arrays @var{xdat}, @var{ydat}, @var{zdat} and @var{udat} must be equal too. Arrays @var{xdat}, @var{ydat} and @var{zdat} can be vectors (not matrices as @var{udat}). The graphics is plotted for each z slice of @var{udat}, @var{vdat} for 2D case. -+ -+@deffn {MGL command} traj xdat ydat udat vdat ['sch'='' @code{zval=nan len=0}] -+@deffnx {MGL command} traj xdat ydat zdat udat vdat wdat ['sch'='' @code{len=0}] -+Draws vectors @{@var{udat}, @var{vdat}, @var{wdat}@} along a curve @var{xdat}, @var{ydat}, @var{zdat}. The length and color of arrows are proportional to @math{\sqrt@{udat^2+vdat^2+wdat^2@}}. See also @code{vect}. @sref{Traj sample} -+@end deffn -+ -+@deffn {MGL command} vect udat vdat ['sch'='' @code{zval=nan flag=0}] -+@deffnx {MGL command} vect xdat ydat udat vdat ['sch'='' @code{zval=nan flag=0}] -+Draws plane vector field plot for the field @{@var{udat}, @var{vdat}@} depending parametrically on coordinates @var{xdat}, @var{ydat} at level @var{z=zVal}. The length and color of arrows are proportional to @math{\sqrt@{udat^2+vdat^2@}}. The number of hachures depend on @var{meshnum}. See also @code{vectc, flow, pipe, dew}. @sref{Vect sample} -+@end deffn -+ -+@deffn {MGL command} vect udat vdat wdat ['sch'='' @code{flag=0}] -+@deffnx {MGL command} vect xdat ydat zdat udat vdat wdat ['sch'='' @code{flag=0}] -+This is 3D version of the previous command. Here arrays @var{udat}, @var{vdat}, @var{wdat} must be 3-ranged tensors with equal sizes and the length and color of arrows are proportional to @math{\sqrt@{udat^2+vdat^2+wdat^2@}}. @sref{Vect 3D sample} -+@end deffn -+ -+@deffn {MGL command} vectc udat vdat ['sch'='' @code{zval=nan}] -+@deffnx {MGL command} vectc xdat ydat udat vdat ['sch'='' @code{zval=nan}] -+Draws plane vector field plot for the field @{@var{udat}, @var{vdat}@} depending parametrically on coordinates @var{xdat}, @var{ydat} at level @var{z=zVal}. The color of hachures is proportional to @math{\sqrt@{udat^2+vdat^2@}}. The number of hachures depend on @var{meshnum}. See also @code{vect, flow, pipe, dew}. @sref{VectC sample} -+@end deffn -+ -+@deffn {MGL command} vectc udat vdat wdat ['sch'=''] -+@deffnx {MGL command} vectc xdat ydat zdat udat vdat wdat ['sch'=''] -+This is 3D version of the previous command. Here arrays @var{udat}, @var{vdat}, @var{wdat} must be 3-ranged tensors with equal sizes and the color of hachures is proportional to @math{\sqrt@{udat^2+vdat^2+wdat^2@}}. @sref{VectC 3D sample} -+@end deffn -+ -+@deffn {MGL command} vectl udat vdat ['sch'='' @code{zval=nan}] -+@deffnx {MGL command} vectl xdat ydat udat vdat ['sch'='' @code{zval=nan}] -+Draws plane vector field plot for the field @{@var{udat}, @var{vdat}@} depending parametrically on coordinates @var{xdat}, @var{ydat} at level @var{z=zVal}. The length of hachures is proportional to @math{\sqrt@{udat^2+vdat^2@}}. The number of hachures depend on @var{meshnum}. See also @code{vectc, flow, pipe, dew}. @sref{Vect sample} -+@end deffn -+ -+@deffn {MGL command} vectl udat vdat wdat ['sch'=''] -+@deffnx {MGL command} vectl xdat ydat zdat udat vdat wdat ['sch'=''] -+This is 3D version of the previous command. Here arrays @var{udat}, @var{vdat}, @var{wdat} must be 3-ranged tensors with equal sizes and the length of hachures is proportional to @math{\sqrt@{udat^2+vdat^2+wdat^2@}}. @sref{Vect 3D sample} -+@end deffn -+ -+@deffn {MGL command} dew udat vdat ['sch'='' @code{zval=nan}] -+@deffnx {MGL command} dew xdat ydat udat vdat ['sch'='' @code{zval=nan}] -+Draws dew-drops for plane vector field @{@var{udat}, @var{vdat}@} depending parametrically on coordinates @var{xdat}, @var{ydat} at level @var{z=zVal}. The color of drops is proportional to @math{\sqrt@{udat^2+vdat^2@}}. The number of drops depend on @var{meshnum}. Note that this is very expensive plot in memory usage and creation time! See also @code{vectc}. @sref{Dew sample} -+@end deffn -+ -+@deffn {MGL command} flow udat vdat ['sch'='' @code{num=5 zval=nan}] -+@deffnx {MGL command} flow xdat ydat udat vdat ['sch'='' @code{num=5 zval=nan}] -+Draws plane flow threads for the vector field @{@var{udat}, @var{vdat}@} depending parametrically on coordinates @var{xdat}, @var{ydat} at level @var{z=zVal}. Number of threads is proportional to @var{num}. The color of lines is proportional to @math{\sqrt@{udat^2+vdat^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). See also @code{vect, vectc, pipe}. @sref{Flow sample} -+@end deffn -+ -+@deffn {MGL command} flow udat vdat wdat ['sch'='' @code{num=3}] -+@deffnx {MGL command} flow xdat ydat zdat udat vdat wdat ['sch'='' @code{num=3}] -+This is 3D version of the previous command. Here arrays @var{udat}, @var{vdat}, @var{wdat} must be 3-ranged tensors with equal sizes and the color is proportional to @math{\sqrt@{udat^2+vdat^2+wdat^2@}}. @sref{Flow 3D sample} -+@end deffn -+ -+@deffn {MGL command} flow @code{x0 y0} udat vdat ['sch'='' @code{zval=nan}] -+@deffnx {MGL command} flow @code{x0 y0} xdat ydat udat vdat ['sch'='' @code{zval=nan}] -+Draws plane flow threads for the vector field @{@var{udat}, @var{vdat}@} depending parametrically on coordinates @var{xdat}, @var{ydat} from point @{@var{x0}, @var{y0}@} at level @var{z=zVal}. The color of lines is proportional to @math{\sqrt@{udat^2+vdat^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). See also @code{vect, vectc, pipe}. @sref{Flow sample} -+@end deffn -+ -+@deffn {MGL command} flow @code{x0 y0 z0} udat vdat wdat ['sch'=''] -+@deffnx {MGL command} flow @code{x0 y0 z0} xdat ydat zdat udat vdat wdat ['sch'=''] -+Draws flow thread from point @{@var{x0}, @var{y0}, @var{z0}@}. Arrays @var{udat}, @var{vdat}, @var{wdat} must be 3-ranged tensors with equal sizes and the color is proportional to @math{\sqrt@{udat^2+vdat^2+wdat^2@}}. @sref{Flow 3D sample} -+@end deffn -+ -+ -+@deffn {MGL command} pipe udat vdat ['sch'='' @code{r0=0.05 num=5 zval=nan}] -+@deffnx {MGL command} pipe xdat ydat udat vdat ['sch'='' @code{r0=0.05 num=5 zval=nan}] -+Draws plane flow pipes for the vector field @{@var{udat}, @var{vdat}@} depending parametrically on coordinates @var{xdat}, @var{ydat} at level @var{z=zVal}. Number of pipes is proportional to @var{num}. The color of pipes is proportional to @math{\sqrt@{udat^2+vdat^2@}}. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). Parameter @var{r0} set the base pipe radius. If @var{r0}<0 then pipe radius is inverse proportional to amplitude. The size of @var{ax} and @var{ay} must be equal. See also @code{vect, vectc, pipe}. @sref{Flow sample} -+@end deffn -+ -+@deffn {MGL command} pipe udat vdat wdat ['sch'='' @code{r0=0.05 num=3}] -+@deffnx {MGL command} pipe xdat ydat zdat udat vdat wdat ['sch'='' @code{r0=0.05 num=3}] -+This is 3D version of the previous command. Here arrays @var{udat}, @var{vdat}, @var{wdat} must be 3-ranged tensors with equal sizes and the color is proportional to @math{\sqrt@{udat^2+vdat^2+wdat^2@}}. @sref{Flow 3D sample} -+@end deffn -+ -+ -+@c ################################################################## -+@node Other plotting (MGL), Nonlinear fitting (MGL), Vector fields (MGL), MGL interface -+@section Other plotting (MGL) -+@cindex cont[xyz] -+@cindex dens[xyz] -+@cindex contf[xyz] -+@cindex dots -+@cindex crust -+@cindex triplot -+@cindex fplot -+@cindex fsurf -+ -+ -+These commands perform miscelaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular mesh (TriPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]), simple plot (SimplePlot). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. @xref{Color scheme}. -+ -+@deffn {MGL command} densx dat ['sch'='' @code{val=nan}] -+@deffnx {MGL command} densy dat ['sch'='' @code{val=nan}] -+@deffnx {MGL command} densz dat ['sch'='' @code{val=nan}] -+These plotting commands draw density plot in x, y or z plain. If @var{dat} is a tensor (3-dimensional data) then interpolation to a given @var{val} is performed. These commands are useful for creating projections of the 3D data array to the bounding box. See also @code{cont[xyz], contf[xyz], dens}. @sref{Dens projection sample} -+@end deffn -+ -+@deffn {MGL command} contx dat ['sch'='' @code{val=nan num=7}] -+@deffnx {MGL command} conty dat ['sch'='' @code{val=nan num=7}] -+@deffnx {MGL command} contz dat ['sch'='' @code{val=nan num=7}] -+These plotting commands draw contour lines in x, y or z plain. If @var{dat} is a tensor (3-dimensional data) then interpolation to a given @var{val} is performed. These commands are useful for creating projections of the 3D data array to the bounding box. See also @code{dens[xyz], contf[xyz], cont}. @sref{Cont projection sample} -+@end deffn -+ -+@deffn {MGL command} contfx dat ['sch'='' @code{val=nan num=7}] -+@deffnx {MGL command} contfy dat ['sch'='' @code{val=nan num=7}] -+@deffnx {MGL command} contfz dat ['sch'='' @code{val=nan num=7}] -+These plotting commands draw solid contours in x, y or z plain. If @var{dat} is a tensor (3-dimensional data) then interpolation to a given @var{val} is performed. These commands are useful for creating projections of the 3D data array to the bounding box. See also @code{dens[xyz], cont[xyz], contf}. -+@end deffn -+ -+@deffn {MGL command} dots xdat ydat zdat ['sch'=''] -+@deffnx {MGL command} dots xdat ydat zdat adat ['sch'=''] -+Draws the arbitrary placed points @{@var{xdat}[i], @var{ydat}[i], @var{zdat}[i]@}. Variable @var{adat}[i] set transparency for dots. See also @code{crust, mark, plot}. @sref{Dots sample} -+@end deffn -+ -+@deffn {MGL command} crust xdat ydat zdat ['sch'=''] -+Reconstructs and draws the surface for arbitrary placed points @{@var{xdat}[i], @var{ydat}[i], @var{zdat}[i]@}. If string contain @samp{#} then wire plot is produced. See also @code{dots, triplot}. @sref{Crust sample} -+@end deffn -+ -+@deffn {MGL command} triplot idat xdat ydat ['sch'='' @code{zval=nan}] -+@deffnx {MGL command} triplot idat xdat ydat zdat ['sch'=''] -+@deffnx {MGL command} triplot idat xdat ydat zdat cdat ['sch'=''] -+Draws the surface of triangles. Triangle vertexes are set by indexes @var{idat} of data points @{@var{xdat}[i], @var{ydat}[i], @var{zdat}[i]@}. If string contain @samp{#} then wire plot is produced. First dimensions of @var{idat} must be 3 or greater. See also @code{dots, crust}. Parameter @var{cdat} set the colors of triangles (if @var{idat}.ny=@var{cdat}.nx) or colors of vertexes (if @var{xdat}.nx=@var{cdat}.nx). -+@end deffn -+ -+@deffn {MGL command} fplot 'y(x)' ['pen'='' @code{zval=nan num=100}] -+Draws command function @samp{y(x)} at plane z=@var{zval} where @samp{x} variable is changed in @code{xrange}. You do not need to create the data arrays to plot it. The parameter @var{num} set the minimal number of points along coordinate(s) for plots. See also @code{plot}. -+@end deffn -+ -+@deffn {MGL command} fplot 'x(t)' 'y(t)' 'z(t)' ['pen'='' @code{num=100}] -+Draws command parametrical curve @{@samp{x(t)}, @samp{y(t)}, @samp{z(t)}@} where @samp{t} variable is changed in range [0, 1]. You do not need to create the data arrays to plot it. The parameter @var{num} set the minimal number of points along coordinate(s) for plots. See also @code{plot}. -+@end deffn -+ -+@deffn {MGL command} fsurf 'z(x,y)' ['sch'='' @code{num=100}] -+Draws command surface for function @samp{z(x,y)} where @samp{x}, @samp{y} variable are changed in @code{xrange, yrange}. You do not need to create the data arrays to plot it. The parameter @var{num} set the minimal number of points along coordinate(s) for plots. See also @code{surf}. -+@end deffn -+ -+@deffn {MGL command} fsurf 'x(u,v)' 'y(u,v)' 'z(u,v)' ['sch'='' @code{num=100}] -+Draws command parametrical surface @{@samp{x(u,v)}, @samp{y(u,v)}, @samp{z(u,v)}@} where @samp{u}, @samp{v} variable are changed in range [0, 1]. You do not need to create the data arrays to plot it. The parameter @var{num} set the minimal number of points along coordinate(s) for plots. See also @code{surf}. -+@end deffn -+ -+ -+@c ################################################################## -+@node Nonlinear fitting (MGL), Data create (MGL), Other plotting (MGL), MGL interface -+@section Nonlinear fitting (MGL) -+@cindex fit -+@cindex fits -+@cindex putsfit -+ -+These commands fit data to formula. Fitting goal is to find formula parameters for the best fit the data points, i.e. to minimize the sum @math{\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2}. At this, approximation command @samp{f} can depend only on one argument @samp{x} (1D case), on two arguments @samp{x,y} (2D case) and on three arguments @samp{x,y,z} (3D case). The command @samp{f} also may depend on parameters. Normally the list of fitted parameters is specified by @var{var} string (like, @samp{abcd}). Usually user should supply initial values for fitted parameters by @var{ini} variable. But if he/she don't supply it then the zeros are used. -+ -+Commands @code{fit} and @code{fits} do not draw the obtained data themselves. They fill the data @var{out} by formula @samp{f} with found coefficients. At this, the @samp{x,y,z} coordinates are equidistantly distributed in the bounding box. Number of points in @var{out} is selected as maximal value of @var{out} size or 100. Also you may print the last formula with found coefficients by @code{putsfit} command. @sref{Fitting sample} -+ -+The dimensions of arrays must be at least the same as the number of specified arrays @var{xdat}, @var{ydat}, @var{zdat}. Also the fitting only along specified directions will be performed (for example, along x and y if only @var{xdat} and @var{ydat} are specified). If array @var{xdat} is not specified then its an automatic array is used with values equidistantly distributed along x. -+ -+ -+@deffn {MGL command} fits adat sdat 'func' 'var' [ini=0] -+@deffnx {MGL command} fits xdat adat sdat 'func' 'var' [ini=0] -+@deffnx {MGL command} fits xdat ydat adat sdat 'func' 'var' [ini=0] -+@deffnx {MGL command} fits xdat ydat zdat adat sdat 'func' 'var' [ini=0] -+Fit data along x-, y- and z-directions for 1d-,2d- or 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]) with weight factor @var{sdat}[i,j,k]. -+@end deffn -+ -+@deffn {MGL command} fit adat 'func' 'var' [ini=0] -+@deffnx {MGL command} fit xdat adat 'func' 'var' [ini=0] -+@deffnx {MGL command} fit xdat ydat adat 'func' 'var' [ini=0] -+@deffnx {MGL command} fit xdat ydat zdat adat 'func' 'var' [ini=0] -+Fit data along x-, y- and z-directions for 1d-,2d- or 3d array specified parametrically @var{adat}[i,j,k](@var{xdat}[i,j,k], @var{ydat}[i,j,k], @var{zdat}[i,j,k]) with weight factor =1. -+@end deffn -+ -+@deffn {MGL command} putsfit @code{x y} ['pre'='' 'fnt'='' @code{size=-1}] -+Print last fitted formula with found coefficients (as numbers) at position @{@var{x}, @var{y}@}. The string @var{pre} will be printed before formula. All other parameters are the same as in @ref{Text printing (MGL)}. -+@end deffn -+ -+ -+@c ################################################################## -+@node Data create (MGL), Data filling (MGL), Nonlinear fitting (MGL), MGL interface -+@section Data create (MGL) -+@cindex new -+@cindex var -+@cindex list -+@cindex delete -+@cindex copy -+@cindex column -+@cindex set_id -+ -+@deffn {MGL command} new dat [@code{nx=1 ny=1 nz=1}] -+Creates or recreates the array @var{dat} with specified size and fills it by zero. This command does nothing if one of parameters @var{nx}, @var{ny}, @var{nz} is zero or negative. -+@end deffn -+ -+@deffn {MGL command} var dat @code{num v1 [v2=nan]} -+Creates new variable with name dat for one-dimensional array of size num. Array elements are equidistantly distributed in range [@var{v1}, @var{v2}]. If @var{v2}=@code{nan} then @var{v2=v1} is used. -+@end deffn -+ -+@deffn {MGL command} list dat @code{v1 ...} -+Creates new variable with name @var{dat} and fills it by numeric values of command arguments @code{v1 ...}. Command can create one-dimensional and two-dimensional arrays with arbitrary values. For creating 2d array the user should use delimiter - which means that the following values lie in next row. Array sizes are [maximal of row sizes * number of rows]. For example, command @code{list 1 | 2 3} creates the array [1 0; 2 3]. Note, that the maximal number of arguments is 1000. -+@end deffn -+ -+@deffn {MGL command} list dat d1 ... -+Creates new variable with name @var{dat} and fills it by data values of arrays of command arguments @var{d1 ...}. Command can create two-dimensional or three-dimensional (if arrays in arguments are 2d arrays) arrays with arbitrary values. Minor dimensions of all arrays in arguments should be equal to dimensions of first array d1. In the opposite case the argument will be ignored. Note, that the maximal number of arguments is 1000. -+@end deffn -+ -+@deffn {MGL command} copy dat1 dat2 ['eq'='' @code{on_axis=on}] -+@deffnx {MGL command} copy dat1 @code{val} -+Creates new variable with name @var{dat1} and fills it by data values of array @var{dat2}. At this, if parameter @var{eq} is specified then the data will be modified by corresponding formula by the same way as in @code{fill} command (for @code{on_axis=on}) or in @code{modify} command (for @code{on_axis=off}). -+@end deffn -+ -+@deffn {MGL command} delete dat -+Deletes variable @var{dat} and makes its memory free. Can be useful for huge data arrays. -+@end deffn -+ -+@deffn {MGL command} set_id dat 'ids' -+Set the symbol id for data columns. The string must contain one symbol 'a'...'z' per column (without spaces). -+@end deffn -+ -+@deffn {MGL command} info dat [@code{detail=off}] -+Display information (sizes, maximum/minimum, momentums and so on) about the data dat. Show brief information by default (if @code{detail=off}). -+@end deffn -+ -+@deffn {MGL command} info 'text' -+Display @var{text} as information (warning). -+@end deffn -+ -+@c ------------------------------------------------------------------ -+@node Data filling (MGL), Rearrange data (MGL), Data create (MGL), MGL interface -+@section Data filling (MGL) -+@cindex fill -+@cindex modify -+ -+@deffn {MGL command} fill dat v1 v2 ['dir'='x'] -+Equidistantly fills the data values to range [@var{x1}, @var{x2}] in direction @var{dir}=@{@samp{x},@samp{y},@samp{z}@}. -+@end deffn -+ -+@deffn {MGL command} fill dat 'eq' [vdat=0 wdat=0] -+Command fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}, @samp{v}, @samp{w}. Coordinates @samp{x}, @samp{y}, @samp{z} are supposed to be normalized in @emph{bounding box} (in difference from @code{modify} commands). Variable @samp{u} is the original value of the array. Variables @samp{v} and @samp{w} are values of @var{vdat}, @var{wdat}. -+@end deffn -+ -+@deffn {MGL command} modify dat 'eq' [@code{dim=0}] -+Command fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in range [0,1]. Variable @samp{u} is the original value of the array. Modification will be fulfilled only for slices >=@var{dim}. -+@end deffn -+ -+@deffn {MGL command} modify dat 'eq' vdat [wdat=0] -+Command fills the value of array according to the formula in string @var{eq}. Formula is an arbitrary expression depending on variables @samp{x}, @samp{y}, @samp{z}, @samp{u}, @samp{v}, @samp{w}. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in range [0,1]. Variable @samp{u} is the original value of the array. Variables @samp{v} and @samp{w} are values of @var{vdat}, @var{wdat}. If optional data @var{vdat}, @var{wdat} (must be the same size as @var{dat}) are specified then variables @samp{v} and @samp{w} denote its values else they are zero. -+@end deffn -+ -+ -+@deffn {MGL command} put a @code{val [i=: j=: k=:]} -+Function sets value(s) of array a[@var{i}, @var{j}, @var{k}] = @var{val}. Negative indexes @var{i}, @var{j}, @var{k}=@samp{:} set the value @var{val} to whole range in corresponding direction(s). For example, @code{put a val : 0 :} sets a[i,0,j]=@var{val} for i=0...(a.nx-1), j=0...(a.nz-1). -+@end deffn -+ -+@deffn {MGL command} put a v [@code{i=: j=: k=:}] -+Function copies value(s) from array @var{v} to the range of array @var{a}. Negative indexes @var{i}, @var{j}, @var{k}=@samp{:} set the range in corresponding direction(s). At this minor dimensions of array @var{v} should be large than corresponding dimensions of array @var{a}. For example, @code{put a v : 0 :} sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(a.nx-1), j=0...(a.nz-1) and condition v.nx>=a.nx is true. -+@end deffn -+ -+ -+ -+@c ------------------------------------------------------------------ -+@node Rearrange data (MGL), File I/O (MGL), Data filling (MGL), MGL interface -+@section Rearrange data (MGL) -+@cindex rearrange -+@cindex extend -+@cindex transpose -+@cindex squeeze -+@cindex crop -+ -+@deffn {MGL command} rearrange dat @code{mx [my=0 mz=0]} -+Rearrange dimensions without changing data array so that resulting sizes should be @var{mx}*@var{my}*@var{mz} < nx*ny*nz. If some of parameter @var{my} or @var{mz} are zero then it will be selected to optimal fill of data array. For example, if @var{my}=0 then it will be change to @var{my}=nx*ny*nz/@var{mx} and @var{mz} will be 1. -+@end deffn -+ -+@deffn {MGL command} extend dat @code{n1 [n2=0]} -+Increase the dimensions of the data by inserting new (|@var{n1}|+1)-th slices after (for @var{n1}>0) or before (for @var{n1}<0) of existed one. It is possible to insert 2 dimensions simultaneously for 1d data by using parameter @var{n2}. Data to new slices is copy from existed one. For example, for @var{n1}>0 new array will be -+@iftex -+@math{a_{ij}^{new} = a_i^{old}} where j=0...@var{n1}. Correspondingly, for @var{n1}<0 new array will be @math{a_{ij}^{new} = a_j^{old}} where i=0...|@var{n1}|. -+@end iftex -+@ifnottex -+a_ij^new = a_i^old where j=0...@var{n1}. Correspondingly, for @var{n1}<0 new array will be a_ij^new = a_j^old where i=0...|@var{n1}|. -+@end ifnottex -+@end deffn -+ -+@deffn {MGL command} transpose dat ['dim'='yxz'] -+Transposes (shift order of) dimensions of the data. New order of dimensions is specified int string @var{dim}. This command may be useful also for the reading of one-dimensional data. -+@end deffn -+ -+@deffn {MGL command} squeeze dat, @code{rx [ry=1 rz=1]} -+Reduces the data size by excluding data elements which indexes are not divisible by @var{rx}, @var{ry}, @var{rz} correspondingly. -+@end deffn -+ -+@deffn {MGL command} crop dat @code{n1 n2} 'dir' -+Cuts off edges of the data @var{i}<@var{n1} and @var{i}>@var{n2} if @var{n2}>0 or @var{i}>@code{n[xyz]}-@var{n2} if @var{n2}<=0 along direction @var{dir}. -+@end deffn -+ -+@c ------------------------------------------------------------------ -+@node File I/O (MGL), Make another data (MGL), Rearrange data (MGL), MGL interface -+@section File I/O (MGL) -+@cindex read -+@cindex readhdf -+@cindex readmat -+@cindex readall -+@cindex save -+@cindex savehdf -+@cindex export -+@cindex import -+ -+@deffn {MGL command} read dat 'fname' -+Reads data from tab-separated text file with auto determining sizes of the data. -+@end deffn -+ -+@deffn {MGL command} read dat 'fname' @code{mx [my=1 mz=1]} -+Reads data from text file with specified data sizes. This command does nothing if one of parameters @var{mx}, @var{my} or @var{mz} is zero or negative. -+@end deffn -+ -+@deffn {MGL command} readmat dat 'fname' [@code{dim=2}] -+Read data from text file with size specified at beginning of the file by first @var{dim} numbers. At this, variable @var{dim} set data dimensions. -+@end deffn -+ -+@deffn {MGL command} readall dat 'templ' @code{v1 v2 [dv=1 slice=off]} -+Join data arrays from several text files. The file names are determined by function call @code{sprintf(fname,templ,val);}, where @var{val} changes from @var{v1} to @var{v2} with step @var{dv}. The data load one-by-one in the same slice if @var{slice}=@code{off} or as slice-by-slice if @var{slice}=@code{on}. -+@end deffn -+ -+@deffn {MGL command} readall dat 'templ' @code{[slice=off]} -+Join data arrays from several text files which filenames satisfied the template @var{templ} (for example, @var{templ}=@code{"t_*.dat"}). The data load one-by-one in the same slice if @var{slice}=@code{off} or as slice-by-slice if @var{slice}=@code{on}. -+@end deffn -+ -+@deffn {MGL command} save dat 'fname' -+Saves the whole data array to tab-separated text file. -+@end deffn -+ -+@deffn {MGL command} readhdf dat 'fname' 'dname' -+Reads data array named @var{dname} from HDF file @var{fname}. -+@end deffn -+@deffn {MGL command} savehdf dat 'fname' 'dname' -+Saves data array named @var{dname} from HDF file @var{fname}. -+@end deffn -+ -+@deffn {MGL command} import dat 'fname' 'sch' [@code{v1=0 v2=1}] -+Reads data from bitmap file. The RGB values of bitmap pixels are transformed to float values in range [@var{v1}, @var{v2}] using color scheme @var{sch} (@pxref{Color scheme}). -+@end deffn -+ -+@deffn {MGL command} export dat 'fname' 'sch' [@code{v1=0 v2=0}] -+Saves data matrix to bitmap file. The data values are transformed from range [@var{v1}, @var{v2}] to RGB pixels of bitmap using color scheme @var{sch} (@pxref{Color scheme}). If @var{v1}>=@var{v2} then the values of @var{v1}, @var{v2} are automatically determined as minimal and maximal value of the data array. -+@end deffn -+ -+@c ------------------------------------------------------------------ -+@node Make another data (MGL), Commands on direction (MGL), File I/O (MGL), MGL interface -+@section Make another data (MGL) -+@cindex subdata -+@cindex hist -+@cindex momentum -+@cindex sum -+@cindex max -+@cindex min -+@cindex combine -+@cindex evaluate -+@cindex resize -+ -+@deffn {MGL command} combine res adat bdat -+Returns direct multiplication of arrays (like, res[i,j] = adat[i]*bdat[j] and so on). -+@end deffn -+ -+@deffn {MGL command} evaluate res dat idat [@code{norm=on}] -+@deffnx {MGL command} evaluate res dat idat jdat [@code{norm=on}] -+@deffnx {MGL command} evaluate res dat idat jdat kdat [@code{norm=on}] -+Get array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data @var{idat}, @var{jdat}, @var{kdat}. Coordinates from @var{idat}, @var{jdat}, @var{kdat} are supposed to be normalized in range [0,1] (if @var{norm}=@code{true}) or in range [0,nx], [0,ny], [0,nz] correspondingly. -+@end deffn -+ -+@deffn {MGL command} hist res dat @code{num v1 v2 [nsub=0]} -+@deffnx {MGL command} hist res dat wdat @code{num v1 v2 [nsub=0]} -+Creates @var{num}-th points distribution @var{res} of the data values of @var{dat} in range [@var{v1}, @var{v2}]. Array @var{wdat} specifies weights of the data elements (all weight is 1 if @var{wdat} is not specified). Parameter @var{nsub} define the number of additional interpolated points (for smoothness of histogram). -+@end deffn -+ -+@deffn {MGL command} momentum res dat 'how' ['dir'='z'] -+Get momentum (1D-array) of the data along direction @var{dir}. String @var{how} contain kind of momentum. The momentum is defined like as -+@iftex -+@math{res_k = \sum_{ij} how(x_i,y_j,z_k) a_{ij}/\sum_{ij} a_{ij}} -+@end iftex -+@ifnottex -+res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij -+@end ifnottex -+if @var{var}=@samp{z} and so on. Coordinates @samp{x}, @samp{y}, @samp{z} are data indexes normalized in range [0,1]. -+@end deffn -+ -+@deffn {MGL command} sum res dat 'dir' -+Gets array which is the result of summation in given direction or direction(s). -+@end deffn -+@deffn {MGL command} max res dat 'dir' -+Gets array which is the maximal data values in given direction or direction(s). -+@end deffn -+@deffn {MGL command} min res dat 'dir' -+Gets array which is the minimal data values in given direction or direction(s). -+@end deffn -+ -+@deffn {MGL command} resize res dat @code{mx [my=1 mz=1]} -+Makes array @var{res} of sizes @var{mx}, @var{my}, @var{mz} with interpolated data of array @var{dat}. -+@end deffn -+ -+@deffn {MGL command} subdata res dat @code{xx [yy=: zz=:]} -+Extracts sub-array data @var{res} from the original data @var{dat} array keeping fixed positive index. For example @code{subdata a b : 2} extracts 3d row (indexes are zero based), @code{subdata a b 4 :} extracts 5th column, @code{subdata a b : : 3} extracts 4th slice and so on. Note that symbol @samp{:} is defined @samp{:}=@code{-1} in MGL. -+@end deffn -+ -+@deffn {MGL command} trace res dat -+Gets array of diagonal elements dat[i,i] (for 2D case) or dat[i,i,i] (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1. -+@end deffn -+ -+@deffn {MGL command} transform dat 'type' real imag -+Do integral transformation of complex data @var{real}, @var{imag} on specified direction. Now only Fourier transformation is supported. The order of transformations is specified in string @var{type}: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: @samp{f} is forward Fourier transformation, @samp{i} is inverse Fourier transformation, @samp{n} or @samp{ } is no transformation. -+@end deffn -+ -+@deffn {MGL command} transforma dat 'type' ampl phase -+Do integral transformation of complex data @var{ampl}, @var{phase} on specified direction. Now only Fourier transformation is supported. The order of transformations is specified in string @var{type}: first character for x-dimension, second one for y-dimension, third one for z-dimension. The possible character are: @samp{f} is forward Fourier transformation, @samp{i} is inverse Fourier transformation, @samp{n} or @samp{ } is no transformation. -+@end deffn -+ -+@deffn {MGL command} stfad res real imag @code{dn} ['dir'='x'] -+Short time Fourier analysis for real and imaginary parts. Output is amplitude of partial Fourier of length @var{dn}. For example if @var{dir}=@samp{x}, result will have size @{int(nx/dn), dn, ny@} and it will contain @math{res[i,j,k]=|\sum_d^dn exp(I*j*d)*(real[i*dn+d,k]+I*imag[i*dn+d,k])|/dn}. -+@end deffn -+ -+@deffn {MGL command} pde res 'ham' ini_re ini_im [@code{dz=0.1 k0=100}] -+Solves equation du/dz = i*k0*@var{ham}(p,q,x,y,z,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators. Parameters @var{ini_re}, @var{ini_im} specify real and imaginary part of initial field distribution. Coordinates of the equation (and the solution) are supposed to be in the bounding box. Note, that really this ranges are increased by factor 3/2 for purpose of reducing reflection from boundaries. Parameter @var{dz} set the step along evolutionary coordinate z. At this moment, simplified form of function @var{ham} is supported -- all ``mixed'' terms (like @samp{x*p}->x*d/dx) are excluded. For example, in 2D case this function is effectively @math{ham = f(p,z) + g(x,z,u)}. However commutable combinations (like @samp{x*q}->x*d/dy) are allowed. Here variable @samp{u} is used for field amplitude |u|. This allow one solve nonlinear problems -- for example, for nonlinear Shrodinger equation you may set @code{ham='p^2+q^2-u^2'}. You may specify imaginary part for wave absorption, like @code{ham = 'p^2+i*x*(x>0)'}, but only if dependence on variable @samp{i} is linear (i.e. @math{ham = hre+i*him}). -+@end deffn -+ -+@deffn {MGL command} ray res 'ham' @code{x0 y0 z0 p0 q0 v0 [dt=0.1 tmax=10]} -+Solves GO ray equation like d@emph{r}/dt = d @var{ham}/d@emph{p}, d@emph{p}/dt = -d @var{ham}/d@emph{r}. This is Hamiltonian equations for particle trajectory in 3D case. Here @var{ham} is Hamiltonian which may depend on coordiantes @samp{x}, @samp{y}, @samp{z}, momentums @samp{p}=px, @samp{q}=py, @samp{v}=pz and time @samp{t}: @math{ham = H(x,y,z,p,q,v,t)}. The starting point (at @code{t=0}) is defined by variables @{@var{x0}, @var{y0}, @var{z0}, @var{p0}, @var{q0}, @var{v0}@}. Parameters @var{dt} and @var{tmax} specify the integration step and maximal time for ray tracing. Result is array of @{x,y,z,p,q,v,t@} with dimensions @{7 * int(@var{tmax}/@var{dt}+1) @}. -+@end deffn -+ -+@deffn {MGL command} qo2d res 'ham' ini_re ini_im ray [@code{r=1 k0=100} xx=0 yy=0] -+Solves equation du/dt = i*k0*@var{ham}(p,q,x,y,|u|)[u], where p=-i/k0*d/dx, q=-i/k0*d/dy are pseudo-differential operators (see @code{mglPDE()} for details). Parameters @var{ini_re}, @var{ini_im} specify real and imaginary part of initial field distribution. Parameters @var{ray} set the reference ray, i.e. the ray around which the accompanied coordinate system will be maked. You may use, for example, the array created by @code{mglRay()} function. Note, that the reference ray @strong{must be} smooth enough to make accompanied coodrinates unambiguity. Otherwise errors in the solution may appear. If @var{xx} and @var{yy} are non-zero then Cartesian coordinates for each point will be written into them. @sref{Beam tracing sample} -+@end deffn -+ -+@deffn {MGL command} jacobian res xdat ydat [zdat=0] -+Computates the Jacobian for transformation @{i,j,k@} to @{@var{xdat},@var{ydat},@var{zdat}@} where initial coordinates @{i,j,k@} are data indexes normalized in range [0,1]. The Jacobian is determined by formula det||@math{dr_\alpha/d\xi_\beta}|| where @math{r}=@{@var{xdat},@var{ydat},@var{zdat}@} and @math{\xi}=@{i,j,k@}. All dimensions must be the same for all data arrays. Data must be 3D if all 3 arrays @{@var{xdat},@var{ydat},@var{zdat}@} are specified or 2D if only 2 arrays @{@var{xdat},@var{ydat}@} are specified. -+@end deffn -+ -+ -+ -+@c ------------------------------------------------------------------ -+@node Commands on direction (MGL), Operators (MGL), Make another data (MGL), MGL interface -+@section Commands on direction (MGL) -+@cindex cumsum -+@cindex integral -+@cindex diff -+@cindex diff2 -+@cindex swap -+@cindex mirror -+@cindex sew -+@cindex smooth -+@cindex envelop -+@cindex norm -+@cindex normsl -+ -+These commands change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain @samp{x}, @samp{y} or @samp{z} characters for 1-st, 2-nd and 3-d dimension correspondingly. -+ -+@deffn {MGL command} cumsum dat 'dir' -+Cumulative summation of the data in given direction or directions. -+@end deffn -+@deffn {MGL command} integrate dat 'dir' -+Integrates (like cumulative summation) the data in given direction or directions. -+@end deffn -+@deffn {MGL command} diff dat 'dir' -+Differentiates the data in given direction or directions. -+@end deffn -+@deffn {MGL command} diff dat xdat ydat [zdat=0] -+Differentiates the data @var{dat} specified parametrically in direction @var{xdat} with @var{ydat}, @var{zdat}=constant. Parameter @var{zdat} can be omitted that correspond to 2D case. Parametrical differentiation uses the formula (for 2D case): @math{da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j)} where @math{a_i=da/di, a_j=da/dj} denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments -- for example, if you have 2D data a(i,j) which depend on coordinates @{x(i,j), y(i,j)@} then usual derivative along @samp{x} will be @code{diff a x y} and usual derivative along @samp{y} will be @code{diff a y x}. -+@end deffn -+ -+@deffn {MGL command} diff2 dat 'dir' -+Double-differentiates (like Laplace operator) the data in given direction. -+@end deffn -+@deffn {MGL command} swap dat 'dir' -+Swaps the left and right part of the data in given direction (useful for Fourier spectrum). -+@end deffn -+@deffn {MGL command} mirror dat 'dir' -+Mirror the left-to-right part of the data in given direction. Looks like change the value index @var{i}->@var{n-i}. -+@end deffn -+ -+@deffn {MGL command} sew dat ['dir'='xyz' @code{da=2*pi}] -+Remove value steps (like phase jumps after inverse trigonometric commands) with period @var{da} in given direction. -+@end deffn -+@deffn {MGL command} smooth data @code{type} ['dir'='xyz'] -+Smooths the data on specified direction or directions by method @var{Type}. Now 4 methods are supported: @samp{0} does nothing, @samp{1} linear averaging by 3 points, @samp{2} linear averaging by 5 points, @samp{3} quadratic averaging by 5 points. -+@end deffn -+ -+@deffn {MGL command} envelop dat ['dir'='x'] -+Find envelop for data values along direction @var{dir}. Only one direction can be specified at once. -+@end deffn -+ -+@deffn {MGL command} normsl dat @code{v1 v2} ['dir'='z' @code{keep=on sym=off}] -+Normalizes data slice-by-slice along direction @var{dir} the data in slices to range [@var{v1},@var{v2}]. If flag @var{sym}=@code{on} then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. If @var{keep} is set then maximal value of k-th slice will be limited by -+@iftex -+@math{\sqrt{\sum a_{ij}(k)/\sum a_{ij}(0)}}. -+@end iftex -+@ifnottex -+@math{\sqrt@{\sum a_ij(k)/\sum a_ij(0)@}}. -+@end ifnottex -+@end deffn -+ -+@deffn {MGL command} norm dat @code{v1 v2 [sym=off dim=0]} -+Normalizes the data to range [@var{v1},@var{v2}]. If flag @var{sym}=@code{on} then symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. Modification will be applied only for slices >=@var{dim}. -+@end deffn -+ -+ -+@c ------------------------------------------------------------------ -+@node Operators (MGL), Program flow (MGL), Commands on direction (MGL), MGL interface -+@section Operators (MGL) -+@cindex multo -+@cindex addto -+@cindex divto -+@cindex subto -+ -+@deffn {MGL command} multo dat dat2 -+Multiplies the data by the other one for each element. -+@end deffn -+@deffn {MGL command} divto dat dat2 -+Divides the data by the other one for each element. -+@end deffn -+@deffn {MGL command} addto dat dat2 -+Adds the other data. -+@end deffn -+@deffn {MGL command} subto dat dat2 -+Subtracts the other data. -+@end deffn -+@deffn {MGL command} multo dat @code{val} -+Multiplies each element by the number. -+@end deffn -+@deffn {MGL command} divto dat @code{val} -+Divides each element by the number. -+@end deffn -+@deffn {MGL command} addto dat @code{val} -+Adds the number to each element. -+@end deffn -+@deffn {MGL command} subto dat @code{val} -+Subtracts the number to each element. -+@end deffn -+ -+@c ------------------------------------------------------------------ -+@node Program flow (MGL), Command options (MGL), Operators (MGL), MGL interface -+@section Program flow (MGL) -+@cindex call -+@cindex chdir -+@cindex define -+@cindex if -+@cindex elseif -+@cindex else -+@cindex endif -+@cindex for -+@cindex next -+@cindex once -+@cindex stop -+ -+These commands control program flow, like, conditions, cycles, define script arguments and so on. -+ -+@deffn {MGL command} call 'fname' -+Executes script @var{fname}. -+@end deffn -+@deffn {MGL command} chdir 'path' -+Changes the current directory to @var{path}. -+@end deffn -+@deffn {MGL command} define $N smth -+Sets @var{N}-th script argument to @var{smth}. Note, that @var{smth} is used as is (with @samp{'} symbols if present). -+@end deffn -+@deffn {MGL command} if dat 'cond' -+Starts block which will be executed if @var{dat} satisfy to @var{cond}. -+@end deffn -+@deffn {MGL command} if @code{val} -+Starts block which will be executed if @code{val} is nonzero. -+@end deffn -+@deffn {MGL command} elseif dat 'cond' -+Starts block which will be executed if previous @code{if} or @code{elseif} is false and @var{dat} satisfy to @var{cond}. -+@end deffn -+@deffn {MGL command} elseif @code{val} -+Starts block which will be executed if previous @code{if} or @code{elseif} is false and @code{val} is nonzero. -+@end deffn -+@deffn {MGL command} else -+Starts block which will be executed if previous @code{if} or @code{elseif} is false. -+@end deffn -+@deffn {MGL command} endif -+Finishes @code{if/elseif/else} block. -+@end deffn -+@deffn {MGL command} for $N @code{v1 v2 [dv=1]} -+Starts cycle with @var{N}-th argument changing from @var{v1} to @var{v2} with the step @var{dv}. -+@end deffn -+@deffn {MGL command} for $N dat -+Starts cycle with @var{N}-th argument changing for @var{dat} values. -+@end deffn -+@deffn {MGL command} next -+Finishes @code{for} cycle. -+@end deffn -+@deffn {MGL command} once @code{val} -+The code between once on and once off will be executed only once. Useful for large data manipulation in programs like UDAV. -+@end deffn -+@deffn {MGL command} stop -+Terminate execution. -+@end deffn -+ -+@c ------------------------------------------------------------------ -+@node Command options (MGL), Suffixes, Program flow (MGL), MGL interface -+@section Command options (MGL) -+@cindex alpha -+@cindex alphadef -+@cindex xrange -+@cindex yrange -+@cindex zrange -+@cindex crange -+@cindex cut -+@cindex ambient -+@cindex fontsize -+@cindex marksize -+@cindex meshnum -+@cindex legend -+ -+Command options allow the easy setup of the plot by changing of global settings only for this plot. Options are specified at the end of string. Each option is separated from the previous text by symbol @samp{;}. Options work so that them remember the current settings, change settings as it being set in the option, execute command and return the original settings back. So, the options usage for data handling commands or for graphics setup commands is useless. -+ -+The most useful options are @code{xrange, yrange, zrange}. They sets the boundaries for data change. This boundaries are used for automatically filled variables. So, these options allow one to change the position of some plots. For example, in command @code{plot y; xrange 0.1 0.9} the x coordinate will be equidistantly distributed in range 0.1 ... 0.9. -+ -+The full list of options are: -+@deffn {MGL command} alpha @code{val} -+Sets alpha value (transparency) of the plot. The value should be in range [0, 1]. -+@end deffn -+@deffn {MGL command} alphadef @code{val} -+Sets alpha value (transparency) of the plot. The value should be in range [0, 1]. -+@end deffn -+@deffn {MGL command} ambient @code{val} -+Sets brightness of ambient light for the plot. The value should be in range [0, 1]. -+@end deffn -+@deffn {MGL command} crange @code{val1 val2} -+Sets boundaries of color change for the plot. -+@end deffn -+@deffn {MGL command} xrange @code{val1 val2} -+Sets boundaries of x coordinate change for the plot. -+@end deffn -+@deffn {MGL command} yrange @code{val1 val2} -+Sets boundaries of y coordinate change for the plot. -+@end deffn -+@deffn {MGL command} zrange @code{val1 val2} -+Sets boundaries of z coordinate change for the plot. -+@end deffn -+@deffn {MGL command} cut @code{val} -+Sets whether to cut or to project the plot points lying outside the bounding box. -+@end deffn -+@deffn {MGL command} fontsize @code{val} -+Sets the size of text. -+@end deffn -+@deffn {MGL command} marksize @code{val} -+Sets the size of marks. -+@end deffn -+@deffn {MGL command} meshnum @code{val} -+Work like @code{meshnum} command. -+@end deffn -+@deffn {MGL command} legend 'txt' -+Adds string 'txt' to internal legend accumulator. The style of described line and mark is taken from arguments of the plot command. The maximal number of entries is 100. -+@end deffn -+ -+@c ------------------------------------------------------------------ -+@node Suffixes, Utilities, Command options (MGL), MGL interface -+@section Suffixes for variable -+ -+Suffixes can get some numerical value (like its size, maximal or minimal value, the sum of elements and so on) of the data array in variable and use it later as usual number in command arguments. The suffixes start from point @samp{.} right after (without spaces) variable name or its sub-array. For example, @code{a.nx} give the x-size of data a, @code{b(1).max} give maximal value of second row of variable b, @code{c(:,0).sum} give sum of element in first column of c and so on. -+ -+The full list of suffixes are: -+@table @strong -+@item nx, ny, nz -+Give the data size in x-, y-, z-direction correspondingly. -+@item max -+Give maximal value of the data. -+@item min -+Give minimal value of the data. -+@item mx, my, mz -+Give x-, y-, z-position of data maximum. -+@item ax, ay, az, aa -+Give x-, y-, z-position of data mass center or average data value. -+@item wx, wy, wz, wa -+Give width in x-, y-, z-direction or data dispersion value. -+@item sx, sy, sz, sa -+Give skewness in x-, y-, z-direction or data skewness value. -+@item kx, ky, kz, ka -+Give kurtosis in x-, y-, z-direction or data kurtosis value. -+@item sum -+Give sum of data values. -+@item a -+Give first value of data array. -+@item fst -+Give first nonzero value of data array. -+@item lst -+Give last nonzero value of data array. -+@end table -+ -+@c ------------------------------------------------------------------ -+@node Utilities, , Suffixes, MGL interface -+@section Utilities for parsing MGL -+ -+MathGL library provides several tools for parsing MGL scripts. There is tools saving it to bitmap (@code{mgl2png}, @code{mgl2gif}) or vectorial (@code{mgl2eps}, @code{mgl2svg}) images. Tool @code{mglview} show MGL script and allow to rotate and setup the image. Also you can translate MGL script to C++ file by help of @code{mgl2cpp} tool. -+ -+All of this tools have similar set of arguments. First argument is name of script file, next argument is optional output file name, last arguments are options. There are options for setting script parameters (it is @code{$0, $1, ... $9}) and locale settings. The script parameters have format @samp{-Nval}. Here N=0,1...9 is parameter ID and val is its value. For example, option @samp{-1test} set to substitute @samp{test} instead of @code{$1} in the script. Option -Lval set locale to val. For example, @samp{-Lutf8} will set UTF-8 locale for script. -+ -+Additionally you can create animated GIF file or a set of JPEG files with names @samp{frameNNNN.jpg} (here @samp{NNNN} is frame index). You should use @code{mgl2gif} tool and specify the values of @code{$0} parameter for making animation. Values of the parameter @code{$0} can be specified inside the script by comment @code{##a val} for each value @code{val} (one comment for one value) or by option(s) @samp{-Aval}. Tool @code{mgl2gif} will execute script several times (once for each specified value of @code{$0}) and save result in animated GIF file. For saving each frame in JPEG just add command @code{write ''} at the end of the script. ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/class.texi -@@ -0,0 +1,887 @@ -+ -+@c ------------------------------------------------------------------ -+@node Plotter classes, Widget classes, MathGL core, Top -+@chapter Plotter classes -+@cindex mglGraphAB -+@cindex mglGraphZB -+@cindex mglGraphPS -+@cindex mglGraphGL -+@cindex mglGraphIDTF -+ -+The class mglGraph (@pxref{MathGL core}) provide the basic tools for creating scientific graphics but it is abstract class. The matter is that there are several possible way to draw a graphics: in bitmap, in vector file, using OpenGL and so on. As result, user should use some of derived classes to do actual drawing. In principle, it is possible to derive a class exactly from mglGraph (and it was in v.1.6). But I recommend to derive from mglGraphAB class for higher compatibility of produced graphics from different classes. Class mglGraphAB is another abstract class which provide basic coordinates transformation, plotting functions and export to bitmap picture. It still require a functions for drawing lines, triangles and quadrangles. So below a set of ``plotter'' classes with short comments. -+ -+@deftp {Class} mglGraphAB -+Abstract class mglGraphAB implements plotting function for 1D, 2D and 3D plots using Z-ordering and provides base functionality for to screen coordinate transformation, bitmap creation and so on. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} mglGraphZB -+Class mglGraphZB implements plotting function for 1D, 2D and 3D plots using Z-Buffer. It is useful for off-screen (for console or SSH terminal) programs. Also this class can be used in any other programs which may draw bitmap on the screen (for example, by using FLTK, Qt, wxWidgets libraries and so on). Note that bitmap picture is saved while exporting to EPS format. The produced graphics have better quality but slower in comparison with graphics in the class mglGraphPS. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} mglGraphPS -+Class mglGraphPS implements plotting functions for 1D, 2D and 3D plots and exports them to PostScript or SVG file. It is useful for off-screen (for console or SSH terminal) programs. Note that there is no transparency support now and color interpolation and lightning support is limited (not so nice as in class mglGraphZB). As result the plots with transparency (SurfA, Surf3A, CloudP, CloudQ) may look not so good. However the speed of drawing is higher in comparison with one in the class mglGraphZB. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} mglGraphGL -+Class mglGraphGL implements plotting function for 1D, 2D and 3D plots under OpenGL. This class can not be used in off-screen applications. Note, that several transparent overlapped surfaces are drawn not so correctly due to OpenGL limitations. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} mglGraphIDTF -+Class mglGraphIDTF implements plotting function for 1D, 2D and 3D plots and export it in IDTF format. Later this file can be converted in U3D format. Class is defined in @code{#include }. -+@end deftp -+ -+@menu -+* mglGraphAB class:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node mglGraphAB class, , , Plotter classes -+@section mglGraphAB class -+@cindex mglGraphAB -+@cindex window -+#cindex mglDraw -+ -+Generally this class is a bit less abstract class than mglGraph class (@pxref{MathGL core}). It provide many protected methods for handling intermediate data from mglGraph methods and require a few methods to be defined by derived class. The developers of derived classes should look on file @samp{mgl_ab.h} and comments inside it or contact me. -+ -+Here I just show new public methods for class mglGraphAB. There are functions returning the created picture (bitmap), its width and height. You may display it by yourself in any graphical library (see also, @ref{Widget classes}) or save in file (see also, @ref{Export to file}). -+ -+@deftypemethod mglGraphAB @code{const unsigned char *} GetBits () -+Gets RGB bitmap of the current state of the image. Format of each element of bits is: @{red, green, blue@}. Number of elements is Width*Height. Position of element @{i,j@} is [3*i + 3*Width*j]. -+@end deftypemethod -+ -+@deftypemethod mglGraphAB @code{const unsigned char *} GetRGBA () -+Gets RGBA bitmap of the current state of the image. Format of each element of bits is: @{red, green, blue, alpha@}. Number of elements is Width*Height. Position of element @{i,j@} is [4*i + 4*Width*j]. -+@end deftypemethod -+ -+@deftypemethod mglGraphAB @code{int} GetWidth () -+Gets width of the image. -+@end deftypemethod -+ -+@deftypemethod mglGraphAB @code{int} GetHeight () -+Gets height of the image. -+@end deftypemethod -+ -+Class mglGraphAB is the base class for ``widget classes''. So there are set of functions for handling window behavior. Most of them are applicable only for ``window'' classes (like mglGraphFLTK and so on, @pxref{Widget classes}). In all other classes these functions just do nothing. You should provide the corresponding interface in derived ``widget'' classes for user convenience. -+ -+@deftypemethod mglGraphAB @code{void} Window (@code{int} argc, @code{char **}argv, @code{int (*}draw)(@code{mglGraph *}gr, @code{void *}p), @code{const char *}title, @code{void *}par=@code{NULL}, @code{void (*}reload)(@code{int} next, @code{void *}p)=@code{NULL}, @code{bool} maximize=@code{false}) -+This function creates a window for plotting. Parameters @var{argc}, @var{argv} contain OS specific information and should be the same as in function @code{main(int argc,char **argv)}. Parameter @var{draw} sets a pointer (this is the name of function) to drawing function. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Note, that @var{draw} can be @code{NULL} for displaying static bitmaps only (no animation or slides). Parameter @var{title} sets the title of the window. Parameter @var{par} contains pointer to data for the plotting function @var{draw}. Parameter @var{maximize}=@code{true} open maximized window. -+ -+There are some keys handles for manipulating by the plot: 'a', 'd', 'w', 's' for the rotating; ',', '.' for viewing of the previous or next frames in the list; 'r' for the switching of transparency; 'f' for the switching of lightning; 'x' for hiding (closing) the window. -+ -+@strong{IMPORTANT!!!} You need to add a call of Rotate() (@pxref{Transformation matrix}) function for having possibility of plot rotation. If plot should be unrotated by default just add @code{Rotate(0,0)} in drawing function. -+@end deftypemethod -+ -+@deftypemethod mglGraphAB @code{void} Window (@code{int} argc, @code{char **}argv, @code{mglDraw *}draw, @code{const char *}title, @code{bool} maximize=@code{false}) -+This function is mostly the same as previous one. The only difference is that the drawing function and function for data reloading are specified as methods on a class inherited from class @code{mglDraw}. This class is defined in @code{#include } and have only 2 methods: -+@verbatim -+class mglDraw -+{ -+public: -+ virtual int Draw(mglGraph *) { return 0; }; -+ virtual void Reload(int) {}; -+}; -+@end verbatim -+You should inherit yours class from @code{mglDraw} and reimplement one or both functions for using this function. -+@end deftypemethod -+ -+ -+@deftypemethod mglGraphAB @code{void} ToggleAlpha () -+Switch on/off transparency but do not overwrite switches in user drawing function. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} ToggleLight () -+Switch on/off lighting but do not overwrite switches in user drawing function. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} ToggleZoom () -+Switch on/off zooming by mouse as region selection. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} ToggleRotate () -+Switch on/off rotation by mouse. Usually, left button is used for rotation, middle button for shift, right button for zoom/perspective. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} ToggleNo () -+Switch off all zooming and rotation and restore initial state. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} Update () -+Update window contents. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} ReLoad (@code{bool} o) -+Reload user data and update picture. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} Adjust () -+Adjust size of bitmap to window size. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} NextFrame () -+Show next frame if one. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} PrevFrame () -+Show previous frame if one. -+@end deftypemethod -+@deftypemethod mglGraphAB @code{void} Animation () -+Run/stop slideshow (animation) of frames -+@end deftypemethod -+ -+@deftypecv {Widget option} mglGraphAB @code{bool} AutoClf -+Clear canvas between drawing. You may switch it off for accumulate previous drawing (for example some points or parts of a picture). -+@end deftypecv -+@deftypecv {Widget option} mglGraphAB @code{float} Delay -+Delay for animation in seconds. Default value is 1 sec. -+@end deftypecv -+ -+@deftypemethod mglGraphAB @code{mglPoint} CalcXYZ (@code{int} xs, @code{int} ys) -+Calculate 3D coordinate @{x,y,z@} for screen point @{xs,ys@}. At this moment it ignore perspective and transformation formulas (curvilinear coordinates). The calculation are done for the last used InPlot (@pxref{Transformation matrix}). -+@end deftypemethod -+@deftypecv {Widget option} mglGraphAB @code{float} ShowMousePos -+Switch to show or not in the widget the last mouse click position. -+@end deftypecv -+@deftypecv {Widget option} mglGraphAB @code{mglPoint} LastMousePos -+Last position of mouse click. -+@end deftypecv -+ -+@c ------------------------------------------------------------------ -+@node Widget classes, mglData class, Plotter classes, Top -+@chapter Widget classes -+@cindex mglGraphFLTK -+@cindex mglGraphQT -+@cindex mglGraphGLUT -+@cindex Fl_MathGL -+@cindex QMathGL -+@cindex window -+@cindex widgets -+ -+There are set of ``window'' classes for making a window with MathGL graphics: @code{mglGraphFLTK}, @code{mglGraphQT}, @code{mglGraphGLUT}. All these classes allow user to show, rotate, export, and change view of the plot using keyboard. Most of them (except @code{mglGraphGLUT}) also have toolbar and menu for simplifying plot manipulation. Usually these classes (except @code{mglGraphGLUT}) are derived from @code{mglGraphZB} class and have a ``connected'' class for widget in corresponding window library. All window classes have the same set of functions (@pxref{mglGraphAB class}). Below the full list of classes with short comments. -+ -+@deftp {Class} mglGraphFLTK -+Class @code{mglGraphFLTK} adds the possibility to create plotting window with the help of FLTK library. It allows one to show, rotate, export, and change view of the plot by keyboard, menu and toolbar. ``Corresponding'' widget class is @code{Fl_MathGL}. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} Fl_MathGL -+Class is FLTK widget for displaying the MathGL output. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} mglGraphQT -+Class @code{mglGraphQT} adds the possibility to create plotting window with the help of QT library. It allows one to show, rotate, export, and change view of the plot by keyboard, menu and toolbar. ``Corresponding'' widget class is @code{QMathGL}. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} QMathGL -+Class is Qt widget for dysplaying the MathGL output. Class is defined in @code{#include }. -+@end deftp -+ -+@deftp {Class} mglGraphGLUT -+Class @code{mglGraphGLUT} adds the possibility to create plotting window with the help of GLUT library. It allows one to show, rotate, export, and change view of the plot only by keyboard. Class is defined in @code{#include }. -+@end deftp -+ -+@menu -+* Fl_MathGL class:: -+* QMathGL class:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node Fl_MathGL class, QMathGL class, , Widget classes -+@section Fl_MathGL class -+@cindex Fl_MathGL -+@cindex widgets -+ -+Class is FLTK widget which display MathGL graphics (defined in @code{#include } -+ -+@deftypemethod Fl_MathGL @code{void} set_draw (@code{mglDraw *}dr) -+Sets drawing function from a class inherited from @code{mglDraw}. -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{void} update (@code{mglGraph *}gr=@code{NULL}) -+Update (redraw) plot using grapher @var{gr} (built-in by default). -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{void} set_angle (@code{float} t, @code{float} p) -+Set angles for additional plot rotation -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{void} set_state (@code{int} f) -+Set bitwise flags for general state (1-Alpha, 2-Light) -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{void} set_state (@code{bool} z, @code{bool} r) -+Set flags for handling mouse: @var{z}=@code{true} allow zooming, @var{r}=@code{true} allow rotation/shifting/perspective and so on. -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{void} set_zoom (@code{float} X1, @code{float} Y1, @code{float} X2, @code{float} Y2) -+Set zoom in/out region -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{void} get_zoom (@code{float *}X1, @code{float *}Y1, @code{float *}X2, @code{float *}Y2) -+Get zoom in/out region -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{void} set_popup (@code{const Fl_Menu_Item *}pmenu, @code{Fl_Widget *}w, @code{void *}v) -+Set popup menu pointer -+@end deftypemethod -+@deftypemethod Fl_MathGL @code{mglGraph *} get_graph () -+Get pointer to grapher -+@end deftypemethod -+ -+@deftypecv {Widget option} Fl_MathGL @code{Fl_Valuator *} tet_val -+Pointer to external tet-angle validator. -+@end deftypecv -+@deftypecv {Widget option} Fl_MathGL @code{Fl_Valuator *} phi_val -+Pointer to external phi-angle validator. -+@end deftypecv -+@deftypecv {Widget option} Fl_MathGL @code{mglGraphAB *} graph -+Pointer to grapher -+@end deftypecv -+@deftypecv {Widget option} Fl_MathGL @code{void *} draw_par -+Parameters for drawing function mglGraph::DrawFunc. -+@end deftypecv -+@deftypecv {Widget option} Fl_MathGL @code{int (*} draw_func @code{)(mglGraph *gr, void *par)} -+Drawing function for window procedure. It should return the number of frames. -+@end deftypecv -+ -+@c ------------------------------------------------------------------ -+@node QMathGL class, , Fl_MathGL class, Widget classes -+@section QMathGL class -+@cindex QMathGL -+@cindex widgets -+ -+Class is Qt widget which display MathGL graphics (defined in @code{#include } -+ -+@deftypemethod QMathGL @code{double} getRatio () -+Return aspect ratio of the picture. -+@end deftypemethod -+ -+@deftypemethod QMathGL @code{void} setDraw (@code{mglDraw *}dr) -+Sets drawing functions from a class inherited from @code{mglDraw}. -+@end deftypemethod -+@deftypemethod QMathGL @code{void} setDraw (@code{int (*}draw)(@code{mglGraph *}gr, @code{void *}p), @code{void *}par=@code{NULL}) -+Sets the drawing function @var{draw}. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Parameter @var{par} contains pointer to data for the plotting function @var{draw}. -+@end deftypemethod -+ -+@deftypemethod QMathGL @code{void} setGraph (@code{mglGraphAB *}gr) -+Set pointer to external grapher (instead of built-in @code{mglGraphZB}). Note that QMathGL will automatically delete this object at destruction or at new @code{setGraph()} call. -+@end deftypemethod -+ -+@deftypemethod QMathGL @code{void} setPopup (@code{QMenu *}p) -+Set popup menu pointer. -+@end deftypemethod -+@deftypemethod QMathGL @code{void} setSize (@code{int} w, @code{int} h) -+Set widget/picture sizes -+@end deftypemethod -+@deftypemethod QMathGL @code{double} getRatio () -+Return aspect ratio of the picture. -+@end deftypemethod -+ -+@deftypemethod QMathGL @code{int} getPer () -+Get perspective value in percents. -+@end deftypemethod -+@deftypemethod QMathGL @code{int} getPhi () -+Get Phi-angle value in degrees. -+@end deftypemethod -+@deftypemethod QMathGL @code{int} getTet () -+Get Theta-angle value in degrees. -+@end deftypemethod -+@deftypemethod QMathGL @code{bool} getAlpha () -+Get transparency state. -+@end deftypemethod -+@deftypemethod QMathGL @code{bool} getLight () -+Get lightning state. -+@end deftypemethod -+@deftypemethod QMathGL @code{bool} getZoom () -+Get mouse zooming state. -+@end deftypemethod -+@deftypemethod QMathGL @code{bool} getRotate () -+Get mouse rotation state. -+@end deftypemethod -+ -+@defop Slot QMathGL @code{void} refresh () -+Redraw saved bitmap without executing drawing function. -+@end defop -+@defop Slot QMathGL @code{void} update (@code{mglGraph *}gr=@code{NULL}) -+Update picture by executing drawing function. -+@end defop -+@defop Slot QMathGL @code{void} copy () -+Copy graphics to clipboard. -+@end defop -+@defop Slot QMathGL @code{void} setPer (@code{int} val) -+Set perspective value. -+@end defop -+@defop Slot QMathGL @code{void} setPhi (@code{int} val) -+Set Phi-angle value. -+@end defop -+@defop Slot QMathGL @code{void} setTet (@code{int} val) -+Set Theta-angle value. -+@end defop -+@defop Slot QMathGL @code{void} setAlpha (@code{bool} val) -+Switch on/off transparency. -+@end defop -+@defop Slot QMathGL @code{void} setLight (@code{bool} val) -+Switch on/off lightning. -+@end defop -+@defop Slot QMathGL @code{void} setZoom (@code{bool} val) -+Switch on/off mouse zooming. -+@end defop -+@defop Slot QMathGL @code{void} setRotate (@code{bool} val) -+Switch on/off mouse rotation. -+@end defop -+@defop Slot QMathGL @code{void} zoomIn () -+Zoom in graphics. -+@end defop -+@defop Slot QMathGL @code{void} zoomOut () -+Zoom out graphics. -+@end defop -+@defop Slot QMathGL @code{void} restore () -+Restore zoom and rotation to default values. -+@end defop -+@defop Slot QMathGL @code{void} reload () -+Reload data and execute script. -+@end defop -+@defop Slot QMathGL @code{void} shiftLeft () -+Shift graphics to left direction. -+@end defop -+@defop Slot QMathGL @code{void} shiftRight () -+Shift graphics to right direction. -+@end defop -+@defop Slot QMathGL @code{void}shiftUp () -+Shift graphics to up direction. -+@end defop -+@defop Slot QMathGL @code{void} shiftDown () -+Shift graphics to down direction. -+@end defop -+@defop Slot QMathGL @code{void} exportPNG (@code{QString} fname=@code{""}) -+Export current picture to PNG file. -+@end defop -+@defop Slot QMathGL @code{void} exportPNGs (@code{QString} fname=@code{""}) -+Export current picture to PNG file (no transparency). -+@end defop -+@defop Slot QMathGL @code{void} exportJPG (@code{QString} fname=@code{""}) -+Export current picture to JPEG file. -+@end defop -+@defop Slot QMathGL @code{void} exportBPS (@code{QString} fname=@code{""}) -+Export current picture to bitmap EPS file. -+@end defop -+@defop Slot QMathGL @code{void} exportEPS (@code{QString} fname=@code{""}) -+Export current picture to vector EPS file. -+@end defop -+@defop Slot QMathGL @code{void} exportSVG (@code{QString} fname=@code{""}) -+Export current picture to SVG file. -+@end defop -+@defop Slot QMathGL @code{void} exportIDTF (@code{QString} fname=@code{""}) -+Export current picture to IDTF file. -+@end defop -+@defop Slot QMathGL @code{void} setMGLFont (@code{QString} path) -+Restore (@var{path}=@code{""} or load font for graphics. -+@end defop -+@defop Slot QMathGL @code{void} print () -+Print current picture -+@end defop -+@defop Slot QMathGL @code{void} adjust () -+Adjust plot size to fill entire window. This function is executed only if graph is mglGraphQT instance. -+@end defop -+@defop Slot QMathGL @code{void} nextSlide () -+Show next slide. This function is executed only if graph is mglGraphQT instance. -+@end defop -+@defop Slot QMathGL @code{void} prevSlide () -+Show previous slide. This function is executed only if graph is mglGraphQT instance. -+@end defop -+@defop Slot QMathGL @code{void} animation (@code{bool} st=@code{true}) -+Start animation. This function is executed only if graph is mglGraphQT instance. -+@end defop -+@defop Slot QMathGL @code{void} about () -+Show about information. -+@end defop -+@defop Slot QMathGL @code{void} aboutQt () -+Show information about Qt version. -+@end defop -+ -+@defop Signal QMathGL @code{void} phiChanged (@code{int} val) -+Phi angle changed (by mouse or by toolbar). -+@end defop -+@defop Signal QMathGL @code{void} tetChanged (@code{int} val) -+Tet angle changed (by mouse or by toolbar). -+@end defop -+@defop Signal QMathGL @code{void} perChanged (@code{int} val) -+Perspective changed (by mouse or by toolbar). -+@end defop -+@defop Signal QMathGL @code{void} alphaChanged (@code{bool} val) -+Transparency changed (by toolbar). -+@end defop -+@defop Signal QMathGL @code{void} lightChanged (@code{bool} val) -+Lighting changed (by toolbar). -+@end defop -+@defop Signal QMathGL @code{void} zoomChanged (@code{bool} val) -+Zooming changed (by toolbar). -+@end defop -+@defop Signal QMathGL @code{void} rotateChanged (@code{bool} val) -+Rotation changed (by toolbar). -+@end defop -+ -+@deftypecv {Widget option} QMathGL @code{QString} appName -+Application name for message boxes. -+@end deftypecv -+@deftypecv {Widget option} QMathGL @code{bool} autoResize -+Allow auto resizing (default is false). -+@end deftypecv -+@deftypecv {Widget option} QMathGL @code{int} animDelay -+Animation delay in ms. -+@end deftypecv -+ -+ -+ -+@c ------------------------------------------------------------------ -+@c @node mglData class, Other classes, Widget classes, Top -+@c @chapter mglData class -+ -+@include data.texi -+ -+ -+ -+@c ------------------------------------------------------------------ -+@node Other classes, C interface, mglData class, Top -+@chapter Other classes -+ -+@menu -+* mglParse class:: -+* mglFormula class:: -+* mglFont class:: -+* mglColor class:: -+* mglPoint class:: -+* mglVar class:: -+* mglCommand class:: -+* mglArg class:: -+@end menu -+ -+@c ------------------------------------------------------------------ -+@node mglParse class, mglFormula class, , Other classes -+@section mglParse class -+@cindex mglParse -+ -+Class for parsing and executing MGL script. This class is defined in @code{#include }. -+ -+Class mglParse is the interpreter for MGL scripts (@pxref{MGL interface}). The main function of mglParse class is @code{Parse()}. Exactly this function parses and executes the script string-by-string. Also there are two subservient functions for the finding and creation of a variable. These functions can be useful for displaying values of variables (arrays) in some external program (in window, for example). The variable @var{DataList} contains full list of variables in script. Flag @var{AllowSetSize} allows one to prevent changing the size of the picture inside the script (forbids the MGL command @code{setsize}). -+ -+Note an important feature -- if user defines function @var{func} in variable then it will be called before the destroying of this variable (@pxref{mglVar class}). -+ -+@deftypemethod mglParse @code{} mglParse (@code{bool} setsize=@code{false}) -+Constructor initializes all values with zero and set @var{AllowSetSize} value. -+@end deftypemethod -+@deftypemethod mglParse @code{int} Parse (@code{mglGraph *}gr, @code{const char *}str, @code{long} pos=@code{0}) -+@deftypemethodx mglParse @code{int} Parse (@code{mglGraph *}gr, @code{const wchar_t *}str, @code{long} pos=@code{0}) -+Main function in the class. It parses the string @var{str} and executes it by using @var{gr} as a graphics plotter. Returns the value depending on an error presence in the string @var{str}: 0 -- no error, 1 -- wrong command argument(s), 2 -- unknown command, 3 -- string is too long. Optional argument @var{pos} allows to save the string position in the document (or file) for using @code{for|next} command. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{int} Export (@code{wchar_t} cpp_out@code{[1024]}, @code{mglGraph *}gr, @code{const wchar_t *}str) -+Function parses the string @var{str}, executes it by using @var{gr} as a graphics plotter and exports it to C++ code. Returns the value depending on an error presence in the string @var{str}: 0 -- no error, 1 -- wrong command argument(s), 2 -- unknown command, 3 -- string is too long. Output C++ text will be placed in @var{out} variable. If string @var{str} have options (defined after ';' symbol) then the corresponding C++ texts are placed in variables @var{op1}, @var{op2}. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{void} Execute (@code{mglGraph *}gr, @code{FILE *}fp, @code{bool} print=@code{false}) -+Function parse and execute line-by-line MGL script in file @var{fp}. If @var{print}=@code{true} then all warnings and information will be printed in stdout. Also this function support the @code{for|next} MGL commands. -+@end deftypemethod -+@deftypemethod mglParse @code{void} Execute (@code{mglGraph *}gr, @code{int} num, @code{const wchar_t **}text, @code{void (*} error @code{)(int line, int kind)=NULL}) -+Function parse and execute line-by-line MGL script in array @var{text}. If @var{error} is not @code{NULL} then this function will be called for all warnings, information and other messages. Also this function support the @code{for|next} MGL commands. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{void} Execute (@code{mglGraph *}gr, @code{const char *}text, @code{void (*} error @code{)(int line, int kind)=NULL}) -+@deftypemethodx mglParse @code{void} Execute (@code{mglGraph *}gr, @code{const wchar_t *}text, @code{void (*} error @code{)(int line, int kind)=NULL}) -+Function parse and execute line-by-line MGL script in string @var{text}. Lines are separated by @samp{\n} symbol as usual. If @var{error} is not @code{NULL} then this function will be called for all warnings, information and other messages. Also this function support the @code{for|next} MGL commands. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{bool} AddParam (@code{int} n, @code{const char *}str, @code{bool} isstr=@code{true}) -+@deftypemethodx mglParse @code{bool} AddParam (@code{int} n, @code{const wchar_t *}str, @code{bool} isstr=@code{true}) -+Function set the value of @var{n}-th parameter as string @var{str} (@var{n}=0, 1 ... 9). It return @code{true} for success. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{mglVar *} FindVar (@code{const char *}name) -+@deftypemethodx mglParse @code{mglVar *} FindVar (@code{const wchar_t *}name) -+Function returns the pointer to variable with name @var{name} or zero if variable is absent. Use this function to put external data array to the script or get the data from the script. -+@end deftypemethod -+@deftypemethod mglParse @code{mglVar *} AddVar (@code{const char *}name) -+@deftypemethodx mglParse @code{mglVar *} AddVar (@code{const wchar_t *}name) -+Function returns the pointer to variable with name @var{name}. If variable is absent then new variable is created with name @var{name}. Use this function to put external data array to the script or get the data from the script. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{void} DeleteVar (@code{mglVar *}v) -+@deftypemethodx mglParse @code{void} DeleteVar (@code{const char *}name) -+@deftypemethodx mglParse @code{void} DeleteVar (@code{const wchar_t *}name) -+Function delete the variable specified by its name or by its pointer. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{inline void} RestoreOnce () -+Restore Once flag. -+@end deftypemethod -+ -+@deftypemethod mglParse @code{void} AddCommand (@code{mglCommand *}cmd, @code{int} num=@code{0}) -+Add @var{num} commands @var{cmd} to the defined MGL commands list. Parameter @var{cmd} is array of @code{mglCommand} structures. If parameter @var{num}=0 then it will be determined automatically. At this, array @var{cmd} @strong{must have} last element with @code{name=L""} -+@end deftypemethod -+ -+@deftypecv {Option} mglParse @code{mglVar *} DataList -+List of variables defined in script. -+@end deftypecv -+@deftypecv {Option} mglParse @code{bool} AllowSetSize -+Flag which allows/forbids the command @code{setsize} in scripts. -+@end deftypecv -+@deftypecv {Option} mglParse @code{bool} Stop -+Flag which interrupt script execution. -+@end deftypecv -+@deftypecv {Option} mglParse @code{mglCommand *} Cmd -+Table (array) of recognizable MGL commands (can be changed by user). Items in the table @strong{MUST be sorted} by @var{name} field !!! Last items must have empty name (i.e. @code{L""}). -+@end deftypecv -+@deftypecv {Option} mglParse @code{wchar_t *} op1 -+These strings contain command options and should be placed before the command. These variables are used for MGL->C++ (or other language) conversion. -+@end deftypecv -+@deftypecv {Option} mglParse @code{wchar_t *} op2 -+These strings contain command options and should be placed after the command. These variables are used for MGL->C++ (or other language) conversion. -+@end deftypecv -+ -+@c ------------------------------------------------------------------ -+@node mglFormula class, mglFont class, mglParse class, Other classes -+@section mglFormula class -+@cindex mglFormula -+ -+Class for evaluating of formula specified by the string. This class is defined in @code{#include }. -+ -+It is the fast variant of formula evaluation. At creation it will be recognized and compiled to tree-like internal code. At evaluation stage only fast calculations are performed. There is no difference between lower or upper case in formulas. If argument value lie outside the range of function definition then function returns NaN. -+ -+There are a lot of functions and operators available. The operators are: @samp{+} -- addition, @samp{-} -- subtraction, @samp{*} -- multiplication, @samp{/} -- division, @samp{^} -- integer power. Also there are logical ``operators'': @samp{<} -- true if x} -- true if x>y, @samp{=} -- true if x=y, @samp{&} -- true if x and y both nonzero, @samp{|} -- true if x or y nonzero. These logical operators have lowest priority and return 1 if true or 0 if false. -+ -+The basic functions are: @samp{sqrt(x)} -- square root of @var{x}, @samp{pow(x,y)} power @var{x} in @var{y}, @samp{ln(x)} -- natural logarithm of @var{x}, @samp{lg(x)} -- decimal logarithm of @var{x}, @samp{log(a,x)} -- logarithm base @var{a} of @var{x}, @samp{abs(x)} -- absolute value of @var{x}, @samp{sign(x)} -- sign of @var{x}, @samp{mod(x,y)} -- x modulo y, @samp{step(x)} -- step function, @samp{rnd} -- random number, @samp{pi} -- number @math{\pi=3.1415926...}. -+ -+Trigonometric functions are: @samp{sin(x)}, @samp{cos(x)}, @samp{tan(x)} (or @samp{tg(x)}). Inverse trigonometric functions are: @samp{asin(x)}, @samp{acos(x)}, @samp{atan(x)}. Hyperbolic functions are: @samp{sinh(x)} (or @samp{sh(x)}), @samp{cosh(x)} (or @samp{ch(x)}), @samp{tanh(x)} (or @samp{th(x)}). Inverse hyperbolic functions are: @samp{asinh(x)}, @samp{acosh(x)}, @samp{atanh(x)}. -+ -+There are a set of special functions: @samp{gamma(x)} -- Gamma function @math{\Gamma(x) = \int_0^\infty dt t^@{x-1@} \exp(-t)} , @samp{psi(x)} -- digamma function @math{\psi(x) = \Gamma'(x)/\Gamma(x)} for x!=0, @samp{ai(x)} -- Airy function Ai(x), @samp{bi(x)} -- Airy function Bi(x), @samp{cl(x)} -- Clausen function, @samp{li2(x)} (or @samp{dilog(x)}) -- dilogarithm @math{Li_2(x) = - \Re \int_0^x ds \log(1-s)/s}, @samp{sinc(x)} -- compute @math{sinc(x) = \sin(\pi x) / (\pi x)} for any value of x, @samp{zeta(x)} -- Riemann zeta function @math{\zeta(s) = \sum_@{k=1@}^\infty k^@{-s@}} for arbitrary s!=1, @samp{eta(x)} -- eta function @math{\eta(s) = (1-2^@{1-s@}) \zeta(s)} for arbitrary s, @samp{lp(l,x)} -- Legendre polynomial @math{P_l(x)}, (|x|<=1, l>=0), @samp{w0(x)} -- principal branch of the Lambert @var{W} function, @samp{w1(x)} -- principal branch of the Lambert @var{W} function. Function W(x) is defined to be solution of the equation @math{W \exp(W) = x}. -+ -+The exponent integrals are: @samp{ci(x)} -- Cosine integral @math{Ci(x) = \int_0^x dt \cos(t)/t}, @samp{si(x)} -- Sine integral @math{Si(x) = \int_0^x dt \sin(t)/t}, @samp{erf(x)} -- error function @math{erf(x) = (2/\sqrt(\pi)) \int_0^x dt \exp(-t^2)}, @samp{ei(x)} -- exponential integral @math{Ei(x) := - PV(\int_@{-x@}^\infty dt \exp(-t)/t)} (where PV denotes the principal value of the integral), @samp{e1(x)} -- exponential integral @math{E_1(x) := Re \int_1^\infty dt \exp(-xt)/t} , @samp{e2(x)} -- exponential integral @math{E_2(x) := Re \int_1^\infty dt \exp(-xt)/t^2}, @samp{ei3(x)} -- exponential integral @math{Ei_3(x) = \int_0^x dt \exp(-t^3)} for x>=0. -+ -+Bessel functions are: @samp{j(nu,x)} -- regular cylindrical Bessel function of fractional order @var{nu}, @samp{y(nu,x)} -- irregular cylindrical Bessel function of fractional order @var{nu}, @samp{i(nu,x)} -- regular modified Bessel function of fractional order @var{nu}, @samp{k(nu,x)} -- irregular modified Bessel function of fractional order @var{nu}. -+ -+Elliptic integrals are: @samp{ee(k)} -- complete elliptic integral is denoted by @math{E(k) = E(\pi/2, k)}, @samp{ek(k)} -- complete elliptic integral is denoted by @math{K(k) = F(\pi/2, k)}, @samp{e(phi,k)} -- elliptic integral @math{E(\phi,k) = \int_0^\phi dt \sqrt((1 - k^2 \sin^2(t)))}, @samp{f(phi,k)} -- elliptic integral @math{F(\phi,k) = \int_0^\phi dt 1/\sqrt((1 - k^2 \sin^2(t)))}. -+ -+Jacobi elliptic functions are: @samp{sn(u,m)}, @samp{cn(u,m)}, @samp{dn(u,m)}, @samp{sc(u,m)}, @samp{sd(u,m)}, @samp{ns(u,m)}, @samp{cs(u,m)}, @samp{cd(u,m)}, @samp{nc(u,m)}, @samp{ds(u,m)}, @samp{dc(u,m)}, @samp{nd(u,m)}. -+ -+Note, some of these functions are unavailable if NO\_GSL is defined during compilation of MathGL library. -+ -+@deftypemethod mglFormula @code{} mglFormula (@code{const char *}str) -+Parses the formula @var{str} and creates formula-tree. Constructor recursively parses the formula and creates a tree-like structure containing functions and operators for fast further evaluating by @code{Calc()} or @code{CalcD()} functions. -+@end deftypemethod -+@deftypemethod mglFormula @code{float} Calc (@code{float} x, @code{float} y=@code{0}, @code{float} z=@code{0}, @code{float} u=@code{0}) -+Evaluates the formula for @code{'x','r'}=@var{x}, @code{'y','n'}=@var{y}, @code{'z','t'}=@var{z}, @code{'a','u'}=@var{u}. Error code (if one) can be obtained from function @code{GetError()}. -+@end deftypemethod -+@deftypemethod mglFormula @code{float} Calc (@code{float} x, @code{float} y, @code{float} z, @code{float} u, @code{float} v, @code{float} w) -+Evaluates the formula for @code{'x'}=@var{x}, @code{'y'}=@var{y}, @code{'z'}=@var{z}, @code{'u'}=@var{u}, @code{'v'}=@var{v}, @code{'w'}=@var{w}. Error code (if one) can be obtained from function @code{GetError()}. -+@end deftypemethod -+@deftypemethod mglFormula @code{float} Calc (@code{float} var@code{['z'-'a'+1]}) -+Evaluates the formula for variables in array @var{var}['z'-'a']. Error code (if one) can be obtained from function @code{GetError()}. -+@end deftypemethod -+@deftypemethod mglFormula @code{float} CalcD (@code{float} var@code{['z'-'a'+1]}, @code{char} diff) -+Evaluates the formula derivation respect to @var{diff} for variables in array @var{var}['z'-'a']. Error code (if one) can be obtained from function @code{GetError()}. -+@end deftypemethod -+@deftypemethod mglFormula @code{int} GetError () -+Returns error code: @code{0} means no error; @code{ERR_LOG} means error in logarithm or power functions; @code{ERR_ARC} means error in inverse functions (like asin); @code{ERR_SQRT} means error in sqrt function. -+@end deftypemethod -+ -+@c ------------------------------------------------------------------ -+@node mglFont class, mglColor class, mglFormula class, Other classes -+@section mglFont class -+@cindex mglFont -+ -+Class for working with font: load, get metrics, parse and draw strings. This class is defined in @code{#include }. -+ -+The class is based on loading and drawing of vector Hershey font. There are two styles of specifying of the font type and aligning: by integer parameters or by string. -+ -+The string can be any combination of characters: @samp{rbiLCRwou}. The font types are: @samp{r} -- roman font, @samp{i} -- italic style, @samp{b} -- bold style. By default roman font (that is @samp{} or @samp{r}) is used. The align types are: @samp{L} -- align left (default), @samp{C} -- align center, @samp{R} -- align right. Additional font effects are: @samp{w} -- wire, @samp{o} -- over-lined, @samp{u} -- underlined. -+ -+The over way of font and alignment setting is the using of the integer constant. Integer font Id can be one of predefined constants: @code{MGL_FONT_ITAL, MGL_FONT_BOLD, MGL_FONT_BOLD_ITAL = MGL_FONT_ITAL+MGL_FONT_BOLD}. Default font is @code{MGL_FONT_ROMAN}. Also there are flags @code{MGL_FONT_ULINE, MGL_FONT_OLINE, MGL_FONT_WIRE} for additional font effects. Align parameter controls the text alignment: 0 -- align left, 1 -- align center, 2 -- align right. -+ -+Parsing of the string to special (TeX-like) commands will be done if variable @var{parse} is true (it's default). There are commands for the font style changing inside the string (for example, use \b for bold font): \a or \overline -- over-lined, \b or \textbf -- bold, \i or \textit -- italic, \r or \textrm -- roman (disable bold and italic attributes), \u or \underline -- underlined, \w or \wire -- wired, \big -- bigger size, @@ -- smaller size. The lower and upper indexes are specified by @samp{_} and @samp{^} symbols. At this the changed font style is applied only on next symbol or symbols in braces @{@}. The text in braces @{@} are treated as single symbol that allow one to print the index of index. For example, compare the strings @samp{sin (x^@{2^3@})} and @samp{sin (x^2^3)}. You may also change text color inside string by command #? or by \color? where @samp{?} is symbolic id of the color (@pxref{mglColor class}). For example, words @samp{Blue} and @samp{red} will be colored in the string @samp{#b@{Blue@} and \colorr@{red@} text}. -+ -+The most of commands for special TeX or AMSTeX symbols, the commands for font style changing (\textrm, \textbf, \textit, \overline, \underline), accents (\hat, \tilde, \dot, \ddot, \acute, \check, \grave, \bar, \breve) and roots (\sqrt, \sqrt3, \sqrt4) are recognized. The full list contain approximately 2000 commands. Note that first space symbol after the command is ignored, but second one is printed as normal symbol (space). For example, the following strings produce the same result @math{\tilde a}: @samp{\tilde@{a@}}; @samp{\tilde a}; @samp{\tilde@{@}a}. -+ -+@ifhtml -+@html -+The Greek letters are recognizable special symbols: α – \alpha, β – \beta, γ – \gamma, δ – \delta, ε – \epsilon, η – \eta, ι – \iota, χ – \chi, κ – \kappa, λ – \lambda, μ – \mu, ν – \nu, o – \o, ω – \omega, ϕ – \phi, π – \pi, ψ – \psi, ρ – \rho, σ – \sigma, θ – \theta, τ – \tau, υ – \upsilon, ξ – \xi, ζ – \zeta, ς – \varsigma, ɛ – \varepsilon, ϑ – \vartheta, φ – \varphi, ϰ – \varkappa; A – \Alpha, B – \Beta, Γ – \Gamma, Δ – \Delta, E – \Epsilon, H – \Eta, I – \Iota, C – \Chi, K – \Kappa, Λ – \Lambda, M – \Mu, N – \Nu, O – \O, Ω – \Omega, Φ – \Phi, Π – \Pi, Ψ – \Psi, R – \Rho, Σ – \Sigma, Θ – \Theta, T – \Tau, Υ – \Upsilon, Ξ – \Xi, Z – \Zeta. -+ -+

The small part of most common special TeX symbols are: ∠ – \angle, ⋅ – \cdot, ♣ – \clubsuit, ✓ – \checkmark, ∪ – \cup, ∩ – \cap, ♢ – \diamondsuit, ◇ – \diamond, ÷ -+ – \div, -+↓ – \downarrow, † – \dag, ‡ – \ddag, ≡ – \equiv, ∃ – \exists, ⌢ – \frown, ♭ – \flat, ≥ – \ge, ≥ – \geq, ≧ – \geqq, ← – \gets, ♡ – \heartsuit, ∞ – \infty, ∫ – \int, \Int, ℑ – \Im, ♢ – \lozenge, ⟨ – \langle, ≤ – \le, ≤ – \leq, ≦ – \leqq, ← – \leftarrow, ∓ – \mp, ∇ – \nabla, ≠ – \ne, ≠ – \neq, ♮ – \natural, ∮ – \oint, ⊙ – \odot, ⊕ – \oplus, ∂ – \partial, ∥ – \parallel, ⊥ –\perp, ± – \pm, ∝ – \propto, ∏ – \prod, ℜ – \Re, → – \rightarrow, ⟩ – \rangle, ♠ – \spadesuit, ~ – \sim, ⌣ – \smile, ⊂ – \subset, ⊃ – \supset, √ – \sqrt or \surd, § – \S, ♯ – \sharp, ∑ – \sum, × – \times, → – \to, ∴ – \therefore, ↑ – \uparrow, ℘ – \wp.

-+@end html -+@end ifhtml -+@ifnothtml -+The Greek letters are recognizable special symbols: @math{\alpha} -- \alpha, @math{\beta} -- \beta, @math{\gamma} -- \gamma, @math{\delta} -- \delta, @math{\epsilon} -- \epsilon, @math{\eta} -- \eta, @math{\iota} -- \iota, @math{\chi} -- \chi, @math{\kappa} -- \kappa, @math{\lambda} -- \lambda, @math{\mu} -- \mu, @math{\nu} -- \nu, @math{o} -- \o, @math{\omega} -- \omega, @math{\phi} -- \phi, @math{\pi} -- \pi, @math{\psi} -- \psi, @math{\rho} -- \rho, @math{\sigma} -- \sigma, @math{\theta} -- \theta, @math{\tau} -- \tau, @math{\upsilon} -- \upsilon, @math{\xi} -- \xi, @math{\zeta} -- \zeta, @math{\varsigma} -- \varsigma, @math{\varepsilon} -- \varepsilon, @math{\vartheta} -- \vartheta, @math{\varphi} -- \varphi, A -- \Alpha, B -- \Beta, @math{\Gamma} -- \Gamma, @math{\Delta} -- \Delta, E -- \Epsilon, H -- \Eta, I -- \Iota, C -- \Chi, K -- \Kappa, @math{\Lambda} -- \Lambda, M -- \Mu, N -- \Nu, O -- \O, @math{\Omega} -- \Omega, @math{\Phi} -- \Phi, @math{\Pi} -- \Pi, @math{\Psi} -- \Psi, R -- \Rho, @math{\Sigma} -- \Sigma, @math{\Theta} -- \Theta, T -- \Tau, @math{\Upsilon} -- \Upsilon, @math{\Xi} -- \Xi, Z -- \Zeta. -+ -+The small part of most common special TeX symbols are: @math{\angle} -- \angle, @math{\aleph} -- \aleph, @math{\cdot} -- \cdot, @math{\clubsuit} -- \clubsuit, @math{\cup} -- \cup, @math{\cap} -- \cap, @math{\diamondsuit} -- \diamondsuit, @math{\diamond} -- \diamond, @math{\div} -- \div, @math{\downarrow} -- \downarrow, @math{\dag} -- \dag, @math{\ddag} -- \ddag, @math{\equiv} -- \equiv, @math{\exists} -- \exists, @math{\frown} -- \frown, @math{\flat} -- \flat, @math{\ge} -- \ge, @math{\geq} -- \geq, @math{\gets} -- \gets, @math{\heartsuit} -- \heartsuit, @math{\infty} -- \infty, @math{\in} -- \in, @math{\int} -- \int, @math{\Im} -- \Im, @math{\langle} -- \langle, @math{\le} -- \le, @math{\leq} -- \leq, @math{\leftarrow} -- \leftarrow, @math{\mp} -- \mp, @math{\nabla} -- \nabla, @math{\ne} -- \ne, @math{\neq} -- \neq, @math{\natural} -- \natural, @math{\oint} -- \oint, @math{\odot} -- \odot, @math{\oplus} -- \oplus, @math{\partial} -- \partial, @math{\parallel} -- \parallel, @math{\perp} -- \perp, @math{\pm} -- \pm, @math{\propto} -- \propto, @math{\prod} -- \prod, @math{\Re} -- \Re, @math{\rightarrow} -- \rightarrow, @math{\rangle} -- \rangle, @math{\spadesuit} -- \spadesuit, @math{\sim} -- \sim, @math{\smile} -- \smile, @math{\subset} -- \subset, @math{\supset} -- \supset, @math{\surd} -- \sqrt or \surd, @math{\S} -- \S, @math{\sharp} -- \sharp, @math{\sum} -- \sum, @math{\times} -- \times, @math{\to} -- \to, @math{\uparrow} -- \uparrow, @math{\wp} -- \wp and so on. -+@end ifnothtml -+ -+@menu -+* Format of font files:: -+@end menu -+ -+ -+@deftypemethod mglFont @code{} mglFont (@code{const char *}name=@code{MGL_DEF_FONT_NAME}, @code{const char *}path=@code{NULL}) -+Initialize the font and load data from file @var{name} (default name is "STIX" for Linux and MacOS) or if @var{name}=@code{NULL} limited data from memory (default for Windows). -+@end deftypemethod -+@deftypemethod mglFont @code{bool} Load (@code{const char *} base, @code{const char *}path=@code{NULL}) -+Load font from file @var{path}/@var{base} into the memory. The font may contain 4 files: @var{base}.vfm, @var{base}_b.vfm, @var{base}_i.vfm, @var{base}_bi.vfm. Appendix contain detailed description of font format. -+@end deftypemethod -+@deftypemethod mglFont @code{void} Restore () -+Restore default font. -+@end deftypemethod -+@deftypemethod mglFont @code{void} (@code{mglFont *} fnt) -+Copy data from other font instance. -+@end deftypemethod -+@deftypemethod mglFont @code{void} Clear () -+Clear memory by deleting the loaded font. -+@end deftypemethod -+@deftypemethod mglFont @code{inline unsigned} GetNumGlyph () -+Return the number of glyphs in the font. -+@end deftypemethod -+@deftypemethod mglFont @code{inline bool} Ready () -+Return true if font is loaded and ready for use. -+@end deftypemethod -+ -+ -+@deftypemethod mglFont @code{float} Height (@code{int} font) -+Gets height of text for font specified by integer constant. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Puts (@code{const char *}str, @code{int} font=@code{0}, @code{int} align=@code{0}) -+Prints 8-bit text string for font specified by integer constant. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Width (@code{const char *}str, @code{int} font=@code{0}) -+Gets width of 8-bit text string for font specified by integer constant. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Puts (@code{const wchar_t *}str, @code{int} font=@code{0}, @code{int} align=@code{0}) -+Prints Unicode text string for font specified by integer constant. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Width (@code{const wchar_t *}str, @code{int} font=@code{0}) -+Gets width of Unicode text string for font specified by integer constant. -+@end deftypemethod -+ -+ -+@deftypemethod mglFont @code{float} Height (@code{const char *}how) -+Gets height of text for font specified by string. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Puts (@code{const char *}str, @code{const char *}how) -+Prints 8-bit text string for font specified by string. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Width (@code{const char *}str, @code{const char *}how) -+Gets width of 8-bit text string for font specified by string. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Puts (@code{const wchar_t *}str, @code{const char *}how) -+Prints Unicode text string for font specified by string. -+@end deftypemethod -+@deftypemethod mglFont @code{float} Width (@code{const wchar_t *}str, @code{const char *}how) -+Gets width of Unicode text string for font specified by string. -+@end deftypemethod -+ -+@deftypecv {Parameter} mglFont @code{mglGraph *} gr -+Instance of mglGraph class which is used for character drawing. -+@end deftypecv -+@deftypecv {Parameter} mglFont @code{bool} parse -+Flag for switching on/off the parsing of TeX commands. Default value is @code{true}. -+@end deftypecv -+ -+@c ------------------------------------------------------------------ -+@node Format of font files, , , mglFont class -+@subsection Format of font files -+ -+Starting from v.1.6 the MathGL library uses new font files. The font is defined in 4 files with suffixes @samp{*.vfm}, @samp{*_b.vfm}, @samp{*_i.vfm}, @samp{*_bi.vfm}. These files are text files containing the data for roman font, bold font, italic font and bold italic font. The files (or some symbols in the files) for bold, italic or bold italic fonts can be absent. In this case the roman glyph will be used for them. By analogy, if the bold italic font is absent but the bold font is present then bold glyph will be used for bold italic. You may create these font files by yourself from *.ttf, *.otf files with the help of program @code{font_tools}. This program can be found at MathGL home site. -+ -+The format of font files (*.vfm -- vector font for MathGL) is the following. -+@enumerate -+@item -+First string contains human readable comment and is always ignored. -+@item -+Second string contains 3 numbers, delimited by space or tabulation. The order of numbers is the following: @var{numg} -- the number of glyphs in the file (integer), @var{fact} -- the factor for glyph sizing (float), @var{size} -- the size of buffer for glyph description (integer). -+@item -+After it @var{numg}-th strings with glyphs description are placed. Each string contains 6 positive numbers, delimited by space of tabulation. The order of numbers is the following: Unicode glyph ID, glyph width, number of lines in glyph, position of lines coordinates in the buffer (length is 2*number of lines), number of triangles in glyph, position of triangles coordinates in the buffer (length is 6*number of triangles). -+@item -+The end of file contains the buffer with point coordinates at lines or triangles vertexes. The size of buffer (the number of integer) is @var{size}. -+@end enumerate -+ -+Note: the closing contour line is done automatically (so the last segment may be absent). For starting new contour use a point with coordinates @code{@{0x3fff, 0x3fff@}}. -+ -+ -+@c ------------------------------------------------------------------ -+@node mglColor class, mglPoint class, mglFont class, Other classes -+@section mglColor class -+@cindex mglColor -+ -+Structure for working with colors. This structure is defined in @code{#include }. -+ -+There are two ways to set the color in MathGL. First one is using of float values of red, green and blue channels for precise color definition. The second way is the using of character id. There are a set of characters specifying frequently used colors. Normally capital letter gives more dark color than lowercase one. The full list of characters is: @samp{k} -- black, @samp{r} -- red, @samp{R} -- dark red, @samp{g} -- green, @samp{G} -- dark green, @samp{b} -- blue, @samp{B} -- dark blue, @samp{c} -- cyan, @samp{C} -- dark cyan, @samp{m} -- magenta, @samp{M} -- dark magenta, @samp{y} -- yellow, @samp{Y} -- dark yellow (gold), @samp{h} -- gray, @samp{H} -- dark gray, @samp{w} -- white, @samp{W} -- bright gray, @samp{l} -- green-blue, @samp{L} -- dark green-blue, @samp{e} -- green-yellow, @samp{E} -- dark green-yellow, @samp{n} -- sky-blue, @samp{N} -- dark sky-blue, @samp{u} -- blue-violet, @samp{U} -- dark blue-violet, @samp{p} -- purple, @samp{P} -- dark purple, @samp{q} -- orange, @samp{Q} -- dark orange (brown). -+ -+Also you may use ``lighted'' colors in color scheme specification (@emph{not in line style!}). The ``lighted'' color contain 2 symbols: first one is usual symbol for color specification, second one is digit for its brightness. The digit can be in range @samp{1}...@samp{9}. At this @samp{5} correspond to normal color, @samp{1} is very dark version of the color (practically black), @samp{9} is very bright version of the color (practically white). -+ -+@float -+@image{png/colors, 7cm} -+@caption{Colors and its ids.} -+@end float -+ -+@deftypecv {Parameter} mglVar @code{float} {r, g, b} -+Reg, green and blue component of color. -+@end deftypecv -+ -+@deftypemethod mglColor @code{} mglColor (@code{float} R, @code{float} G, @code{float} B) -+Constructor sets the color by float values of Red, Green and Blue channels. -+@end deftypemethod -+@deftypemethod mglColor @code{} mglColor (@code{char} c=@code{'k'}) -+Constructor sets the color from character id. The black color is used by default. -+@end deftypemethod -+@deftypemethod mglColor @code{void} Set (@code{float} R, @code{float} G, @code{float} B) -+Sets color from values of Red, Green and Blue channels. This values should be in interval [0,1]. -+@end deftypemethod -+@deftypemethod mglColor @code{void} Set (@code{mglColor} c, @code{float} bright=@code{1}) -+Sets color as ``lighted'' version of color @var{c}. -+@end deftypemethod -+@deftypemethod mglColor @code{void} Set (@code{char} p) -+Sets color from symbolic id. -+@end deftypemethod -+@deftypemethod mglColor @code{bool} Valid () -+Checks correctness of the color. -+@end deftypemethod -+@deftypemethod mglColor @code{float} Norm () -+Gets maximal of spectral component. -+@end deftypemethod -+@deftypemethod mglColor @code{bool} operator== (@code{const mglColor &}c) -+Compare with another color -+@end deftypemethod -+ -+@deftypefn {Library Function} {inline mglColor} operator+ (@code{const mglColor &}a, @code{const mglColor &}b) -+Adds colors by its RGB values. -+@end deftypefn -+@deftypefn {Library Function} {inline mglColor} operator- (@code{const mglColor &}a, @code{const mglColor &}b) -+Subtracts colors by its RGB values. -+@end deftypefn -+@deftypefn {Library Function} {inline mglColor} operator* (@code{const mglColor &}a, @code{float} b) -+Multiplies color by number. -+@end deftypefn -+@deftypefn {Library Function} {inline mglColor} operator* (@code{float} a, @code{const mglColor &}b) -+Multiplies color by number. -+@end deftypefn -+@deftypefn {Library Function} {inline mglColor} operator/ (@code{const mglColor &}a, @code{float} b) -+Divide color by number. -+@end deftypefn -+@deftypefn {Library Function} {inline mglColor} operator! (@code{const mglColor &}a) -+Return inverted color. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node mglPoint class, mglArg class, mglColor class, Other classes -+@section mglPoint class -+@cindex mglPoint -+ -+Structure describes point in space. This structure is defined in @code{#include } -+ -+@deftypecv {Parameter} mglVar @code{float} {x, y, z} -+Point coordinates. By default all values are zero. -+@end deftypecv -+ -+@deftypefn {Library Function} {inline mglPoint} operator+ (@code{const mglPoint &}a, @code{const mglPoint &}b) -+Point of summation (summation of vectors). -+@end deftypefn -+@deftypefn {Library Function} {inline mglPoint} operator- (@code{const mglPoint &}a, @code{const mglPoint &}b) -+Point of difference (difference of vectors). -+@end deftypefn -+@deftypefn {Library Function} {inline mglPoint} operator* (@code{float} a, @code{const mglPoint &}b) -+Multiplies (scale) points by number. -+@end deftypefn -+@deftypefn {Library Function} {inline mglPoint} operator* (@code{const mglPoint &}a, @code{float} b) -+Multiplies (scale) points by number. -+@end deftypefn -+@deftypefn {Library Function} {inline mglPoint} operator/ (@code{const mglPoint &}a, @code{float} b) -+Multiplies (scale) points by number 1/b. -+@end deftypefn -+@deftypefn {Library Function} {inline float} operator- (@code{const mglPoint &}a, @code{const mglPoint &}b) -+Scalar product of vectors. -+@end deftypefn -+@deftypefn {Library Function} {inline mglPoint} operator^ (@code{const mglPoint &}a, @code{const mglPoint &}b) -+Cross-product of vectors. -+@end deftypefn -+@deftypefn {Library Function} {inline mglPoint} operator& (@code{const mglPoint &}a, @code{const mglPoint &}b) -+The part of @var{a} which is perpendicular to vector @var{b}. -+@end deftypefn -+@deftypefn {Library Function} {inline mglPoint} operator| (@code{const mglPoint &}a, @code{const mglPoint &}b) -+The part of @var{a} which is parallel to vector @var{b}. -+@end deftypefn -+ -+@deftypefn {Library Function} {inline mglPoint} operator! (@code{const mglPoint &}a) -+Return vector perpendicular to vector @var{a}. -+@end deftypefn -+@deftypefn {Library Function} {inline bool} Norm (@code{const mglPoint &}a) -+Return the norm |@var{a}|^2 of vector @var{a}. -+@end deftypefn -+ -+@deftypefn {Library Function} {inline bool} operator== (@code{const mglPoint &}a, @code{const mglPoint &}b) -+Return true if points are the same. -+@end deftypefn -+@deftypefn {Library Function} {inline bool} operator!= (@code{const mglPoint &}a, @code{const mglPoint &}b) -+Return true if points are different. -+@end deftypefn -+ -+@c ------------------------------------------------------------------ -+@node mglVar class, mglCommand class, mglArg class, Other classes -+@section mglVar class -+@cindex mglVar -+ -+Structure describes variable of type @code{mglData} and its name in MGL script. This structure is used by @code{mglParse} and is defined in @code{#include }. -+ -+@deftypecv {Parameter} mglVar @code{mglData} d -+Data itself -+@end deftypecv -+@deftypecv {Parameter} mglVar @code{wchar_t} s[256] -+Data name -+@end deftypecv -+@deftypecv {Parameter} mglVar @code{void *} o -+Pointer to external object for function @var{func}. -+@end deftypecv -+@deftypecv {Parameter} mglVar @code{mglVar *} next -+Pointer to next instance in list -+@end deftypecv -+@deftypecv {Parameter} mglVar @code{mglVar *} prev -+Pointer to prev instance in list -+@end deftypecv -+@deftypecv {Parameter} mglVar @code{bool} temp -+Flag for temporar variable. Temporal variables will be destroyed after script execution. -+@end deftypecv -+@deftypecv {Parameter} mglVar @code{void (*} func @code{)(void *)} -+Callback function for destroying non-temporal variable. -+@end deftypecv -+ -+@deftypemethod mglGraphAB @code{void} MoveAfter (@code{mglVar *}var) -+Move variable after @var{var} and copy @code{func} from @code{var} (if @code{func} is not 0) -+@end deftypemethod -+ -+ -+@c ------------------------------------------------------------------ -+@node mglCommand class, , mglVar class, Other classes -+@section mglCommand class -+@cindex mglCommand -+ -+Structure describes MGL command, its name, short description, executable and export functions. The structure is used by @code{mglParse} and is defined in @code{#include }. -+ -+@deftypecv {Parameter} mglCommand @code{const wchar_t *} name -+Name of command. -+@end deftypecv -+@deftypecv {Parameter} mglCommand @code{const wchar_t *} desc -+Short command description (can be NULL). -+@end deftypecv -+@deftypecv {Parameter} mglCommand @code{const wchar_t *} form -+Format of command arguments (can be NULL). -+@end deftypecv -+@deftypecv {Parameter} mglCommand @code{int (*} exec @code{)(mglGraph *gr, long n, mglArg *a, int k[10])const wchar_t *} -+Function for executing (plotting) the command using grapher @var{gr} and having @var{n}-th arguments @var{a}. Function must return 0 if all is OK; or 1 if arguments are wrong. -+@end deftypecv -+@deftypecv {Parameter} mglCommand @code{void (*} save @code{)(wchar_t out[1024], long n, mglArg *a, int k[10])const wchar_t *} -+Function for exporting in C++ (can be NULL). -+@end deftypecv -+ -+ -+@c ------------------------------------------------------------------ -+@node mglArg class, mglVar class, mglPoint class, Other classes -+@section mglArg class -+@cindex mglArg -+ -+Structure describes arguments of functions in the stucture @code{mglCommand}. It is defined in @code{#include }. -+ -+@deftypecv {Parameter} mglArg @code{int} type -+Type of argument: 0-data, 1-string, 2-number. -+@end deftypecv -+@deftypecv {Parameter} mglArg @code{mglData *} d -+Pointer to data (used if type=0). -+@end deftypecv -+@deftypecv {Parameter} mglArg @code{wchar_t} w[2048] -+String with parameters (used if type=1 or if type=0 as variable name). -+@end deftypecv -+@deftypecv {Parameter} mglArg @code{char} s[2048] -+String with parameters (used if type=1). -+@end deftypecv -+@deftypecv {Parameter} mglArg @code{float} v -+Numerical value (used if type==2) -+@end deftypecv -+ ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/overview.texi -@@ -0,0 +1,315 @@ -+ -+@node Overview, Examples, , Top -+@chapter Overview -+ -+@cindex MathGL overview -+ -+MathGL is ... -+@itemize @bullet -+@item -+a library for making high-quality scientific graphics under Linux and Windows; -+@item -+a library for the fast data plotting and handling of large data arrays; -+@item -+a library for working in window and console modes and for easy embedding into other programs; -+@item -+a library with large and growing set of graphics. -+@end itemize -+ -+@menu -+* Why I have written MathGL?:: -+* MathGL features:: -+* Installation and using:: -+* General concepts:: -+* FAQ:: -+* Thanks:: -+@end menu -+ -+@node Why I have written MathGL?, MathGL features, , Overview -+@section Why I have written MathGL? -+ -+The code for making high-quality scientific graphics under Linux and Windows. The code for the fast handling and plotting of large data arrays. The code for working in window and console regimes and for easy including into another program. The code with large and renewal set of graphics. Exactly such code I was looking for during last years. Exactly such code I tried to realize in MathGL library. -+ -+At this version (@value{VERSION}) MathGL has more than 20000 code strings, more than 40 general types of graphics for 1d, 2d and 3d data arrays. It can export graphics to bitmap and vector (EPS or SVG) files. It has OpenGL interface and can be used from console programs. It has functions for data handling and script MGL language for simplification of data plotting. Also it has several types of transparency and smoothed lightning, vector fonts and TeX-like symbol parsing, arbitrary curvilinear coordinate system and many over useful things (see pictures section at @uref{http://mathgl.sf.net/, homepage}). Finally it is a platform independent and free (under GPL v.2.0 or later license). -+ -+@node MathGL features, Installation and using, Why I have written MathGL?, Overview -+@section MathGL features -+ -+MathGL can plot wide range of graphics. It includes: -+@itemize @bullet -+@item -+one-dimensional (Plot, Area, Bars, Step, Stem, Torus, Chart, Error, Tube, Mark, @pxref{1D plotting}); -+ -+@item -+two-dimensional plots (Mesh, Surf, Dens, Cont, ContF, Boxs, Axial, Fall, Belt, Tile, @pxref{2D plotting}); -+ -+@item -+three-dimensional plots (Surf3, Dens3, Cont3, ContF3, Cloud-like, @pxref{3D plotting}); -+ -+@item -+dual data plots: vector fields Vect and VectC, flow threads Flow, mapping chart Map, surfaces and isosurfaces transpared or colored (i.e. its transparency or color is depend on) by other data SurfA, SurfC, Surf3A, Surf3C (@pxref{Dual plotting}); -+ -+@item -+and so on. For detail @xref{MathGL core}. -+@end itemize -+ -+In fact, I created functions for drawing of all scientific plots that I know. The list of plots is enlarging, so if you need some special type of plot then write me @email{mathgl.abalakin@@gmail.com, e-mail} and it will appear in new version. -+ -+I tried to make plots as well-looking as possible: surface can be transparent and highlighted by several (up to 10) light sources. Most of drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of plot (including parametric representation). Resulting image can be saved in bitmap (with the help of mglGraphZB, mglGraphGL) PNG, JPEG, TIFF, BMP format or in vector EPS or SVG format (with the help of mglGraphPS), or in IDTF format (with the help of mglGraphIDTF) which can be converted in U3D. -+ -+All text are drawn by vector font, that allows high scalability and portability. Text may contain commands for: some of TeX-like symbols, changing index (upper or lower indexes) and style of font inside the text string (@pxref{mglFont class}). Texts of ticks are rotated with axis rotation. It is possible to create a legend of plot and put text in arbitrary position of plot. An arbitrary text encoding (by help of function @code{setlocale()}) and UTF-16 encoding are supported. -+ -+Special mglData class is used for data encapsulation (@pxref{mglData class}). Except safe creation and deletion of data arrays it includes functions for data processing (smoothing, differentiating, integrating, interpolating and so on) and reading of data files with automatic size determination. Class mglData can handle arrays with up to three dimensions (arrays which depend up to 3 independent indexes @math{a_@{ijk@}}). Using an array with higher number of dimensions is not reasonable because I do not know how it can be plotted. Data filling and modifying may be fulfilled manually or by textual formulas. -+ -+Class mglFormula class allows the fast evaluation of a textual mathematical expression (@pxref{mglFormula class}). It is based on string precompilation to tree-like code at creation of class instance. At evaluation stage code performs only fast tree-walk and returns the value of the expression. Except changing data values, textual formulas are used for drawing in @emph{arbitrary} curvilinear coordinates. A set of such curvilinear coordinates is limited only by user imagination but not a fixed list like polar, parabolic, spherical and so on. -+ -+@node Installation and using, General concepts, MathGL features, Overview -+@section Installation and using -+ -+MathGL can be installed by 3 ways. -+@enumerate -+@item -+Compile from sources. The standard script for autoconf/automake tools is included in library beginning from version 1.2.1. For its running one should execute 3 commands: @code{./configure} after it @code{make} and @code{make install} with root/sudo rights. Script @code{./configure} have several additional options which is switched off by default. They are: @code{--enable-fltk, --enable-glut, --enable-qt} for ebabling FLTK, GLUT and/or Qt windows; @code{--enable-jpeg, --enable-tiff, --enable-hdf5} for enabling corresponded file formats; @code{--enable-all} for enabling all additional features. The full list of options can be viewed by command @code{./configure --help}. -+@item -+Use precompiled binary. There are binaries for MinGW (platform Win32). For precompiled variant one needs only to unpack the archive to the compiler location (or in any other folder and setup paths). By default precompiled versions include the support of GSL (www.gsl.org) and PNG. So, one needs to have these libraries installed on system. -+@item -+Install precompiled versions from standard packages (RPM, deb, DevPak and so on, see @uref{http://mathgl.sf.net/download.html, Download} section at homepage). -+@end enumerate -+ -+At the own program compilation one needs to specify the linker key @code{-lmgl} for compilation in console program or with the external (not MathGL) window library. If one wants to use FLTK or GLUT windows then he needs to add the keys @code{-lmgl-fltk} or @code{-lmgl-glut}. Fortran users also should add C++ library by option @code{-lstdc++}. -+ -+@node General concepts, FAQ, Installation and using, Overview -+@section General concepts -+ -+The set of MathGL features is rather reach -- just the number of basic graphics types is more than 40. Also there are functions for data handling, plot setup and so on. In spite of it I tried to keep the similar style in function names and in the order of arguments. Mostly it is regarded for different drawing functions. -+ -+There are six most general (base) concepts: -+@enumerate -+@item -+@strong{Any picture is created in memory firstly.} The internal (memory) representation can be different: bitmap picture or the list of vector primitives. After it user may decide what he want: save to file, display on the screen, run animation, do additional editing and so on. This approach provides high portability of the program -- the source code will produce exactly the same picture in @emph{any} OS. Another big positive consequence is the ability to create the picture in console program (without window creating)! -+@item -+@strong{Every plot settings (style of lines, font, color scheme) are specified by string.} It provides convenience for user/programmer -- short string with parameters is more comprehensible than a large set of parameters. Also it provides portability -- the strings are the same in any OS so that it is not comprehensible to think about type of arguments. -+@item -+@strong{All functions have ``simplified'' and ``advanced'' forms.} It is done for user convenience. One needs to specify the only one data array in ``simplified'' form and will see the result. But one may set parametric dependence of coordinates and produce rather complex curves and surfaces in ``advanced'' form. In both cases the order of function arguments are the same: firstly data arrays, secondly the string with plot parameters, and later optional arguments for plot tunning. -+@item -+@strong{All data arrays for plotting are encapsulated in class mglData class.} It reduces the number of errors with memory working and provide the uniform interface for data of different types (float, double and so on) or for formulas plotting. -+@item -+@strong{All plots are vector plot.} The MathGL library is intended for handling scientific data which have vectorial nature (there are lines, faces, matrices and so on). As result vectorial representation is used in any cases! In addition the vectorial representation allows one to scale easily the plot -- change the canvas size by 2 times and the picture will proportionally scaled. -+@item -+@strong{New drawing never clears things drawn already.} This, in some sense, is unexpected, idea allows to create a lot of ``combined'' graphics. For example, for making a surface with contour lines one need to call the function of surface plotting and the function of contour lines plotting (in any order). At this the special functions (as it done in Matlab and some other plotting system) for making this ``combined'' plots are useless. Much more examples of such plots can be found in section @ref{Hints} and in home site (@uref{http://mathgl.sf.net/index.html}). -+@end enumerate -+ -+Except general concept I want consider on some non-trivial or non-usual general ideas -- plot positioning, axis specification and curvilinear coordinates, styles for lines, text and color scheme. -+ -+@menu -+* Coordinate axes:: -+* Line styles:: -+* Color scheme:: -+* Font style:: -+@end menu -+ -+ -+@node Coordinate axes, Line styles, , General concepts -+@subsection Coordinate axes -+ -+There is twofold axes representation in MathGL. First one consists in normalizing of the data point coordinates in box @var{Min}x@var{Max} (@pxref{Axis settings}). If @var{Cut} is @code{true} then the outlied points are omitted otherwise they are projected to the bounding box (@pxref{Cutting}). Also, the point will be omitted if it lies inside the box defined by @var{CutMin}x@var{CutMax} or if the value of formula @code{CutOff}() is nonzero for its cooridnates. After it transformation formulas are applied to the data point (@pxref{Transformation}). Finally, the data point is plotted by one of function. -+ -+There is possibility to set members @var{Max}, @var{Min} directly but one should call @code{RecalcBorder()} function to setup plotting routines. The more safe way is to set these values by calling @code{Axis()} function. In this case the function @code{RecalcBorder()} is called automatically. Another way to specify the size of axis is to set it as a minimal or maximal value of data array. Functions @code{XRange(), YRange(), ZRange()} do it. The second (optional) argument sets to replace the axis range or to join with the existed range. -+ -+The axis origin is defined by variable @var{Org} and is applied for all consequent calls of axes or grid drawing. By default, if this point lies outside the bounding box then it is projected to the one (variable @var{AutoOrg} control it). In the case if one of values of @var{Org} is equal to NAN then the corresponding value will be selected automatically. -+ -+There is 4-th axis @emph{c} (color axis or colorbar) in addition to usual axes @emph{x, y, z}. It sets the range of values for the surface coloring. Its borders are automatically set to values of Min.z, Max.z during the call of @code{Axis()} function. Also, there are direct change of the color range by setting of variables @var{Cmax}, @var{Cmax}, or calling functions @code{CAxis()} or @code{CRange()}. Use @code{Colorbar()} function for showing the colorbar. -+ -+The form (appearence) of tick labels is controlled by @code{SetTicks()} function and few variables (@pxref{Ticks}). It have 3 arguments: first one @var{d} set the tick step (if positive) or tick number (if negative) or switch logarithmic ticks on (if zero); second one @var{ns} set the number of subticks; last one is the starting point for ticks (default is axis origin). The variable @var{TuneTicks} switches on/off ticks enhancing by the detaching of the common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values) or common component (for narrow range, like from 0.999 to 1.000). Finally, you may use variables @var{xtt}, @var{ytt}, @var{ztt}, @var{ctt} for setting templates for tick labels (it supports TeX symbols). Also, there is a possibility to print arbitrary text as tick labels if one defines the pointer (name) of function @var{TickStr}. -+ -+@node Line styles, Color scheme, Coordinate axes, General concepts -+@subsection Line styles -+ -+@cindex Line style -+@cindex Mark style -+@cindex Arrows -+ -+The line style is defined by the string which may contain specifications for color (@samp{wkrgbcymhRGBCYMHWlenupqLENUPQ}), dashing style (@samp{-|;:ji} or space), width (@samp{0123456789}) and marks (@samp{o+xsd.^v} and @samp{#} modifier). If one of type of information is omitted then default values with the previous color are used. -+ -+The color types are the same as described in mglColor class (@pxref{mglColor class}): @samp{k} -- black, @samp{r} -- red, @samp{R} -- dark red, @samp{g} -- green, @samp{G} -- dark green, @samp{b} -- blue, @samp{B} -- dark blue, @samp{c} -- cyan, @samp{C} -- dark cyan, @samp{m} -- magenta, @samp{M} -- dark magenta, @samp{y} -- yellow, @samp{Y} -- dark yellow (gold), @samp{h} -- gray, @samp{H} -- dark gray, @samp{w} -- white, @samp{W} -- bright gray, @samp{l} -- green-blue, @samp{L} -- dark green-blue, @samp{e} -- green-yellow, @samp{E} -- dark green-yellow, @samp{n} -- sky-blue, @samp{N} -- dark sky-blue, @samp{u} -- blue-violet, @samp{U} -- dark blue-violet, @samp{p} -- purple, @samp{P} -- dark purple, @samp{q} -- orange, @samp{Q} -- dark orange (brown). -+ -+Dashing styles has the following meaning: space -- no line (usable for plotting only marks), @samp{-} -- solid line (################), @samp{|} -- dashed line (########________), @samp{;} -- small dashed line (####____####____), @samp{:} -- dotted line (#___#___#___#___), @samp{j} -- dash-dotted line (#######____#____), @samp{i} -- small dash-dotted line (###__#__###__#__). -+ -+Marker types are: @samp{o} -- circle, @samp{+} -- cross, @samp{x} -- skew cross, @samp{s} - square, @samp{d} - rhomb (or diamond), @samp{.} -- point, @samp{^} -- triangle up, @samp{v} -- triangle down. If string contain symbol @samp{#} then the solid versions of markers are used. -+ -+@float -+@image{png/sample5, 7cm} -+@caption{Styles of lines and marks.} -+@end float -+ -+One may specify to draw a special symbol (an arrow) at the beginning and at the end of line. It is possible if the specification string contains one of the following symbols: @samp{A} -- outer arrow, @samp{V} -- inner arrow, @samp{I} -- transverse hachures, @samp{K} -- arrow with hachures, @samp{T} -- triangle, @samp{S} -- square, @samp{D} -- rhomb, @samp{O} -- circle, @samp{_} -- nothing (it is default). At this, there is a rule: first symbol specifies the arrow at the end of line, second one specifies the arrow at the beginning of line. For example, @samp{r-A} defines a red solid line with usual arrow at the end, @samp{b|AI} defines a blue dash line with an arrow at the end and with hachures at the start, @samp{_O} defines a line with the current style and with a circle at the start. These styles are applicable during the graphics plotting too (for example, @ref{Plot}). -+ -+@float -+@image{png/sampled, 7cm} -+@caption{Arrow styles.} -+@end float -+ -+@node Color scheme, Font style, Line styles, General concepts -+@subsection Color scheme -+ -+@cindex Color scheme -+ -+The color scheme is used for determining the color of surfaces, isolines, isosurfaces and so on. The color scheme is defined by the string which may contain several characters that are color id (@pxref{mglColor class} or @pxref{Line styles}) or characters @samp{d#:|}. Symbol @samp{d} denotes interpolation by 3d position instead of the coloring by amplitude. Symbol @samp{#} switch to mesh drawing or to wire plot. Symbol @samp{|} disable color interpolation in color scheme which can be usefull, for example, for sharp colors during matrix plotting. Symbol @samp{:} finishes the color scheme parsing. After it the user may put styles for text, rotation axis for curves/isolines and so on. Color scheme may contain up to 32 color values. -+ -+Also you may use ``lighted'' colors in color scheme specification (@emph{not in line style!}). The ``lighted'' color contain 2 symbols: first one is usual symbol for color specification, second one is digit for its brightness. The digit can be in range @samp{1}...@samp{9}. At this @samp{5} correspond to normal color, @samp{1} is very dark version of the color (practically black), @samp{9} is very bright version of the color (practically white). -+ -+@float -+@image{png/colors, 7cm} -+@caption{Colors and its ids.} -+@end float -+ -+For coloring by @emph{amplitude} (most common) the final color is linear interpolation of color array. The color array is constructed from the string ids. The argument is the amplitude normalized between @var{Cmin} -- @var{Cmax} (@pxref{Ranges (bounding box)}). For example, string containing 4 characters @samp{bcyr} corresponds to colorbar from blue (lowest value) through cyan (next value) through yellow (next value) to the red (highest value). String @samp{kw} corresponds to colorbar from black (lowest value) to white (highest value). String @samp{m} corresponds to a simple magenta color. -+ -+There are several useful combinations. String @samp{kw} corresponds to the simplest gray color scheme when higher values are brighter. String @samp{wk} presents the inverse gray color scheme when higher value is darker. Strings @samp{kRryw}, @samp{kGgw}, @samp{kBbcw} present well-known @emph{hot}, @emph{summer} and @emph{winter} color schemes. Strings @samp{BbwrR} and @samp{bBkRr} allow to view bicolor figure on white or black background when negative values are blue and positive values are red. String @samp{BbcyrR} gives color scheme similar to well-known @emph{jet} color scheme. -+ -+Examples of the most popular color schemes: -+@table @samp -+@item kw -+@image{png_static/kw} -+@item wk -+@image{png_static/wk} -+@item hHCcw -+@image{png_static/kHCcw} -+ -+@item kRryw -+@image{png_static/kRryw} -+@item kGgew -+@image{png_static/kGgew} -+@item kBbcw -+@image{png_static/kBbcw} -+ -+@item BbwrR -+@image{png_static/BbwrR} -+@item BbwgG -+@image{png_static/BbwgG} -+@item GgwmM -+@image{png_static/GgwmM} -+ -+@item bcwyr -+@image{png_static/bcwyr} -+@item QqwcC -+@image{png_static/QqwcC} -+@item CcwyY -+@image{png_static/CcwyY} -+ -+@item BbcyrR -+@image{png_static/BbcyrR} -+@item BbcwyrR -+@image{png_static/BbcwyrR} -+@item bwr -+@image{png_static/bwr} -+ -+@item bcyr -+@image{png_static/bcyr} -+@item bgr -+@image{png_static/bgr} -+@item BbcyrR| -+@image{png_static/sharp} -+@end table -+ -+For the coloring by @emph{coordinate} the final color is determined by position of the point in 3d space and is calculated by formula c=x*c[1] + y*c[2] + z*c[3]. Here c[1], c[2], c[3] are the first three elements of color array; x, y, z are normalized to @var{Min} -- @var{Max} coordinates of the point. This type of coloring is useful for isosurface plot when color may show the exact position of the peace of surface. For example, @pxref{Surf3}. -+ -+Also you may use ``lighted'' colors in color scheme specification (@emph{not in line style!}). The ``lighted'' color contain 2 symbols: first one is usual symbol for color specification, second one is digit for its brightness. The digit can be in range '1'...'9'. At this @samp{5} correspond to normal color, @samp{1} is very dark version of the color (practically black), @samp{9} is very bright version of the color (practically white). For example, the color scheme can be @samp{b2b7wr7r2}. -+ -+@node Font style, , Color scheme, General concepts -+@subsection Font style -+ -+@cindex Font style -+ -+Text style is specified by the string which may contain several characters of font (@samp{ribwou}) and/or align (@samp{LRC}) specifications. The string also may contain the color id characters @samp{wkrgbcymhRGBCYMHW} (@pxref{mglColor class}) after the symbol @samp{:}. For example, @samp{biC:b} sets the bold italic font text aligned at the center and with blue color. -+ -+The font types are: @samp{r} -- roman font, @samp{i} -- italic style, @samp{b} -- bold style. By default roman roman font is used. The align types are: @samp{L} -- align left (default), @samp{C} -- align center, @samp{R} -- align right. Additional font effects are: @samp{w} -- wired, @samp{o} -- over-lined, @samp{u} -- underlined. Also a parsing of the LaTeX-like syntax is provided (for detail, @pxref{mglFont class} and @ref{Font settings}). -+ -+The font size can be defined explicitly (if @var{size}>0) or relatively the base font size as |@var{size}|*@var{FontSize} (if @var{size}<0). The value @var{size}=0 specifies that the string will not be printed. The base font size is measured in internal ``MathGL'' units. Special functions @code{SetFontSizePT(), SetFontSizeCM(), SetFontSizeIN()} allow one to set it in more ``common'' variables for given dpi of the picture. -+ -+@node FAQ, Thanks, General concepts, Overview -+@section FAQ -+ -+@table @strong -+@item The plot does not appear -+Check that points of the plot lie inside the bounding box and resize the bounding box by @code{Axis()} function. Check that the data have correct dimensions for selected type of plot. Be sure that @code{Finish()} is called after the plotting functions (or be sure that the plot is saved to file). -+ -+@item I can not find some special kind of plot. -+Most of ``new'' type of plot can be created by using of the existing drawing functions. For example, the surface of curve rotation can be created by special function @code{Torus()} or as parametrically specified surface @code{Surf()}. See also, @ref{Hints} and @ref{Examples} of MathGL. If you can not find some type of plot then e-mail me and this plot will appear in the next version of MathGL library. -+ -+@item Should I know some graphical libraries (like OpenGL) for the using of MathGL library? -+No. The MathGL library is self-consistent and does not require the knowledge of external libraries. -+ -+@item In which language the library is written? For which languages the library has interface? -+The core of MathGL library is written on C++. But there are interfaces for pure C, Fortran, Pascal, Forth languages and its own command language MGL. Also there are a large set of interpreter languages support (Python, Java, ALLEGROCL, CHICKEN, Lisp, CFFI, C#, Guile, Lua, Modula 3, Mzscheme, Ocaml, Octave, Perl, PHP, Pike, R, Ruby, Tcl). These interfaces are written via SWIG (both pure C functions and classes) but only interface for Python and Octave is included in autoconf/automake script. The matter that I don't know any other interpreter languages :(. Note, the most of other languages can use (can link) pure C functions. -+ -+@item How I can use MathGL with Fortran? -+You can use MathGL as is with @code{gfortran} because it use by default AT&T notation for external functions. For other compilers (like, Visual Fortran) you have to switch on AT&T notation manually. The AT&T notation require that symbol @samp{_} is added at the end of function name, function argument(s) is passed by pointers and string length(s) is passed at the end of argument list. For example: -+ -+@emph{C function} -- @code{void mgl_fplot(HMGL graph, const char *fy, const char *stl, int n);} -+ -+@emph{AT&T function} -- @code{void mgl_fplot_(uintptr_t *graph, const char *fy, const char *stl, int *n, int ly, int ls);} -+ -+@item I have class Foo and drawing method Foo::draw(mglGraph *gr). How I can use it in FLTK or GLUT window? -+The member-functions of classes have hidden parameter (the pointer to a class instance) in C++. So, their direct usage is impossible. The solution is to write interface function: -+@example -+int foo_draw(mglGraph *gr, void *par) -+@{ ((Foo *)foo)->draw(gr); @} -+@end example -+and to use it in the call of @code{Window()} function: -+@example -+gr->Window(argc,argv,foo_draw,"Title",this); -+@end example -+ -+Alternatively you can inherit yours class from @code{mglDraw} class and use functions like @code{gr->Window(argc, argv, foo, "Title");}. -+ -+@item How can I print in Russia/Spanish/Arabian/Japanese and so on? -+The standard way is the using of Unicode encoding for the text output. But MathGL library also has interface for 8-bit (char *) strings with internal conversion to Unicode. This conversion depends on the current locale OS. You may change it by @code{setlocale()} function. For example, for Russian text in CP1251 encoding you may use @code{setlocale(LC_CTYPE, "ru_RU.cp1251");} (under MS Windows the name of locale may differ -- @code{setlocale(LC_CTYPE, "russian_russia.1251")}). I strongly recommend not to use the constant @code{LC_ALL} in conversion. Because it also changes the number format that may lead to mistakes in formulas writing and reading textual data files. For example, the program will await a @samp{,} as a decimal point but the user will enter @samp{.}. -+ -+@item How can I exclude a point or a region of plot from the drawing? -+There are 3 general ways. First, the point with @code{NAN} value of one of coordinate will never be plotted. Second, special variables @var{CutMin}, @var{CutMax} or function @code{CutOff}() define the condition when the points should be omitted (@pxref{Cutting}). Last, you may change the transparency of part of the plot by the help of functions @code{SurfA()}, @code{Surf3A()} (@pxref{Dual plotting}). In last case the transparency is switched on smoothly. -+ -+@item I use VisualStudio, CBuilder or some other compiler (not MinGW/gcc). How can I link MathGL library? -+There are 2 ways. First is use the precompiled binary (*.dll). In this case you should make libraries for yours compiler from *.dll and *.def files. The corresponding command may look like @code{lib.exe /def:libmgl.def}. But such way provide you only pure C functions, not C++ classes. The matter is that there is no standard for C++ functions naming in object files. The standard was accepted only for C functions. -+ -+The second way is to compile the library from sources. MathGL library have some external dependencies (PNG, GSL, JPEG, TIFF, FLTK, GLUT, HDF5), but most of them is optional. Some libraries can be found @uref{https://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177, here}. But also you may exclude from the project the corresponding files to disable usage of JPEG, TIFF, FLTK, GLUT, HDF5 libraries. Also you may define @code{NO_GSL} at compilation stage for disabling GSL support. At this some special functions in formulas, Fourier transform and nonlinear fitting will be disabled also. -+ -+For excluding PNG support just comment the body of functions @code{mgl_pnga_save(), mgl_png_save()} in @code{mgl_export.cpp}. After it MathGL library will not depend on any external libraries. But in this case you should redirect the output to some window (as bitmap drawing from mglGraphZB|PS::GetBits() or mglGraphZB|PS::GetRGBA()) and save this bitmap to a file by yourself. -+ -+@strong{Finally!} Please @emph{do not} ask me Windows-specific questions. I do not use Windows. I know nothing about Visual Basic, Visual C++, CBuiled or .NET. Please find the appropriate Usenet discussion group and ask your question there. -+ -+@item How many people write this library? -+The most of the library was written by one person. This is result of near a year of work (mostly in the evening and in holidays): half-year I spent for writing the kernel and half-year or year I spent for extending, improving and documentation writing. This process continues now :). The autoconf/automake script was written mostly by D.Kulagin, and export to IDTF was written mostly by M.Vidassov. Packages to particular platform (RPM or DEB) are prepared by other people (thanks to D. Kulagin, S. Plis, V. Lipatov and N. Troitsky). -+ -+@item How can I display a bitmap? -+You can import data into a mglData instance and display it by Dens() function. For example, for black-and-white bitmap you can use the code: @code{mglData bmp; bmp.Import("fname.png","wk"); gr->Dens(bmp,"wk");}. -+ -+@item How can I use MathGL in Qt, FLTK, wxWidgets ...? -+There are special classes (widgets) for these libraries: QMathGL for Qt, Fl_MathGL for FLTK and so on. If you don't find the appropriate class then you can create yours own widget which display a bitmap from mglGraphAB::GetBits(). -+ -+@item How can I create U3D file (make 3D in PDF)? -+There are 2 steps: first you should create IDTF file, and later convert it to U3D. You can use @uref{http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=300628, U3D tools} for converting IDTF file to U3D. It need @uref{http://libharu.org, libharu} 2.1.0 or later. For installation use @code{./bootstrap, ./configure, make, sudo make install}. It provide IDTFConverter program for converting textual files *.idtf to binary files *.u3d. Last ones can be included into PDF. -+ -+@item How I can change font family? -+First, you should download new font files from @uref{http://mathgl.sourceforge.net/download.html, here} or from @uref{http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177, here}. Next, you should load font files into mglGraph class instance @var{gr} by following command: @code{gr->SetFont(new mglFont(fontname,path));}. Here @var{fontname} is base font name like @samp{STIX} and @var{path} set the location of font files. Use @code{gr->SetFont(NULL);} for using default font. -+ -+@item How can I draw tick out of bounding box? -+Just set negative value for @var{TickLen}. For example, use @code{gr->SetTickLen(-0.1);}. -+ -+@end table -+ -+@node Thanks, , FAQ, Overview -+@section Thanks -+ -+@itemize @bullet -+@item -+My special thanks to Marina Balakina for the patience during library writing and for the help in documentation writing and spelling. -+@item -+I'm thankful to D. Kulagin and S.M. Plis for making Debian packages. -+@item -+I'm thankful to M. Vidassov for the help in handling solid UTF-8 fonts. -+@item -+I'm thankful to N. Troickiy and V. Lipatov for making RPM packages. -+@item -+I'm thankful to S. Skobelev, A. Korotkevich, V. Onuchin, S.M. Plis, R. Kiselev, A. Ivanov, M. Vidiassov and V. Lipatov for fruitful comments. -+@end itemize ---- mathgl-1.10.2.1.orig/texinfo/png/Makefile.in -+++ mathgl-1.10.2.1/texinfo/png/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -38,7 +38,11 @@ subdir = texinfo/png - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d ---- /dev/null -+++ mathgl-1.10.2.1/texinfo/png/Makefile -@@ -0,0 +1,469 @@ -+# Makefile.in generated by automake 1.11.1 from Makefile.am. -+# texinfo/png/Makefile. Generated from Makefile.in by configure. -+ -+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. -+ -+ -+ -+ -+pkgdatadir = $(datadir)/mathgl -+pkgincludedir = $(includedir)/mathgl -+pkglibdir = $(libdir)/mathgl -+pkglibexecdir = $(libexecdir)/mathgl -+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 = : -+build_triplet = x86_64-pc-linux-gnu -+host_triplet = x86_64-pc-linux-gnu -+subdir = texinfo/png -+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -+am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac -+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ -+ $(ACLOCAL_M4) -+mkinstalldirs = $(install_sh) -d -+CONFIG_HEADER = $(top_builddir)/include/mgl/config.h -+CONFIG_CLEAN_FILES = -+CONFIG_CLEAN_VPATH_FILES = -+SOURCES = -+DIST_SOURCES = -+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__installdirs = "$(DESTDIR)$(pngdir)" -+DATA = $(png_DATA) -+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -+ACLOCAL = ${SHELL} /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/config/missing --run aclocal-1.11 -+AMTAR = ${SHELL} /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/config/missing --run tar -+AM_CXXFLAGS = -Wall -I/usr/include -+AR = ar -+AS = as -+AUTOCONF = ${SHELL} /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/config/missing --run autoconf -+AUTOHEADER = ${SHELL} /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/config/missing --run autoheader -+AUTOMAKE = ${SHELL} /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/config/missing --run automake-1.11 -+AWK = gawk -+CC = x86_64-linux-gnu-gcc -+CCDEPMODE = depmode=gcc3 -+CFLAGS = -Wall -g -O2 -+CPP = x86_64-linux-gnu-gcc -E -+CPPFLAGS = -+CXX = x86_64-linux-gnu-g++ -+CXXCPP = x86_64-linux-gnu-g++ -E -+CXXDEPMODE = depmode=gcc3 -+CXXFLAGS = -g -O2 -+CYGPATH_W = echo -+DEFS = -DHAVE_CONFIG_H -+DEPDIR = .deps -+DLLTOOL = dlltool -+DSYMUTIL = -+DUMPBIN = -+ECHO_C = -+ECHO_N = -n -+ECHO_T = -+EGREP = /bin/grep -E -+EXEEXT = -+FGREP = /bin/grep -F -+FLTK_FLAGS = -I/usr/include/freetype2 -g -O2 -D_THREAD_SAFE -D_REENTRANT -+FLTK_LIBS = -lfltk -+GIF_FLAGS = -DHAVE_GIF -+GIF_LIBS = -lgif -+GLUT_FLAGS = -DHAVE_GLUT -+GLUT_LIBS = -lglut -+GL_LIBS = -lGL -+GREP = /bin/grep -+GSL_FLAGS = -I/usr/include -+GSL_LIBS = -L/usr/lib -lgsl -lgslcblas -lm -+HAVE_SWIG = -+HDF5_FLAGS = -DHAVE_HDF5 -DH5_USE_16_API -+HDF5_LIBS = -lhdf5 -+INSTALL = /usr/bin/install -c -+INSTALL_DATA = ${INSTALL} -m 644 -+INSTALL_PROGRAM = ${INSTALL} -+INSTALL_SCRIPT = ${INSTALL} -+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -+JPEG_FLAGS = -DHAVE_JPEG -+JPEG_LIBS = -ljpeg -+LD = /usr/bin/ld -m elf_x86_64 -+LDFLAGS = -+LIBOBJS = -+LIBS = -+LIBTOOL = $(SHELL) $(top_builddir)/libtool -+LIPO = -+LN_S = ln -s -+LTLIBOBJS = -+MAKEINFO = ${SHELL} /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/config/missing --run makeinfo -+MGL_AGE = 0 -+MGL_CURRENT = 5 -+MGL_REVISION = 0 -+MKDIR_P = /bin/mkdir -p -+MOC = /usr/bin/moc-qt4 -+NM = /usr/bin/nm -B -+NMEDIT = -+OBJDUMP = objdump -+OBJEXT = o -+OCTAVE = octave-config -+OCTAVE_ARCH = x86_64-pc-linux-gnu-api-v37 -+OCTAVE_INCFLAGS = -I/usr/include/octave-3.2.4 -+OTOOL = -+OTOOL64 = -+PACKAGE = mathgl -+PACKAGE_BUGREPORT = mathgl.abalakin@gmail.com -+PACKAGE_NAME = mathgl -+PACKAGE_STRING = mathgl 1.10 -+PACKAGE_TARNAME = mathgl -+PACKAGE_URL = -+PACKAGE_VERSION = 1.10 -+PATH_SEPARATOR = : -+PNG_LIBS = -lpng -+PTHREAD_FLAGS = -DHAVE_PTHREAD -+PTHREAD_LIBS = -lpthread -+PYTHON = -+PYTHON_EXEC_PREFIX = -+PYTHON_HEADERS = -+PYTHON_PLATFORM = -+PYTHON_PREFIX = -+PYTHON_VERSION = -+QMAKE = /usr/bin/qmake-qt4 -+QT_CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(QT_DEFINES) -+QT_CPPFLAGS = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -+QT_CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(QT_DEFINES) -+QT_DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -+QT_INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -+QT_LDFLAGS = -+QT_LFLAGS = -+QT_LIBS = -L/usr/lib -lQtGui -lQtCore -lpthread -+QT_PATH = /usr/bin -+QT_VERSION = 4.6.3 -+QT_VERSION_MAJOR = ok, looks like Qt 4 -+RANLIB = ranlib -+RCC = /usr/bin/rcc -+SED = /bin/sed -+SET_MAKE = -+SHELL = /bin/bash -+STRIP = strip -+TMPDIR = /tmp -+UIC = /usr/bin/uic-qt4 -+VERSION = 1.10 -+WX_FLAGS = -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -+WX_LIBS = -pthread -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -+abs_builddir = /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/texinfo/png -+abs_srcdir = /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/texinfo/png -+abs_top_builddir = /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1 -+abs_top_srcdir = /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1 -+ac_ct_CC = -+ac_ct_CXX = -+ac_ct_DUMPBIN = -+am__include = include -+am__leading_dot = . -+am__quote = -+am__tar = ${AMTAR} chof - "$$tardir" -+am__untar = ${AMTAR} xf - -+bindir = ${exec_prefix}/bin -+build = x86_64-pc-linux-gnu -+build_alias = x86_64-linux-gnu -+build_cpu = x86_64 -+build_os = linux-gnu -+build_vendor = pc -+builddir = . -+datadir = ${datarootdir} -+datarootdir = ${prefix}/share -+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} -+dvidir = ${docdir} -+exec_prefix = ${prefix} -+host = x86_64-pc-linux-gnu -+host_alias = x86_64-linux-gnu -+host_cpu = x86_64 -+host_os = linux-gnu -+host_vendor = pc -+htmldir = ${docdir} -+includedir = ${prefix}/include -+infodir = ${prefix}/share/info -+install_sh = ${SHELL} /home/eftaxiop/Αρχεία/Γενικά/Λογισμικό/mathgl/mathgl-1.10.2.1/config/install-sh -+libdir = ${exec_prefix}/lib -+libexecdir = ${exec_prefix}/libexec -+localedir = ${datarootdir}/locale -+localstatedir = ${prefix}/var -+lt_ECHO = echo -+mandir = ${prefix}/share/man -+mkdir_p = /bin/mkdir -p -+oldincludedir = /usr/include -+pdfdir = ${docdir} -+pkgpyexecdir = -+pkgpythondir = -+prefix = /usr -+program_transform_name = s,x,x, -+psdir = ${docdir} -+pyexecdir = -+pythondir = -+sbindir = ${exec_prefix}/sbin -+sharedstatedir = ${prefix}/com -+srcdir = . -+sysconfdir = ${prefix}/etc -+target_alias = -+top_build_prefix = ../../ -+top_builddir = ../.. -+top_srcdir = ../.. -+pngdir = $(docdir)/png -+images = ${shell $(top_builddir)/examples/mgl_example -list} -+png_images = ${images:=.png} -+png_DATA = $(png_images) -+CLEANFILES = $(png_images) -+all: all-am -+ -+.SUFFIXES: -+$(srcdir)/Makefile.in: $(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) --gnu texinfo/png/Makefile'; \ -+ $(am__cd) $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu texinfo/png/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: $(am__configure_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(ACLOCAL_M4): $(am__aclocal_m4_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(am__aclocal_m4_deps): -+ -+mostlyclean-libtool: -+ -rm -f *.lo -+ -+clean-libtool: -+ -rm -rf .libs _libs -+install-pngDATA: $(png_DATA) -+ @$(NORMAL_INSTALL) -+ test -z "$(pngdir)" || $(MKDIR_P) "$(DESTDIR)$(pngdir)" -+ @list='$(png_DATA)'; test -n "$(pngdir)" || list=; \ -+ 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)$(pngdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pngdir)" || exit $$?; \ -+ done -+ -+uninstall-pngDATA: -+ @$(NORMAL_UNINSTALL) -+ @list='$(png_DATA)'; test -n "$(pngdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(pngdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(pngdir)" && rm -f $$files -+tags: TAGS -+TAGS: -+ -+ctags: CTAGS -+CTAGS: -+ -+ -+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)$(pngdir)"; 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: -+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -+ `test -z '$(STRIP)' || \ -+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -+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 clean-libtool 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-pngDATA -+ -+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 mostlyclean-libtool -+ -+pdf: pdf-am -+ -+pdf-am: -+ -+ps: ps-am -+ -+ps-am: -+ -+uninstall-am: uninstall-pngDATA -+ -+.MAKE: install-am install-strip -+ -+.PHONY: all all-am check check-am clean clean-generic clean-libtool \ -+ distclean distclean-generic distclean-libtool 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-pngDATA install-ps install-ps-am \ -+ install-strip installcheck installcheck-am installdirs \ -+ maintainer-clean maintainer-clean-generic mostlyclean \ -+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ -+ uninstall uninstall-am uninstall-pngDATA -+ -+ -+$(png_images): hotdogs.pts # $(top_builddir)/examples/mgl_example -+ $(top_builddir)/examples/mgl_example -kind=${@:.png=} -+ touch $(srcdir)/../mathgl.texi -+ -+# 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: ---- mathgl-1.10.2.1.orig/include/Makefile.in -+++ mathgl-1.10.2.1/include/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -39,7 +39,11 @@ DIST_COMMON = $(am__nobase_include_HEADE - $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d ---- /dev/null -+++ mathgl-1.10.2.1/include/mgl/mgl_io.h -@@ -0,0 +1,68 @@ -+/* mgl_io.h is part of Math Graphic Library -+ * Copyright (C) 2008 Dmitry Kulagin -+ * and Alexey Balakin -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Library General Public License -+ * as published by the Free Software Foundation -+ * -+ * 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 -+ */ -+//----------------------------------------------------------------------------- -+ -+#ifndef _MGL_IO_H_ -+#define _MGL_IO_H_ -+//----------------------------------------------------------------------------- -+#include -+//----------------------------------------------------------------------------- -+//typedef int ptrFunc (const char *, int,int,unsigned char**); -+typedef int (*mgl_save) (const char *fname, int w, int h, unsigned char **); -+typedef int (*mgl_load) (const char *fname, void (*func)(void*,int,int,const unsigned char **), void *par); -+//----------------------------------------------------------------------------- -+//using namespace std; -+//----------------------------------------------------------------------------- -+struct mglModule{ -+ const char* Name; -+ const char* Desc; -+ int countExt; -+ const char** Ext; -+ mgl_load ptrLoad; -+ mgl_save ptrSave; -+ void* ltHandle; -+}; -+//----------------------------------------------------------------------------- -+class mglIO -+{ -+ private: -+ std::vector mymod; -+ -+ int pRegister(const char *nDesc, int cExt, const char **type, -+ mgl_load nptrLoad, mgl_save nptrSave, void* nltHandle=NULL, -+ const char *nModuleName=""); -+ int punRegister(int offset); -+ -+ public: -+ mglIO(void); -+ ~mglIO(); -+ int Register(const char *nDesc, int cExt, const char **type, -+ mgl_load nptrLoad, mgl_save nptrSave, const char *nModuleName=""); -+#ifdef WITH_LTDL -+ int Register(const char *nDesc, int cExt, const char **type, -+ const char *nModuleName, const char *Path=""); -+#endif -+ int unRegister(const char *nModuleName); -+ int unRegister(mgl_load* nptrLoad, ptrFunc* nptrSave); -+ int getNumber(void) const {return mymod.size();}; -+ int Save(const char *fname, const char *type, int w, int h, unsigned char **p) const; -+ int Load(const char *fname, const char *type) const; -+}; -+//----------------------------------------------------------------------------- -+#endif -+//----------------------------------------------------------------------------- ---- /dev/null -+++ mathgl-1.10.2.1/lang/mgl_graph.i -@@ -0,0 +1,819 @@ -+/*************************************************************************** -+ * mgl_graph.i is part of Math Graphic Library -+ * Copyright (C) 2007 Alexey Balakin * -+ * * -+ * 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. * -+ ***************************************************************************/ -+ -+%module mathgl -+ -+%{ -+#include -+#include "mgl/mgl_c.h" -+%} -+ -+typedef mglGraph *HMGL; -+typedef mglData *HMDT; -+typedef mglParse *HMPR; -+ -+struct mglGraph{}; -+struct mglParse{}; -+ -+%extend mglParse { -+ mglParse() -+ { return mgl_create_parser(); } -+ ~mglParse() -+ { return mgl_delete_parser(self); } -+ void AddParam(int id, const char *str) -+ { return mgl_add_param(self, id, str); } -+ void AddParam(int id, const wchar_t *str) -+ { return mgl_add_paramw(self, id, str); } -+ const mglData *AddVar(const char *name) -+ { return mgl_add_var(self, name); } -+ const mglData *FindVar(const char *name) -+ { return mgl_find_var(self, name);} -+ int Parse(mglGraph *gr, const char *str, int pos) -+ { return mgl_parse(gr, self, str, pos); } -+ int Parse(mglGraph *gr, const wchar_t *str, int pos) -+ { return mgl_parsew(gr, self, str, pos); } -+ void Execute(mglGraph *gr, const char *str) -+ { return mgl_parse_text(gr, self, str); } -+ void Execute(mglGraph *gr, const wchar_t *str) -+ { return mgl_parsew_text(gr, self, str); } -+ void RestoreOnce() -+ { return mgl_restore_once(self); } -+ void AllowSetSize(bool allow) -+ { return mgl_parser_allow_setsize(self, allow); } -+}; -+ -+%extend mglGraph { -+ mglGraph(int kind=0, int width=600, int height=400) -+ { -+ if(kind==1) return mgl_create_graph_ps(width, height); -+ else if(kind==2) return mgl_create_graph_gl(); -+ else if(kind==3) return mgl_create_graph_idtf(); -+ return mgl_create_graph_zb(width, height); -+ } -+/* mglGraph(mglDraw *dr, const char *title="MathGL window", int kind=0) -+ { -+ if(kind==1) return mgl_create_graph_fltk_dr(dr, title); -+ if(kind==2) return mgl_create_graph_glut_dr(dr, title); -+ return mgl_create_graph_qt_dr(dr, title); -+ }*/ -+ ~mglGraph() -+ { mgl_delete_graph(self); } -+ -+ void DefaultPlotParam() -+ { mgl_set_def_param(self); } -+ void SetPalColor(int n, float r, float g, float b) -+ { if(n>=0 && n<100) mgl_set_pal_color(self, n, r, g, b); } -+ void SetPalNum(int n) -+ { if(n>=0 && n<100) mgl_set_pal_num(self, n); } -+ void SetPalette(const char *colors) -+ { mgl_set_palette(self, colors); } -+ void SetScheme(const char *colors) -+ { mgl_set_scheme(self, colors); } -+ void SetRotatedText(bool rotated) -+ { mgl_set_rotated_text(self, rotated); } -+ void SetCut(bool cut) -+ { mgl_set_cut(self, cut); } -+ void SetCutBox(float x1,float y1,float z1,float x2,float y2,float z2) -+ { mgl_set_cut_box(self, x1, y1, z1, x2, y2, z2); } -+ void SetTickLen(float len, float stt=1) -+ { mgl_set_tick_len(self, len, stt); } -+ void SetTickStl(const char *stl, const char *sub=0) -+ { mgl_set_tick_stl(self, stl, sub); } -+ void SetBarWidth(float width) -+ { mgl_set_bar_width(self, width); } -+ void SetBaseLineWidth(float width) -+ { mgl_set_base_line_width(self, width); } -+ void SetMarkSize(float size) -+ { mgl_set_mark_size(self, size); } -+ void SetArrowSize(float size) -+ { mgl_set_arrow_size(self, size); } -+ void SetFontSize(float size) -+ { mgl_set_font_size(self, size); } -+ void SetFontDef(char *fnt) -+ { mgl_set_font_def(self, fnt); } -+ void SetAlphaDef(float alpha) -+ { mgl_set_alpha_default(self, alpha); } -+ void SetSize(int width, int height) -+ { mgl_set_size(self, width, height); } -+ void SetAxialDir(char dir) -+ { mgl_set_axial_dir(self, dir); } -+ void SetMeshNum(int num) -+ { mgl_set_meshnum(self, num); } -+ void Zoom(float x1, float y1, float x2, float y2) -+ { mgl_set_zoom(self, x1, y1, x2, y2); } -+ void SetPlotFactor(float val) -+ { mgl_set_plotfactor(self, val); } -+ void SetDrawFace(bool enable) -+ { mgl_set_draw_face(self, enable);} -+ void SetLegendBox(bool enable) -+ { mgl_set_legend_box(self, enable); } -+ void SetScheme(const char *sch) -+ { mgl_set_scheme(self, sch); } -+ void LoadFont(const char *name, const char *path=NULL) -+ { mgl_load_font(self, name, path); } -+ void CopyFont(mglGraph *gr) -+ { mgl_copy_font(self, gr);} -+ void RestoreFont() -+ { mgl_restore_font(self); } -+ -+ void ShowImage(const char *viewer="kuickshow", bool keep=0) -+ { mgl_show_image(self, viewer, keep); } -+ void WriteFrame(const char *fname,const char *descr="") -+ { mgl_write_frame(self, fname, descr); } -+ void WriteIDTF(const char *fname,const char *descr="") -+ { mgl_write_idtf(self, fname, descr); } -+ void WriteJPEG(const char *fname,const char *descr="") -+ { mgl_write_jpg(self, fname, descr); } -+ void WritePNG(const char *fname,const char *descr="") -+ { mgl_write_png(self, fname, descr); } -+ void WritePNGSolid(const char *fname,const char *descr="") -+ { mgl_write_png_solid(self, fname, descr); } -+ void WriteEPS(const char *fname,const char *descr="") -+ { mgl_write_eps(self, fname, descr); } -+ void WriteSVG(const char *fname,const char *descr="") -+ { mgl_write_svg(self, fname, descr); } -+ void WriteGIF(const char *fname,const char *descr="") -+ { mgl_write_gif(self, fname, descr); } -+ void StartGIF(const char *fname, int ms=100) -+ { mgl_start_gif(self, fname,ms); } -+ void CloseGIF() -+ { mgl_close_gif(self); } -+ void NewFrame() -+ { mgl_new_frame(self); } -+ void EndFrame() -+ { mgl_end_frame(self); } -+ int GetNumFrame() -+ { return mgl_get_num_frame(self); } -+ void ResetFrames() -+ { mgl_reset_frames(self); } -+ -+ void Flush() -+ { mgl_flush(self); } -+ -+ void GetRGB(char *imgdata, int imglen) -+ { -+ int w=mgl_get_width(self); -+ int h=mgl_get_height(self); -+ if(imglen>=3*w*h) -+ { -+ imglen=3*w*h; -+ memcpy(imgdata, mgl_get_rgb(self),imglen); -+ } -+ } -+ void GetRGBA(char *imgdata, int imglen) -+ { -+ int w=mgl_get_width(self); -+ int h=mgl_get_height(self); -+ if(imglen>=4*w*h) -+ { -+ imglen=4*w*h; -+ memcpy(imgdata, mgl_get_rgba(self),imglen); -+ } -+ } -+ void GetBGRN(char *imgdata, int imglen) -+ { -+ int w,h,i; -+ w=mgl_get_width(self); -+ h=mgl_get_height(self); -+ const char *buf=(const char *)mgl_get_rgb(self); -+ if(imglen>=4*w*h) -+ { -+ imglen=4*w*h; -+ for(i=0;i -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#define IDTF_TYPE 5 -+int type = IDTF_TYPE; -+bool idtf_mode = true; -+int pdftransparency = 1; -+int vertex_color = 0; -+int compression = 1; -+//----------------------------------------------------------------------------- -+mglData s; -+//----------------------------------------------------------------------------- -+void save(mglGraph *gr,const char *name,const char *suf="",int type=0) -+{ -+// return; -+ char buf[128]; -+ switch(type) -+{ -+ case 1: // EPS -+ sprintf(buf,"%s%s.eps",name,suf); -+ gr->WriteEPS(buf); break; -+ case 2: // SVG -+ sprintf(buf,"%s%s.svg",name,suf); -+ gr->WriteSVG(buf); break; -+ case 3: // PNG -+ sprintf(buf,"%s%s.png",name,suf); -+ gr->WritePNG(buf,0,true); break; -+ case 4: // JPEG -+ sprintf(buf,"%s%s.jpg",name,suf); -+ gr->WriteJPEG(buf); break; -+ case 5: // IDTF -+ sprintf(buf,"%s%s.idtf",name,suf); -+ gr->WriteIDTF(buf); break; -+ default:// PNG (no alpha) -+ sprintf(buf,"%s%s.png",name,suf); -+ gr->WritePNG(buf,0,false); break; -+} -+ puts(buf); -+} -+//----------------------------------------------------------------------------- -+int sample_colors(mglGraph *gr) // arrow styles -+{ -+ gr->Face(mglPoint(-1, -1), mglPoint(-1, -0.7), mglPoint(-0.6, -1), mglPoint(-0.6, -0.7), "L#"); -+ gr->Puts(mglPoint(-0.8,-0.9, 0.01), "L", "C:w", -1.4); -+ gr->Face(mglPoint(-0.6,-1), mglPoint(-0.6, -0.7), mglPoint(-0.2, -1), mglPoint(-0.2, -0.7), "E#"); -+ gr->Puts(mglPoint(-0.4,-0.9, 0.01), "E", "C:w", -1.4); -+ gr->Face(mglPoint(-0.2,-1), mglPoint(-0.2, -0.7), mglPoint(0.2, -1), mglPoint(0.2, -0.7), "N#"); -+ gr->Puts(mglPoint( 0, -0.9, 0.01), "N", "C:w", -1.4); -+ gr->Face(mglPoint( 0.2,-1), mglPoint(0.2, -0.7), mglPoint(0.6, -1), mglPoint(0.6, -0.7), "U#"); -+ gr->Puts(mglPoint( 0.4,-0.9, 0.01), "U", "C:w", -1.4); -+ gr->Face(mglPoint( 0.6,-1), mglPoint(0.6, -0.7), mglPoint(1, -1), mglPoint(1, -0.7), "Q#"); -+ gr->Puts(mglPoint( 0.8,-0.9, 0.01), "Q", "C:w", -1.4); -+ //#lenuq -+ gr->Face(mglPoint(-1, -0.7), mglPoint(-1, -0.4), mglPoint(-0.6, -0.7), mglPoint(-0.6, -0.4), "l#"); -+ gr->Puts(mglPoint(-0.8,-0.6, 0.01), "l", "C:k", -1.4); -+ gr->Face(mglPoint(-0.6,-0.7), mglPoint(-0.6, -0.4), mglPoint(-0.2, -0.7), mglPoint(-0.2, -0.4), "e#"); -+ gr->Puts(mglPoint(-0.4,-0.6, 0.01), "e", "C:k", -1.4); -+ gr->Face(mglPoint(-0.2,-0.7), mglPoint(-0.2, -0.4), mglPoint(0.2, -0.7), mglPoint(0.2, -0.4), "n#"); -+ gr->Puts(mglPoint( 0, -0.6, 0.01), "n", "C:k", -1.4); -+ gr->Face(mglPoint( 0.2,-0.7), mglPoint(0.2, -0.4), mglPoint(0.6, -0.7), mglPoint(0.6, -0.4), "u#"); -+ gr->Puts(mglPoint( 0.4,-0.6, 0.01), "u", "C:k", -1.4); -+ gr->Face(mglPoint( 0.6,-0.7), mglPoint(0.6, -0.4), mglPoint(1, -0.7), mglPoint(1, -0.4), "q#"); -+ gr->Puts(mglPoint( 0.8,-0.6, 0.01), "q", "C:k", -1.4); -+ //#CMYkP -+ gr->Face(mglPoint(-1, -0.4), mglPoint(-1, -0.1), mglPoint(-0.6, -0.4), mglPoint(-0.6, -0.1), "C#"); -+ gr->Puts(mglPoint(-0.8,-0.3, 0.01), "C", "C:w", -1.4); -+ gr->Face(mglPoint(-0.6,-0.4), mglPoint(-0.6, -0.1), mglPoint(-0.2, -0.4), mglPoint(-0.2, -0.1), "M#"); -+ gr->Puts(mglPoint(-0.4,-0.3, 0.01), "M", "C:w", -1.4); -+ gr->Face(mglPoint(-0.2,-0.4), mglPoint(-0.2, -0.1), mglPoint(0.2, -0.4), mglPoint(0.2, -0.1), "Y#"); -+ gr->Puts(mglPoint( 0, -0.3, 0.01), "Y", "C:w", -1.4); -+ gr->Face(mglPoint( 0.2,-0.4), mglPoint(0.2, -0.1), mglPoint(0.6, -0.4), mglPoint(0.6, -0.1), "k#"); -+ gr->Puts(mglPoint( 0.4,-0.3, 0.01), "k", "C:w", -1.4); -+ gr->Face(mglPoint( 0.6,-0.4), mglPoint(0.6, -0.1), mglPoint(1, -0.4), mglPoint(1, -0.1), "P#"); -+ gr->Puts(mglPoint( 0.8,-0.3, 0.01), "P", "C:w", -1.4); -+ //#cmywp -+ gr->Face(mglPoint(-1, -0.1), mglPoint(-1, 0.2), mglPoint(-0.6, -0.1), mglPoint(-0.6, 0.2), "c#"); -+ gr->Puts(mglPoint(-0.8, 0, 0.01), "c", "C:k", -1.4); -+ gr->Face(mglPoint(-0.6,-0.1), mglPoint(-0.6, 0.2), mglPoint(-0.2, -0.1), mglPoint(-0.2, 0.2), "m#"); -+ gr->Puts(mglPoint(-0.4, 0, 0.01), "m", "C:k", -1.4); -+ gr->Face(mglPoint(-0.2,-0.1), mglPoint(-0.2, 0.2), mglPoint(0.2, -0.1), mglPoint(0.2, 0.2), "y#"); -+ gr->Puts(mglPoint( 0, 0, 0.01), "y", "C:k", -1.4); -+ gr->Face(mglPoint( 0.2,-0.1), mglPoint(0.2, 0.2), mglPoint(0.6, -0.1), mglPoint(0.6, 0.2), "w#"); -+ gr->Puts(mglPoint( 0.4, 0, 0.01), "w", "C:k", -1.4); -+ gr->Face(mglPoint( 0.6,-0.1), mglPoint(0.6, 0.2), mglPoint(1, -0.1), mglPoint(1, 0.2), "p#"); -+ gr->Puts(mglPoint( 0.8, 0, 0.01), "p", "C:k", -1.4); -+ //#BGRHW -+ gr->Face(mglPoint(-1, 0.2), mglPoint(-1, 0.5), mglPoint(-0.6, 0.2), mglPoint(-0.6, 0.5), "B#"); -+ gr->Puts(mglPoint(-0.8, 0.3, 0.01), "B", "C:w", -1.4); -+ gr->Face(mglPoint(-0.6, 0.2), mglPoint(-0.6, 0.5), mglPoint(-0.2, 0.2), mglPoint(-0.2, 0.5), "G#"); -+ gr->Puts(mglPoint(-0.4, 0.3, 0.01), "G", "C:w", -1.4); -+ gr->Face(mglPoint(-0.2, 0.2), mglPoint(-0.2, 0.5), mglPoint(0.2, 0.2), mglPoint(0.2, 0.5), "R#"); -+ gr->Puts(mglPoint( 0, 0.3, 0.01), "R", "C:w", -1.4); -+ gr->Face(mglPoint( 0.2, 0.2), mglPoint(0.2, 0.5), mglPoint(0.6, 0.2), mglPoint(0.6, 0.5), "H#"); -+ gr->Puts(mglPoint( 0.4, 0.3, 0.01), "H", "C:w", -1.4); -+ gr->Face(mglPoint( 0.6, 0.2), mglPoint(0.6, 0.5), mglPoint(1, 0.2), mglPoint(1, 0.5), "W#"); -+ gr->Puts(mglPoint( 0.8, 0.3, 0.01), "W", "C:w", -1.4); -+ //#bgrhw -+ gr->Face(mglPoint(-1, 0.5), mglPoint(-1, 0.8), mglPoint(-0.6, 0.5), mglPoint(-0.6, 0.8), "b#"); -+ gr->Puts(mglPoint(-0.8, 0.6, 0.01), "b", "C:k", -1.4); -+ gr->Face(mglPoint(-0.6, 0.5), mglPoint(-0.6, 0.8), mglPoint(-0.2, 0.5), mglPoint(-0.2, 0.8), "g#"); -+ gr->Puts(mglPoint(-0.4, 0.6, 0.01), "g", "C:k", -1.4); -+ gr->Face(mglPoint(-0.2, 0.5), mglPoint(-0.2, 0.8), mglPoint(0.2, 0.5), mglPoint(0.2, 0.8), "r#"); -+ gr->Puts(mglPoint( 0, 0.6, 0.01), "r", "C:k", -1.4); -+ gr->Face(mglPoint( 0.2, 0.5), mglPoint(0.2, 0.8), mglPoint(0.6, 0.5), mglPoint(0.6, 0.8), "h#"); -+ gr->Puts(mglPoint( 0.4, 0.6, 0.01), "h", "C:k", -1.4); -+ gr->Face(mglPoint( 0.6, 0.5), mglPoint(0.6, 0.8), mglPoint(1, 0.5), mglPoint(1, 0.8), "w#"); -+ gr->Puts(mglPoint( 0.8, 0.6, 0.01), "w", "C:k", -1.4); -+ //#brighted -+ gr->Face(mglPoint(-1, 0.8), mglPoint(-1, 1.1), mglPoint(-0.6, 0.8), mglPoint(-0.6, 1.1), "r1#"); -+ gr->Puts(mglPoint(-0.8, 0.9, 0.01), "r1", "C:w", -1.4); -+ gr->Face(mglPoint(-0.6, 0.8), mglPoint(-0.6, 1.1), mglPoint(-0.2, 0.8), mglPoint(-0.2, 1.1), "r3#"); -+ gr->Puts(mglPoint(-0.4, 0.9, 0.01), "r3", "C:w", -1.4); -+ gr->Face(mglPoint(-0.2, 0.8), mglPoint(-0.2, 1.1), mglPoint(0.2, 0.8), mglPoint(0.2, 1.1), "r5#"); -+ gr->Puts(mglPoint( 0, 0.9, 0.01), "r5", "C:k", -1.4); -+ gr->Face(mglPoint( 0.2, 0.8), mglPoint(0.2, 1.1), mglPoint(0.6, 0.8), mglPoint(0.6, 1.1), "r7#"); -+ gr->Puts(mglPoint( 0.4, 0.9, 0.01), "r7", "C:k", -1.4); -+ gr->Face(mglPoint( 0.6, 0.8), mglPoint(0.6, 1.1), mglPoint(1, 0.8), mglPoint(1, 1.1), "r9#"); -+ gr->Puts(mglPoint( 0.8, 0.9, 0.01), "r9", "C:k", -1.4); -+ return 0; -+} -+//----------------------------------------------------------------------------- -+void sample_ae(mglGraph *gr) // math text -+{ -+ gr->StartGroup("Formula"); -+ gr->Puts(mglPoint(0), "\\sqrt{\\frac{\\alpha^{\\gamma^2}+\\overset 1{\\big\\infty}}{\\sqrt3{2+b}}}", -+ 0, -4); -+ gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_ad(mglGraph *gr) // arrow styles -+{ -+ gr->VertexColor(false); gr->Compression(false); // anything is black anyway and compression is bad for text -+ -+ float a=0.1,b=0.4,c=0.5; -+ gr->Line(mglPoint(a,1),mglPoint(b,1),"k-A"); gr->Puts(mglPoint(c,1),"Style 'A' or 'A\\_'","rL"); -+ gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"k-V"); gr->Puts(mglPoint(c,0.8),"Style 'V' or 'V\\_'","rL"); -+ gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"k-K"); gr->Puts(mglPoint(c,0.6),"Style 'K' or 'K\\_'","rL"); -+ gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"k-I"); gr->Puts(mglPoint(c,0.4),"Style 'I' or 'I\\_'","rL"); -+ gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"k-D"); gr->Puts(mglPoint(c,0.2),"Style 'D' or 'D\\_'","rL"); -+ gr->Line(mglPoint(a,0),mglPoint(b,0),"k-S"); gr->Puts(mglPoint(c,0),"Style 'S' or 'S\\_'","rL"); -+ gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"k-O"); gr->Puts(mglPoint(c,-0.2),"Style 'O' or 'O\\_'","rL"); -+ gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"k-T"); gr->Puts(mglPoint(c,-0.4),"Style 'T' or 'T\\_'","rL"); -+ gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-_"); gr->Puts(mglPoint(c,-0.6),"Style '\\_' or none","rL"); -+ gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-AS"); gr->Puts(mglPoint(c,-0.8),"Style 'AS'","rL"); -+ gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-_A"); gr->Puts(mglPoint(c,-1),"Style '\\_A'","rL"); -+ -+ a=-1; b=-0.7; c=-0.6; -+ gr->Line(mglPoint(a,1),mglPoint(b,1),"kAA"); gr->Puts(mglPoint(c,1),"Style 'AA'","rL"); -+ gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"kVV"); gr->Puts(mglPoint(c,0.8),"Style 'VV'","rL"); -+ gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"kKK"); gr->Puts(mglPoint(c,0.6),"Style 'KK'","rL"); -+ gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"kII"); gr->Puts(mglPoint(c,0.4),"Style 'II'","rL"); -+ gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"kDD"); gr->Puts(mglPoint(c,0.2),"Style 'DD'","rL"); -+ gr->Line(mglPoint(a,0),mglPoint(b,0),"kSS"); gr->Puts(mglPoint(c,0),"Style 'SS'","rL"); -+ gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"kOO"); gr->Puts(mglPoint(c,-0.2),"Style 'OO'","rL"); -+ gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"kTT"); gr->Puts(mglPoint(c,-0.4),"Style 'TT'","rL"); -+ gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-__"); gr->Puts(mglPoint(c,-0.6),"Style '\\_\\_'","rL"); -+ gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-VA"); gr->Puts(mglPoint(c,-0.8),"Style 'VA'","rL"); -+ gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-AV"); gr->Puts(mglPoint(c,-1),"Style 'AV'","rL"); -+} -+//----------------------------------------------------------------------------- -+void sample_ac(mglGraph *gr) // error boxes -+{ -+ mglData x(10), y(10), ex(10), ey(10), y0(50); -+ x.Modify("2*x-1 + 0.2*rnd-0.1"); -+ y.Modify("(2*x-1)^2 + 0.2*rnd-0.1"); -+ y0.Modify("(2*x-1)^2"); -+ ex.Modify("0.2"); -+ ey.Modify("0.1"); -+ -+ gr->SubPlot(2,2,0); -+ gr->StartGroup("Random y"); -+ gr->StartGroup("Random y Error"); gr->Error(y,ey,"ko"); gr->EndGroup(); -+ gr->StartGroup("Random y Plot"); gr->Plot(y0,"r"); gr->EndGroup(); -+ gr->StartGroup("Random y Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Random y Label"); gr->Text(mglPoint(0,1.2,0),"Random {\\i y}"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,1); -+ gr->StartGroup("Random x,y"); -+ gr->StartGroup("Random x,y Error"); gr->Error(x,y,ex,"ko"); gr->EndGroup(); -+ gr->StartGroup("Random x,y Plot"); gr->Plot(y0,"r"); gr->EndGroup(); -+ gr->StartGroup("Random x,y Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Random x,y Label"); gr->Text(mglPoint(0,1.2,0),"Random {\\i x, y}"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,2); -+ gr->StartGroup("Random x,y and 2d boxes"); -+ gr->StartGroup("Random x,y and 2d boxes Error"); gr->Error(x,y,ey,ey,"ko"); gr->EndGroup(); -+ gr->StartGroup("Random x,y and 2d boxes Plot"); gr->Plot(y0,"r"); gr->EndGroup(); -+ gr->StartGroup("Random x,y and 2d boxes Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Random x,y and 2d boxes Label"); gr->Text(mglPoint(0,1.2,0),"Random {\\i x, y} and 2d boxes"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,3); -+ gr->StartGroup("Random point in 3d space"); -+ gr->StartGroup("Random point in 3d space Label"); gr->Text(mglPoint(0,1.2,0),"Random point in 3d space"); gr->EndGroup(); -+ gr->Rotate(40,60); -+ gr->StartGroup("Random point in 3d space Error"); -+ for(int i=0;i<10;i++) -+ gr->Error(mglPoint(mgl_rnd()-0.5,mgl_rnd()-0.5,mgl_rnd()-0.5), -+ mglPoint(0.1,0.1,0.1),"bo"); -+ gr->EndGroup(); -+ gr->StartGroup("Random point in 3d space Axis"); gr->Axis(); gr->EndGroup(); -+ gr->EndGroup(); -+ gr->InPlot(0,1,0,1); -+} -+//----------------------------------------------------------------------------- -+void sample_ab(mglGraph *gr) // Gaussian beam -+{ -+ gr->VertexColor(false); gr->Compression(false); // vertex color prevents transparency (unless set in PDF) and compression is bad it -+ -+ gr->Alpha(true); gr->Light(true); gr->Light(0,mglPoint(0,0,1)); -+ -+ mglData a(30,30,30),b(30,30,30); -+ a.Modify("exp(-16*((z-0.5)^2+(y-0.5)^2)/(1+4*x^2))"); -+ b.Modify("16*((z-0.5)^2+(y-0.5)^2)*(x)/(1+4*x^2)"); -+ gr->CAxis(0,1); -+ -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); -+ gr->StartGroup("Surf3 Group"); -+ gr->StartGroup("Surf3"); gr->Surf3(a,"wgk"); gr->EndGroup(); -+ gr->StartGroup("Surf3 Box"); gr->Box(); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(0,0,0)); -+ gr->CAxis(0,1); -+ // vertex color prevents transparency, unless u3dpreview sets it in PDF for the whole surface -+ if (pdftransparency) -+ { -+ gr->VertexColor(true); -+ gr->Alpha(false); // transparency will be set in PDF, not in u3d -+ gr->Light(false); // IMHO lighting is not necessary for this model -+ } -+ gr->SubPlot(2,2,1); gr->Rotate(40,60); -+ gr->StartGroup("DensA Group"); -+ gr->StartGroup("DensA"); gr->DensA(a); gr->EndGroup(); -+ gr->StartGroup("DensA Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("DensA Box"); gr->Box(); gr->EndGroup(); -+ gr->EndGroup(); -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1)); -+ gr->CAxis(0,1); -+ if (pdftransparency) // put settings back -+ { -+ gr->Alpha(true); -+ gr->Light(true); -+ } -+ -+ gr->SubPlot(2,2,2); gr->Rotate(40,60); -+ gr->StartGroup("ClodQ Group"); -+ // Clouds not supported in u3d -+ if ( idtf_mode ) -+ gr->Text(mglPoint(0,0,0),"no clouds in u3d"); -+ else -+ gr->CloudQ(a); -+ gr->StartGroup("CloudQ Box"); gr->Box(); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->VertexColor(false); // for variable transparency the only way is to disable smooth (per-vertex) coloring -+ gr->SubPlot(2,2,3); gr->Rotate(40,60); -+ gr->StartGroup("Surf3A Group"); -+ gr->StartGroup("Surf3A"); gr->Surf3A(b,a,"q"); gr->EndGroup(); -+ gr->StartGroup("Surf3A Box"); gr->Box(); gr->EndGroup(); -+ gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_aa(mglGraph *gr) // flag # -+{ -+ gr->Alpha(true); gr->Light(true); gr->Light(0,mglPoint(0,0,1)); -+ mglData a(30,20); -+ a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); -+ // vertex color prevents transparency, unless u3dpreview sets it in PDF for the whole surface -+ if (idtf_mode && pdftransparency) -+ { -+ gr->VertexColor(true); -+ gr->Alpha(false); // transparency will be set in PDF, not in u3d -+ } -+ else -+ { -+ gr->VertexColor(false); -+ } -+ gr->StartGroup("Surf"); gr->Surf(a,"BbcyrR#"); gr->EndGroup(); -+ gr->StartGroup("Surf Box"); gr->Box(); gr->EndGroup(); -+ gr->SubPlot(2,2,1); gr->Rotate(40,60); -+ gr->Light(false); // IMHO lighting is not necessary for this model -+ gr->StartGroup("Dens"); gr->Dens(a,"BbcyrR#"); gr->EndGroup(); -+ gr->StartGroup("Dens Box"); gr->Box(); gr->EndGroup(); -+ gr->SubPlot(2,2,2); gr->Rotate(40,60); -+ gr->StartGroup("Cont"); gr->Cont(a,"BbcyrR#"); gr->EndGroup(); -+ gr->StartGroup("Cont Box"); gr->Box(); gr->EndGroup(); -+ gr->SubPlot(2,2,3); gr->Rotate(40,60); -+ gr->StartGroup("Axial"); gr->Axial(a,"BbcyrR#"); gr->EndGroup(); -+ gr->StartGroup("Axial Box"); gr->Box(); gr->EndGroup(); -+ if (idtf_mode && !pdftransparency) // switch lighting back -+ { -+ gr->Light(true); -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); -+ } -+} -+//----------------------------------------------------------------------------- -+void sample_a9(mglGraph *gr) // 2d plot -+{ -+ gr->Light(true); gr->Light(0,mglPoint(0,0,1)); -+ -+ gr->VertexColor(true); -+ mglData a0(50,40); -+ a0.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ gr->SubPlot(2,2,0); gr->Rotate(60,40); -+ gr->Surf(a0); -+ gr->StartGroup("UL Box"); gr->Box(); gr->EndGroup(); -+ -+ mglData x(50,40),y(50,40),z(50,40); -+ x.Modify("0.8*sin(2*pi*x)*sin(pi*y)"); -+ y.Modify("0.8*cos(2*pi*x)*sin(pi*y)"); -+ z.Modify("0.8*cos(pi*y)"); -+ gr->SubPlot(2,2,1); gr->Rotate(60,40); -+ gr->StartGroup("Sphere"); gr->Surf(x,y,z,"BbwrR"); gr->EndGroup(); -+ gr->StartGroup("UR Box"); gr->Box(); gr->EndGroup(); -+ -+ mglData a1(50,40,3); -+ a1.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*sin(3*pi*(x*y))",1); -+ a1.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))",2); -+ gr->SubPlot(2,2,2); gr->Rotate(60,40); -+ gr->Compression(false); -+ if (idtf_mode && pdftransparency) -+ { -+ gr->VertexColor(true); -+ gr->Alpha(false); // transparency will be set in PDF, not in u3d -+ } -+ else -+ { -+ gr->VertexColor(false); -+ gr->Alpha(true); -+ } -+ gr->Surf(a1); -+ gr->StartGroup("LL Box"); gr->Box(); gr->EndGroup(); -+ -+ gr->SubPlot(2,2,3); gr->Rotate(60,40); -+ if (idtf_mode && pdftransparency) -+ gr->Light(false); // IMHO lighting is not necessary for this model -+ gr->Dens(a1); -+ gr->StartGroup("LR Box"); gr->Box(); gr->EndGroup(); -+ if (idtf_mode && pdftransparency) -+ gr->Light(true); -+ if (idtf_mode && !pdftransparency) -+ { gr->SubPlot(1,1,0); gr->Rotate(60,40); } // Position global light -+} -+//----------------------------------------------------------------------------- -+void sample_a8(mglGraph *gr) // 1d plot -+{ -+ mglData y0(50); y0.Modify("sin(pi*(2*x-1))"); -+ -+ gr->SubPlot(2,2,0); -+ gr->Plot(y0); -+ gr->StartGroup("UL Box"); gr->Box(); gr->EndGroup(); -+ -+ mglData y1(50,2); -+ y1.Modify("sin(pi*2*x-pi)"); y1.Modify("cos(pi*2*x-pi)/2",1); -+ mglData x(50); x.Modify("cos(pi*2*x-pi)"); -+ -+ gr->SubPlot(2,2,1); -+ gr->Plot(y1); -+ gr->Plot(x,y0,"Y+"); -+ gr->Plot2(y1,"q|"); -+ gr->StartGroup("UR Box"); gr->Box(); gr->EndGroup(); -+ -+ mglData z(50); z.Modify("2*x-1"); -+ mglData y2(10,3); y2.Modify("cos(pi*(2*x-1-y))"); -+ y2.Modify("2*x-1",2); -+ -+ gr->SubPlot(2,2,2); gr->Rotate(60,40); -+ gr->Plot(x,y0,z); -+ gr->StartGroup("LL Box"); gr->Box(); gr->EndGroup(); -+ gr->Plot3(y2,"bo "); -+ -+ gr->SubPlot(2,2,3); gr->Rotate(60,40); -+ gr->Bars(x,y0,z,"ri"); -+ gr->StartGroup("LR Box"); gr->Box(); gr->EndGroup(); -+ -+ gr->InPlot(0,1,0,1); -+} -+//----------------------------------------------------------------------------- -+void sample_a7(mglGraph *gr) // smoothing -+{ -+ mglData y0(30),y1,y2,y3; -+ y0.Modify("0.4*sin(2*pi*x) + 0.3*cos(3*pi*x) - 0.4*sin(4*pi*x)+0.2*rnd"); -+ -+ y1=y0; y1.Smooth(SMOOTH_LINE_3); -+ y2=y0; y2.Smooth(SMOOTH_LINE_5); -+ y3=y0; y3.Smooth(SMOOTH_QUAD_5); -+ -+ gr->StartGroup("NONE"); gr->Plot(y0,"k"); gr->EndGroup(); gr->AddLegend("NONE","k"); -+ gr->StartGroup("LINE_3"); gr->Plot(y1,"r"); gr->EndGroup(); gr->AddLegend("LINE\\_3","r"); -+ gr->StartGroup("LINE_5"); gr->Plot(y2,"g"); gr->EndGroup(); gr->AddLegend("LINE\\_5","g"); -+ gr->StartGroup("QUAD_5"); gr->Plot(y3,"b"); gr->EndGroup(); gr->AddLegend("QUAD\\_5","b"); -+ if (idtf_mode) // Problem in idtf, the white background and tet take the same place -+ gr->LegendBox = false; -+ gr->StartGroup("Legend"); gr->Legend(); gr->EndGroup(); -+ gr->StartGroup("Box"); gr->Box(); gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_a6(mglGraph *gr) // differentiate -+{ -+ gr->VertexColor(true); -+ mglData a(30,40); a.Modify("x*y"); -+ gr->Axis(mglPoint(0,0,0),mglPoint(1,1,1)); -+ -+ gr->SubPlot(2,2,0); gr->Rotate(60,40); -+ gr->StartGroup("Function"); -+ gr->StartGroup("Function Surf"); gr->Surf(a); gr->EndGroup(); -+ gr->StartGroup("Function Box"); gr->Box(); gr->EndGroup(); -+ gr->StartGroup("Function Label"); gr->Text(mglPoint(0.7,1,1.2),"a(x,y)"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,1); gr->Rotate(60,40); -+ a.Diff("x"); -+ gr->StartGroup("Diff"); -+ gr->StartGroup("Diff Surf"); gr->Surf(a); gr->EndGroup(); -+ gr->StartGroup("Diff Box"); gr->Box(); gr->EndGroup(); -+ gr->StartGroup("Diff Label"); gr->Text(mglPoint(0.7,1,1.2),"da/dx"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,2); gr->Rotate(60,40); -+ a.Integral("xy"); -+ gr->StartGroup("Integral"); -+ gr->StartGroup("Integral Surf"); gr->Surf(a); gr->EndGroup(); -+ gr->StartGroup("Integral Box"); gr->Box(); gr->EndGroup(); -+ gr->StartGroup("Integral Label"); gr->Text(mglPoint(0.7,1,1.2),"\\int da/dx dxdy"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,3); gr->Rotate(60,40); -+ a.Diff2("y"); -+ gr->StartGroup("Diff2"); -+ gr->StartGroup("Diff2 Surf"); gr->Surf(a); gr->EndGroup(); -+ gr->StartGroup("Diff2 Box"); gr->Box(); gr->EndGroup(); -+ gr->StartGroup("Diff2 Label"); gr->Text(mglPoint(0.7,1,1.2),"\\int {d^2}a/dxdy dx"); gr->EndGroup(); -+ gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_a5(mglGraph *gr) // pen styles -+{ -+ if (idtf_mode) -+ gr->Puts(mglPoint(0,1.2),"line styles not supported","rL"); -+ gr->Line(mglPoint(0, 1.0,0),mglPoint(0.3, 1.0,0),"k-"); gr->Puts(mglPoint(0.4, 1.0),"Solid '-'","rL"); -+ gr->Line(mglPoint(0, 0.7,0),mglPoint(0.3, 0.7,0),"k|"); gr->Puts(mglPoint(0.4, 0.7),"Dash '|'","rL"); -+ gr->Line(mglPoint(0, 0.4,0),mglPoint(0.3, 0.4,0),"k;"); gr->Puts(mglPoint(0.4, 0.4),"Small dash ';'","rL"); -+ gr->Line(mglPoint(0, 0.1,0),mglPoint(0.3, 0.1,0),"kj"); gr->Puts(mglPoint(0.4, 0.1),"Dash-dot 'j'","rL"); -+ gr->Line(mglPoint(0,-0.2,0),mglPoint(0.3,-0.2,0),"ki"); gr->Puts(mglPoint(0.4,-0.2),"Small dash-dot 'i'","rL"); -+ gr->Line(mglPoint(0,-0.5,0),mglPoint(0.3,-0.5,0),"k:"); gr->Puts(mglPoint(0.4,-0.5),"Dots ':'","rL"); -+ gr->Line(mglPoint(0,-0.8,0),mglPoint(0.3,-0.8,0),"k "); gr->Puts(mglPoint(0.4,-0.8),"None ' '","rL"); -+ -+ gr->Mark(mglPoint(-1, 1.2,0),'.'); gr->Puts(mglPoint(-0.7, 1.2),"'.'","rL"); -+ gr->Mark(mglPoint(-1, 0.9,0),'+'); gr->Puts(mglPoint(-0.7, 0.9),"'+'","rL"); -+ gr->Mark(mglPoint(-1, 0.6,0),'x'); gr->Puts(mglPoint(-0.7, 0.6),"'x'","rL"); -+ gr->Mark(mglPoint(-1, 0.3,0),'*'); gr->Puts(mglPoint(-0.7, 0.3),"'*'","rL"); -+ gr->Mark(mglPoint(-1, 0.0,0),'s'); gr->Puts(mglPoint(-0.7, 0.0),"'s'","rL"); -+ gr->Mark(mglPoint(-1,-0.3,0),'d'); gr->Puts(mglPoint(-0.7,-0.3),"'d'","rL"); -+ gr->Mark(mglPoint(-1,-0.6,0),'o'); gr->Puts(mglPoint(-0.7,-0.6),"'o'","rL"); -+ gr->Mark(mglPoint(-1,-0.9,0),'^'); gr->Puts(mglPoint(-0.7,-0.9),"'\\^'","rL"); -+ gr->Mark(mglPoint(-1,-1.2,0),'v'); gr->Puts(mglPoint(-0.7,-1.2),"'v'","rL"); -+} -+//----------------------------------------------------------------------------- -+void sample_a4(mglGraph *gr) // font features -+{ -+// setlocale(LC_CTYPE, "ru_RU.cp1251"); -+// gr->Putsw(mglPoint(0,1),L"Text can be in english � � �������"); -+ gr->Putsw(mglPoint(0,1),L"Text can be in ASCII and in Unicode"); -+ gr->Puts(mglPoint(0,0.6),"It can be \\wire{wire} and \\big{big}"); -+ gr->Puts(mglPoint(0,0.2),"One can change style in string: " -+ "\\b{bold}, \\i{italic, \\b{both}}"); -+ gr->Puts(mglPoint(0,-0.2),"Easy to \\a{overline} or " -+ "\\u{underline}"); -+ gr->Puts(mglPoint(0,-0.6),"Easy to change indexes ^{up} _{down} @{center}"); -+ gr->Puts(mglPoint(0,-1),"It parse TeX: \\int \\alpha \\cdot " -+ "\\sqrt3{sin(\\pi x)^2 + \\gamma_{i_k}} dx"); -+} -+//----------------------------------------------------------------------------- -+void sample_a3(mglGraph *gr) // curvilinear coordinates -+{ -+ mglData x(50),y(50),z(50); -+ y.Fill(0.5,0.5); -+ x.Fill(-1,1); // create data arrays -+ -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,1,-1)); -+ gr->dx = gr->dy = -5; gr->dz = 0.5; // set tick step to 0.5 -+ -+ gr->SubPlot(2,2,0); -+ gr->StartGroup("Cartesian"); -+ gr->Rotate(60,40); -+ gr->StartGroup("Cartesian Plot"); gr->Plot(x,y,z,"r2"); gr->EndGroup(); -+ gr->StartGroup("Cartesian Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Cartesian Grid"); gr->Grid(); gr->EndGroup(); -+ gr->StartGroup("Cartesian Label"); gr->Text(mglPoint(0,1.3,1),"Cartesian"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,1); -+ gr->StartGroup("Cylindrical"); -+ gr->Axis("y*sin(pi*x)","y*cos(pi*x)",0); -+ gr->Rotate(60,40); -+ gr->StartGroup("Cylindrical Plot"); gr->Plot(x,y,z,"r2"); gr->EndGroup(); -+ gr->StartGroup("Cylindrical Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Cylindrical Grid"); gr->Grid(); gr->EndGroup(); -+ gr->StartGroup("Cylindrical Label"); gr->Text(mglPoint(0,1.3,1),"Cylindrical"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,2); -+ gr->StartGroup("Parabolic"); -+ gr->Rotate(60,40); -+ gr->Axis("2*y*x","y*y - x*x",0); -+ gr->StartGroup("Parabolic Plot"); gr->Plot(x,y,z,"r2"); gr->EndGroup(); -+ gr->StartGroup("Parabolic Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Parabolic Grid"); gr->Grid(); gr->EndGroup(); -+ gr->StartGroup("Parabolic Label"); gr->Text(mglPoint(0,1.3,1),"Parabolic"); gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,3); -+ gr->StartGroup("Spiral"); -+ gr->Rotate(60,40); -+ gr->Axis("y*sin(pi*x)","y*cos(pi*x)","x+z"); -+ gr->StartGroup("Spiral Plot"); gr->Plot(x,y,z,"r2"); gr->EndGroup(); -+ gr->StartGroup("Spiral Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Spiral Grid"); gr->Grid(); gr->EndGroup(); -+ gr->StartGroup("Spiral Label"); gr->Text(mglPoint(0,1.3,1),"Spiral"); gr->EndGroup(); -+ gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_a2(mglGraph *gr) // axis and grid -+{ -+ gr->SubPlot(2,2,0); -+ gr->dx = gr->dy = 0.5; // set tick step to 0.5 -+ gr->NSx = gr->NSy = 3; // and draw 3 subticks -+ gr->Box(); // should be after change dx,dy,dz -+ gr->Axis("xy"); -+ gr->Grid(); -+ gr->Text(mglPoint(0,1.3,1),"Axis and grid","rC"); -+ -+ gr->dx = gr->dy = -5; // restore back -+ gr->NSx = gr->NSy = 0; -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(0,0,0)); -+ -+ gr->dx = gr->dy = gr->dz = -5; // restore back -+ gr->SubPlot(2,2,1); -+ gr->Rotate(60,40); -+ gr->Axis(); -+ gr->Label('x',"x"); gr->Flush(); -+ gr->Label('y',"y"); gr->Flush(); -+ gr->Label('z',"z"); gr->Flush(); -+ gr->Text(mglPoint(0,0,1.5),"Axis and labels"); -+ -+ gr->dx = gr->dy = gr->dz = 0.2; // too low step of ticks -+ gr->SubPlot(2,2,2); -+ gr->Rotate(60,40); -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,-1,-1)); -+ gr->Axis(); -+ gr->Grid(); -+ gr->Text(mglPoint(0,0,1.5),"Shift origin and add grid"); -+ gr->Text(mglPoint(0,0,1.2),"(note, too many ticks)"); -+ -+ gr->SubPlot(2,2,3); -+ gr->Rotate(60,40); -+ gr->dz = gr->dy = -5; // decrease number of ticks -+ gr->Axis("yz"); -+ gr->Label('y',"Y axis",0); gr->Flush(); -+ gr->Label('z',"Z axis",0); gr->Flush(); -+ gr->Text(mglPoint(0,0,1.5),"Remove X axis, and","rC"); -+ gr->Text(mglPoint(0,0,1.2),"decrease number of ticks"); -+ -+ gr->InPlot(0,1,0,1); -+} -+//----------------------------------------------------------------------------- -+void sample_a1(mglGraph *gr) // transformation -+{ -+ gr->SubPlot(2,2,0); // just new axis without rotation and aspects -+ gr->Box(); -+ gr->Text(mglPoint(-1,1.1,1),"Just box","rL"); -+ gr->InPlot(0.2,0.5,0.7,1); -+ gr->Box(); -+ gr->Text(mglPoint(0,1.2,1),"InPlot example"); -+ gr->SubPlot(2,2,1); // new axis with aspect and rotation -+ gr->Rotate(60,40); -+ gr->Aspect(1,1,1); -+ gr->Box(); -+ gr->Text(mglPoint(1,1,1.5),"Rotate only","rR"); -+ gr->SubPlot(2,2,2); // aspect in other direction -+ gr->Rotate(60,40); -+ gr->Aspect(1,1,2); -+ gr->Box(); -+ gr->Text(mglPoint(0,0,2),"Aspect and Rotate"); -+ gr->SubPlot(2,2,3); // rotation before aspect. INCORRECT !!! -+ gr->Rotate(60,40); -+ gr->Aspect(1,2,2); -+ gr->Box(); -+ gr->Text(mglPoint(0,0,1.5),"Aspect in other direction"); -+ -+ gr->InPlot(0,1,0,1); -+} -+ -+#define START(vertex_color) gr->Clf(); gr->VertexColor(vertex_color); \ -+ gr->StartGroup("Box"); gr->Box(); gr->EndGroup(); -+#define SAVE(name) save(gr,#name, suf,type); -+ -+//----------------------------------------------------------------------------- -+int full_test(mglGraph *gr, const void *s) // full test (in PNG) -+{ -+ const char *suf = (const char *)s; -+ mglData pnts("hotdogs.pts"); -+ pnts.Norm(-1,1,true); -+ mglData a(50,40), b(50,40), c(60,50,40), d(60,50,40); -+ mglData y(50,3), x(50), x2(50), y1(50), y2(50), f(50,3); -+ mglData ex(10,10,10), ey(10,10,10), ez(10,10,10); -+ -+/* int i,j,k; -+ float xx,yy,zz,dd; -+ for(i=0;i<10;i++) for(j=0;j<10;j++) for(k=0;k<10;k++) -+{ -+ xx = i*0.1-0.5; yy = j*0.1-0.5; zz = k*0.1-0.35; dd = k*0.1-0.65; -+ ex.a[i+10*(j+10*k)] = 0.1*xx/pow(xx*xx+yy*yy+zz*zz,1.5) - 0.1*xx/pow(xx*xx+yy*yy+dd*dd,1.5); -+ ey.a[i+10*(j+10*k)] = 0.1*yy/pow(xx*xx+yy*yy+zz*zz,1.5) - 0.1*yy/pow(xx*xx+yy*yy+dd*dd,1.5); -+ ez.a[i+10*(j+10*k)] = 0.1*zz/pow(xx*xx+yy*yy+zz*zz,1.5) - 0.1*dd/pow(xx*xx+yy*yy+dd*dd,1.5); -+} -+ for(i=0;i<60;i++) for(j=0;j<50;j++) for(k=0;k<40;k++) -+{ -+ xx = i/30.-1; yy = j/25.-1; zz = k/20.-1; -+ c.a[i+60*(j+50*k)] = -2*(xx*xx + yy*yy + zz*zz*zz*zz - zz*zz - 0.1); -+ d.a[i+60*(j+50*k)] = 1-2*tanh((xx+yy)*(xx+yy)); -+}*/ -+ ex.Modify("0.1*(x-0.5)/pow((x-0.5)^2+(y-0.5)^2 + (z-0.35)^2,1.5) - 0.1*(x-0.5)/pow((x-0.5)^2 + (y-0.5)^2+(z-0.65)^2,1.5)"); -+ ey.Modify("0.1*(y-0.5)/pow((x-0.5)^2+(y-0.5)^2 + (z-0.35)^2,1.5) - 0.1*(y-0.5)/pow((x-0.5)^2 + (y-0.5)^2+(z-0.65)^2,1.5)"); -+ ez.Modify("0.1*(z-0.35)/pow((x-0.5)^2+(y-0.5)^2 + (z-0.35)^2,1.5) - 0.1*(z-0.65)/pow((x-0.5)^2+(y-0.5)^2 + (z-0.65)^2,1.5)"); -+ a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ c.Modify("(-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1))"); -+ d.Modify("1-2*tanh(4*(x+y-1)^2)"); -+ y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+ y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); -+ y1.Modify("0.5+0.3*cos(2*pi*x)"); -+ y2.Modify("0.3*sin(2*pi*x)"); -+ x.Fill(-1,1,'x'); -+ x2.Modify("0.05+0.03*cos(2*pi*x)"); -+ -+ mglData x0(10), y0(10), ex0(10), ey0(10),ch(7,2); -+ x0.Modify("2*x-1 + 0.1*rnd-0.05"); -+ y0.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x) + 0.2*rnd-0.1"); -+ ey0.Modify("0.2"); ex0.Modify("0.1"); ch.Modify("rnd+0.1"); -+ -+ gr->SubPlot(1,1,0); -+ gr->Alpha(false); gr->Compression(compression); -+ START(false); gr->MeshNum=20; gr->Dew(a,b,"BbcyrR"); gr->MeshNum=0; SAVE(dew); -+ gr->Rotate(40,60); -+ START(false); gr->MeshNum=10; gr->Dew(a,b,"BbcyrR"); gr->MeshNum=0; SAVE(dew2); -+ START(false); gr->Pipe(a,b,"BbcyrR"); SAVE(pipe); -+ START(true); gr->Surf(a,"BbcyrR"); SAVE(surf); -+ START(true); gr->Surf(a,"BbcyrR|"); SAVE(surf_sl); -+ START(true); gr->Tile(a,"BbcyrR"); SAVE(tile); -+ START(true); gr->Belt(a,"BbcyrR"); SAVE(belt); -+ START(false); gr->Mesh(a,"BbcyrR"); SAVE(mesh); -+ START(false); gr->Fall(a,"BbcyrR"); SAVE(fall); -+ START(true); gr->SurfC(a,b,"BbcyrR"); SAVE(surfc); -+ START(true); gr->Boxs(a,"BbcyrR"); SAVE(boxs); -+ START(false); gr->Flow(ex,ey,ez,"bwr"); SAVE(flow3); -+ START(false); gr->Vect(ex,ey,ez,"bwr"); SAVE(vect3); -+ START(false); gr->VectC(ex,ey,ez,"bwr"); SAVE(vectc3); -+ START(false); gr->Pipe(ex,ey,ez,"bwr"); SAVE(pipe3); -+ START(false); gr->Torus(y1,y2,"pz"); SAVE(torus); -+ START(false); gr->Crust(pnts,"BbcyrR"); SAVE(crust); -+ START(false); gr->Dots(pnts,"BbcyrR"); SAVE(dots); -+ START(false); gr->ContF(a,"BbcyrR"); SAVE(contf); -+ START(false); gr->Cont(a,"BbcyrR"); SAVE(cont); -+ START(false); gr->ContFA(c,"BbcyrR"); SAVE(contfa); -+ if (idtf_mode) -+ { START(false); gr->Text(mglPoint(0,0,0),"Fog not supported"); SAVE(surf_fog); } -+ else -+ { gr->Clf(); gr->Fog(1); gr->Box(); gr->Surf(a,"BbcyrR"); gr->Fog(0); SAVE(surf_fog); } -+ START(false); gr->Tube(y,0.05); gr->Tube(y1,x,y2,x2); SAVE(tube); -+ START(false); gr->Tube(y,0.05); gr->Tube(y1,x,y2,x2); SAVE(tube_3d); -+ START(false); gr->Chart(ch,"#"); SAVE(chart); -+ gr->Axis("(y+1)/2*cos(pi*x)","(y+1)/2*sin(pi*x)",0); -+ START(false); gr->Chart(ch,"bgr cmy#"); SAVE(pie_chart); gr->Axis(0,0,0); -+ -+ gr->Alpha(true); gr->Compression(false); -+ START(pdftransparency); gr->Surf(a,"BbcyrR"); SAVE(surf_alpha); -+ START(false); gr->Axial(a,"BbcyrR"); SAVE(axial); -+ START(false); gr->SurfA(a,b,"BbcyrR"); SAVE(surfa); -+ START(false); gr->Map(a,b,"brg"); SAVE(map); -+ START(false); gr->Surf3(c,"BbcyrR"); SAVE(surf3); -+ START(pdftransparency); gr->Surf3(c,"bgrd"); SAVE(surf3_rgbd_light); -+ START(false); gr->Surf3A(c,d,"BbcyrR"); SAVE(surf3a); -+ START(pdftransparency); gr->Surf3C(c,d,"BbcyrR"); SAVE(surf3c); -+ START(false); gr->ContA(c,"BbcyrR"); SAVE(conta); -+ gr->Light(false); -+ if (idtf_mode) -+ { START(false); gr->Text(mglPoint(0,0,0),"CloudQ not supported"); SAVE(cloudq); } -+ else -+ { START(false); gr->CloudQ(c,"wyrRk"); SAVE(cloudq); } -+ if (idtf_mode) -+ { START(false); gr->Text(mglPoint(0,0,0),"CloudP not supported"); SAVE(cloudp); } -+ else -+ { START(false); gr->CloudP(c,"wyrRk"); SAVE(cloudp); } -+ START(pdftransparency); gr->Axis(); gr->DensA(c,"BbcyrR"); SAVE(densa); -+ gr->Alpha(false); gr->Compression(compression); -+ START(true); gr->Surf3(c,"bgrd"); SAVE(surf3_rgbd); -+ START(true); gr->DensX(c.Sum("x"),"BbcyrR",-1); gr->DensY(c.Sum("y"),"BbcyrR",1); -+ gr->DensZ(c.Sum("z"),"BbcyrR",-1); SAVE(dens_xyz); -+ START(false); gr->ContX(c.Sum("x"),"BbcyrR",-1); gr->ContY(c.Sum("y"),"BbcyrR",1); -+ gr->ContZ(c.Sum("z"),"BbcyrR",-1); SAVE(cont_xyz); -+ gr->SubPlot(1,1,0); // 1D Plots -+ START(false); gr->Plot(y); SAVE(plot); -+ START(false); gr->Area(y); SAVE(area); -+ START(false); gr->Stem(y); SAVE(stem); -+ START(false); gr->Step(y); SAVE(step); -+ START(false); gr->Bars(y); SAVE(bars); -+ START(false); gr->Barh(y); SAVE(barh); -+ START(false); gr->Region(y2,y1,"r"); gr->Plot(y1,"k2"); gr->Plot(y2,"k2"); SAVE(region); -+ START(false); gr->Mark(y,y1,"bs"); SAVE(mark); -+ START(false); gr->TextMark(y,y1,"\\gamma"); SAVE(textmark); -+ START(false); gr->Plot(y.SubData(-1,0)); -+ gr->Text(y,"This is very very long string drawn along a curve",":k"); -+ gr->Text(y,"Another string drawn above a curve","T:r"); SAVE(text); -+ START(false); gr->Plot(y.SubData(-1,0)); gr->Error(x0,y0,ex0,ey0,"ko"); SAVE(error); -+ -+ START(true); gr->Dens(a,"BbcyrR"); gr->Colorbar(); SAVE(dens); -+ START(true); gr->Tile(a,b,"BbcyrR"); SAVE(tiler); -+ START(false); gr->Cont(a,"BbcyrRt"); SAVE(contt); -+ START(false); gr->Vect(a,b,"BbcyrR"); SAVE(vect); -+ START(false); gr->VectC(a,b,"BbcyrR"); SAVE(vectc); -+ START(false); gr->Flow(a,b,"BbcyrR"); SAVE(flow); -+ START(true); gr->Pipe(a,b,"BbcyrR"); SAVE(pipe2); -+ -+ f.Modify("sin(2*pi*x*x)",0); f.Modify("sin(2*pi*x)",1); f.Modify("sin(2*pi*sqrt(x))",2); -+ gr->Axis(mglPoint(0,-1,0),mglPoint(1,1,1)); -+ START(false); gr->Plot(f); gr->Axis("xy"); -+ if (idtf_mode) gr->LegendBox = false; -+ gr->AddLegend("sin(\\pi {x^2})","b"); gr->AddLegend("sin(\\pi x)","g*"); gr->AddLegend("sin(\\pi \\sqrt{x})","r+"); -+ gr->Legend(); SAVE(legend); -+ gr->ClearLegend(); // clear legend strings -+ return 0; -+} -+//----------------------------------------------------------------------------- -+int sample_crust(mglGraph *gr, const void *) -+{ -+ mglData pnts("hotdogs.pts"); -+ pnts.Norm(-1,1,true); -+ -+ gr->Rotate(40,60); -+ gr->Light(true); -+ gr->Alpha(true); -+ gr->Box(); -+ gr->Crust(pnts); -+ //gr->Dots(pnts,"k"); -+ return 0; -+} -+//----------------------------------------------------------------------------- -+int sample_transp(mglGraph *gr, const void *s) // flag # -+{ -+ const char *suf = (const char *)s; -+ gr->Alpha(true); gr->Light(true); gr->Light(0,mglPoint(0,0,1)); -+ mglData a(30,20); -+ a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ -+ gr->SetScheme("BbcyrR"); -+ gr->TranspType = 0; gr->Clf(); -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); gr->Surf(a); gr->Box(); -+ gr->SubPlot(2,2,1); gr->Rotate(40,60); gr->Dens(a); gr->Box(); -+ gr->SubPlot(2,2,2); gr->Rotate(40,60); gr->Cont(a); gr->Box(); -+ gr->SubPlot(2,2,3); gr->Rotate(40,60); gr->Axial(a); gr->Box(); -+ save(gr,"type0",suf,type); -+ -+ gr->TranspType = 1; gr->Clf(); -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); gr->Surf(a); gr->Box(); -+ gr->SubPlot(2,2,1); gr->Rotate(40,60); gr->Dens(a); gr->Box(); -+ gr->SubPlot(2,2,2); gr->Rotate(40,60); gr->Cont(a); gr->Box(); -+ gr->SubPlot(2,2,3); gr->Rotate(40,60); gr->Axial(a); gr->Box(); -+ save(gr,"type1",suf,type); -+ -+ gr->TranspType = 2; gr->Clf(); -+ gr->SubPlot(2,2,0); gr->Rotate(40,60); gr->Surf(a); gr->Box(); -+ gr->SubPlot(2,2,1); gr->Rotate(40,60); gr->Dens(a); gr->Box(); -+ gr->SubPlot(2,2,2); gr->Rotate(40,60); gr->Cont(a); gr->Box(); -+ gr->SubPlot(2,2,3); gr->Rotate(40,60); gr->Axial(a); gr->Box(); -+ save(gr,"type2",suf,type); -+ gr->TranspType = 0; gr->Clf(); -+ return 0; -+} -+//----------------------------------------------------------------------------- -+int sample_hint(mglGraph *gr, const void *s) -+{ -+ const char *suf = (const char *)s; -+ mglData a(50,40), b(50,40), d(50,40), c(61,51,40), y(50,3), y1(50), y2(50); -+ a.Modify("0.6*sin(2*pi*x)*sin(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ b.Modify("0.6*cos(2*pi*x)*cos(3*pi*y) + 0.4*cos(3*pi*(x*y))"); -+ c.Modify("(-2*((2*x-1)^2 + (2*y-1)^2 + (2*z-1)^4 - (2*z-1)^2 - 0.1))"); -+ y.Modify("0.7*sin(2*pi*x) + 0.5*cos(3*pi*x) + 0.2*sin(pi*x)",0); -+ y.Modify("sin(2*pi*x)",1); y.Modify("cos(2*pi*x)",2); -+ y1.Modify("0.3*sin(2*pi*x)"); y2.Modify("0.5+0.3*cos(2*pi*x)"); -+ for(int i=0;iSubPlot(1,1,0); gr->Clf(); gr->Alpha(false); gr->Light(false); -+ // 2-axis plot -+ gr->Clf(); gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1),mglPoint(-1,-1,-1)); -+ gr->Axis(); gr->Label('y',"axis 1",0); gr->Plot(y1,"b"); -+ gr->Axis(mglPoint(0,0,0),mglPoint(1,1,1),mglPoint(1,1,1)); // set up second axis -+ gr->Axis(); gr->Label('y',"axis 2",0); gr->Stem(y2,"r"); -+ SAVE(2_axis); -+ -+ gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1)); -+ // contours under mesh -+ START(true); gr->Flow(a,b,"br",5,true,-0.99); gr->Dens(d,"BbcyrR"); -+ SAVE(flow_dens); -+ -+ gr->Rotate(40,60); -+ // contours on the surface -+ START(true); gr->Surf(a,"kw"); gr->CAxis(-1,0); gr->Cont(a,"w"); -+ gr->CAxis(0,1); gr->Cont(a,"k"); gr->CAxis(-1,1); -+ SAVE(surf_cont); -+ gr->Light(true); -+ // contours under mesh -+ START(true); gr->Mesh(a,"BbcyrR"); gr->Cont(a, 0, 7, -1); -+ SAVE(mesh_cont); -+ // contours on the surface -+ START(true); gr->Surf(a,"BbcyrR"); gr->Cont(a,"y"); -+ SAVE(surf_cont_y); -+ // caxis and the surface -+ START(true); gr->CAxis(0,1); gr->Surf(a,"BbcyrR"); gr->CAxis(-1,1); -+ SAVE(surf_caxis); -+ // caxis and the surface -+ START(true); gr->Axis(mglPoint(-1,-1,0),mglPoint(1,1,1)); gr->Cut=false; -+ gr->Surf(a,"BbcyrR"); gr->Axis(mglPoint(-1,-1,-1),mglPoint(1,1,1)); -+ SAVE(surf_cut); gr->Cut = true; -+ -+ // several light sources -+ START(false); -+ gr->Light(1,mglPoint(0,1,0),'c'); -+ gr->Light(2,mglPoint(1,0,0),'y'); -+ gr->Light(3,mglPoint(0,-1,0),'m'); -+ gr->Surf(a,"h"); -+ SAVE(several_light); -+ gr->Light(1,false); -+ gr->Light(2,false); -+ gr->Light(3,false); -+ -+ // CutMin CutMax example -+ gr->CutMin = mglPoint(0,-1,-1); gr->CutMax = mglPoint(1,0,1.1); -+ START(false); gr->Surf3(-0.5,c,"BbcyrR"); -+ mglData v(10); v.Fill(-0.5,1); -+ gr->ContF3(v,c,'x',-1,"BbcyrR"); gr->ContF3(v,c,'y',-1,"BbcyrR"); -+ gr->ContF3(v,c,'z',0,"BbcyrR"); gr->ContF3(v,c,'z',39,"BbcyrR"); -+ SAVE(cutminmax2); -+ -+ START(false); gr->Alpha(true); -+ gr->Surf3(c,"BbcyrR"); -+ SAVE(cutminmax); -+ gr->CutMax = gr->CutMin; // switch off cutting area -+ -+ START(false); -+ gr->CutOff("(z>(x+0.5*y-1)^2-1) & (z>(x-0.5*y-1)^2-1)"); -+ gr->Surf3(c); gr->CutOff(0); -+ SAVE(surf3_cutoff); -+ -+ return 0; -+} -+//----------------------------------------------------------------------------- -+void sample_molecule(mglGraph *gr) -+{ -+ gr->VertexColor(false); gr->Compression(false); // per-vertex colors and compression are detrimental to transparency -+ -+ gr->Alpha(true); gr->Light(true); -+ -+ gr->SubPlot(2,2,0); -+ gr->StartGroup("Methane"); -+ gr->StartGroup("MetaneLabel"); -+ gr->Text(mglPoint(0,1.2),"Methane, CH_4",0,-3); -+ gr->EndGroup(); -+ gr->Rotate(60,120); -+ gr->Sphere(mglPoint(0,0,0),0.25,"k"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(0,0,1),0.35,"h",1,2); -+ gr->Sphere(mglPoint(0,0,0.7),0.25,"g"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(-0.94,0,-0.33),0.35,"h",1,2); -+ gr->Sphere(mglPoint(-0.66,0,-0.23),0.25,"g"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(0.47,0.82,-0.33),0.35,"h",1,2); -+ gr->Sphere(mglPoint(0.33,0.57,-0.23),0.25,"g"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(0.47,-0.82,-0.33),0.35,"h",1,2); -+ gr->Sphere(mglPoint(0.33,-0.57,-0.23),0.25,"g"); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,1); -+ gr->StartGroup("Water"); -+ gr->StartGroup("WaterLabel"); -+ gr->Text(mglPoint(0,1.2),"Water, H{_2}O",0,-3); -+ gr->EndGroup(); -+ gr->Rotate(60,100); -+ gr->StartGroup("Water_O"); -+ gr->Sphere(mglPoint(0,0,0),0.25,"r"); -+ gr->EndGroup(); -+ gr->StartGroup("Water_Cloud_1"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(0.3,0.5,0),0.3,"m",1,2); -+ gr->EndGroup(); -+ gr->StartGroup("Water_H_1"); -+ gr->Sphere(mglPoint(0.3,0.5,0),0.25,"g"); -+ gr->EndGroup(); -+ gr->StartGroup("Water_Cloud_2"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(0.3,-0.5,0),0.3,"m",1,2); -+ gr->EndGroup(); -+ gr->StartGroup("Water_H_2"); -+ gr->Sphere(mglPoint(0.3,-0.5,0),0.25,"g"); -+ gr->EndGroup(); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,2); -+ gr->StartGroup("Oxygen"); -+ gr->StartGroup("OxygenLabel"); -+ gr->Text(mglPoint(0,1.2),"Oxygen, O_2",0,-3); -+ gr->EndGroup(); -+ gr->Rotate(60,120); -+ gr->Drop(mglPoint(0,0.5,0),mglPoint(0,-0.3,0),0.3,"m",1,2); -+ gr->Sphere(mglPoint(0,0.5,0),0.25,"r"); -+ gr->Drop(mglPoint(0,-0.5,0),mglPoint(0,0.3,0),0.3,"m",1,2); -+ gr->Sphere(mglPoint(0,-0.5,0),0.25,"r"); -+ gr->EndGroup(); -+ -+ gr->SubPlot(2,2,3); -+ gr->StartGroup("Ammonia"); -+ gr->StartGroup("AmmoniaLabel"); -+ gr->Text(mglPoint(0,1.2),"Ammonia, NH_3",0,-3); -+ gr->EndGroup(); -+ gr->Rotate(60,120); -+ gr->Sphere(mglPoint(0,0,0),0.25,"b"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(0.33,0.57,0),0.32,"n",1,2); -+ gr->Sphere(mglPoint(0.33,0.57,0),0.25,"g"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(0.33,-0.57,0),0.32,"n",1,2); -+ gr->Sphere(mglPoint(0.33,-0.57,0),0.25,"g"); -+ gr->Drop(mglPoint(0,0,0),mglPoint(-0.65,0,0),0.32,"n",1,2); -+ gr->Sphere(mglPoint(-0.65,0,0),0.25,"g"); -+ gr->EndGroup(); -+ -+ gr->InPlot(0,1,0,1); -+} -+//----------------------------------------------------------------------------- -+void sample_ternary(mglGraph *gr) -+{ -+ gr->Light(false); gr->Alpha(false); -+ -+ mglData x(50),y(50),rx(10),ry(10), a(20,30); -+ a.Modify("4*x*y"); -+ x.Modify("0.25*(1+cos(2*pi*x))"); -+ y.Modify("0.25*(1+sin(2*pi*x))"); -+ rx.Modify("rnd"); ry.Modify("(1-v)*rnd",rx); -+ -+ gr->StartGroup("Ternary plot (a+b+c=1)"); gr->Text(mglPoint(0,1.3), "Ternary plot (a+b+c=1)"); gr->EndGroup(); -+ gr->Ternary(true); -+ gr->StartGroup("Plot r2"); gr->Plot(x,y,"r2"); gr->EndGroup(); -+ gr->StartGroup("Plot q^ "); gr->Plot(rx,ry,"q^ "); gr->EndGroup(); -+ gr->StartGroup("Cont"); gr->Cont(a,"BbcyrR"); gr->EndGroup(); -+ gr->StartGroup("Line"); gr->Line(mglPoint(0.5,0), mglPoint(0,0.75), "g2"); gr->EndGroup(); -+ gr->StartGroup("Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Grid"); gr->Grid("xyz","B;"); gr->EndGroup(); -+ gr->StartGroup("a comp."); gr->Label('x',"a comp.", 0); gr->EndGroup(); -+ gr->StartGroup("b comp."); gr->Label('y',"b comp.", 0); gr->EndGroup(); -+ gr->StartGroup("c comp."); gr->Label('z',"c comp.", 0); gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_drops(mglGraph *gr) -+{ -+ gr->Light(true); gr->Alpha(false); -+ -+ gr->StartGroup("sh=0"); -+ gr->StartGroup("text sh=0"); gr->Text(mglPoint(-1,1.2),"sh=0","rC",-1); gr->EndGroup(); -+ gr->StartGroup("drop sh=0"); gr->Drop(mglPoint(-1,0),mglPoint(0,1),0.5,"r",0); gr->EndGroup(); -+ gr->EndGroup(); -+ gr->StartGroup("sh=33"); -+ gr->StartGroup("text sh=33"); gr->Text(mglPoint(-0.33,1.2),"sh=0.33","rC",-1); gr->EndGroup(); -+ gr->StartGroup("drop sh=33"); gr->Drop(mglPoint(-0.33,0),mglPoint(0,1),0.5,"r",0.33); gr->EndGroup(); -+ gr->EndGroup(); -+ gr->StartGroup("sh=67"); -+ gr->StartGroup("text sh=67"); gr->Text(mglPoint(0.33,1.2),"sh=0.67","rC",-1); gr->EndGroup(); -+ gr->StartGroup("drop sh=67"); gr->Drop(mglPoint(0.33,0),mglPoint(0,1),0.5,"r",0.67); gr->EndGroup(); -+ gr->EndGroup(); -+ gr->StartGroup("sh=1"); -+ gr->StartGroup("text sh=1"); gr->Text(mglPoint(1,1.2),"sh=1","rC",-1); gr->EndGroup(); -+ gr->StartGroup("drop sh=1"); gr->Drop(mglPoint(1,0),mglPoint(0,1),0.5,"r",1); gr->EndGroup(); -+ gr->EndGroup(); -+ gr->StartGroup("Balls"); -+ gr->Ball(mglPoint(-1,0,1),'k'); -+ gr->Ball(mglPoint(-0.33,0,1),'k'); -+ gr->Ball(mglPoint(0.33,0,1),'k'); -+ gr->Ball(mglPoint(1,0,1),'k'); -+ gr->EndGroup(); -+ gr->StartGroup("Line"); -+ gr->Line(mglPoint(-1,0,1),mglPoint(1,0,1),"b"); -+ gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_fish(mglGraph *gr) -+{ -+ gr->Light(true); gr->Alpha(false); -+ -+ gr->Axis(mglPoint(0,0),mglPoint(1.1,1.1)); -+ -+ mglData a(10,10), b(10,10), x(10,10), y(10,10); -+ a.Modify("0.3*x+rnd"); x.Modify("x+0.1*rnd"); -+ b.Modify("0.3*y+rnd"); y.Modify("y+0.1*rnd"); -+ -+ gr->Dew(x,y,a,b,"BbcyrR"); -+} -+//----------------------------------------------------------------------------- -+void sample_mirror(mglGraph *gr) -+{ -+ gr->Light(true); gr->Alpha(false); -+ -+ mglData a(30,40),x(30),y1(40),y2(40); -+ a.Modify("pi*(1-2*x)*exp(-4*y^2-4*(2*x-1)^2)"); -+ x.Fill(-1,1); y1.Fill(0,1); y2.Fill(0,-1); -+ -+ gr->Rotate(40,60); -+ gr->StartGroup("Box"); gr->Box(); gr->EndGroup(); -+ gr->StartGroup("Surf"); -+ gr->StartGroup("RedSurf"); gr->Surf(x,y1,a,"r"); gr->EndGroup(); -+ gr->StartGroup("BlueSurf"); gr->Surf(x,y2,a,"b"); gr->EndGroup(); -+ gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_semilog(mglGraph *gr) -+{ -+ gr->Light(false); gr->Alpha(false); -+ -+ mglData x(2000), y(2000); -+ x.Modify("0.01/(x+10^(-5))"); y.Modify("sin(1/v)",x); -+ -+ gr->Axis(mglPoint(0.01,-1),mglPoint(1000,1),mglPoint(0.01,-1)); -+ gr->Axis("lg(x)",0,0); gr->dx = 0; -+ -+ gr->StartGroup("Box"); gr->Box(); gr->EndGroup(); -+ gr->StartGroup("Plot"); gr->Plot(x,y,"b2"); gr->EndGroup(); -+ gr->StartGroup("Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Grid"); gr->Grid("xy","g"); gr->EndGroup(); -+ gr->StartGroup("x"); gr->Label('x',"x",0); gr->EndGroup(); -+ gr->StartGroup("y = sin 1/x"); gr->Label('y', "y = sin 1/x",0); gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+void sample_loglog(mglGraph *gr) -+{ -+// Problem! -+ gr->Light(false); gr->Alpha(false); -+ -+ mglData x(2000), y(2000); -+ x.Modify("pow(10,6*x-3)"); y.Modify("sqrt(1+v^2)",x); -+ -+ gr->Axis(mglPoint(0.001,0.1),mglPoint(1000,1000),mglPoint(0.001,0.1)); -+ gr->Axis("lg(x)","lg(y)",0); gr->dx = gr->dy = 0; -+ -+ gr->StartGroup("Box"); gr->Box(); gr->EndGroup(); -+ gr->StartGroup("Plot"); gr->Plot(x,y,"b2"); gr->EndGroup(); -+ gr->StartGroup("Axis"); gr->Axis(); gr->EndGroup(); -+ gr->StartGroup("Grid"); gr->Grid("xy","g"); gr->EndGroup(); -+ gr->StartGroup("x"); gr->Label('x',"x",0); gr->EndGroup(); -+ gr->StartGroup("y=(1+x^2)^(1/2)"); gr->Label('y', "y=\\sqrt{1+x^2}",0); gr->EndGroup(); -+} -+//----------------------------------------------------------------------------- -+int sample_fit(mglGraph *gr) -+{ -+ mglData rnd(100), in(100), res; -+ rnd.Modify("0.4*rnd+0.1+sin(4*pi*x)", 0); -+ in.Modify("0.3+sin(4*pi*x)", 0); -+ -+ gr->Axis(mglPoint(-1,-2), mglPoint(1,2)); -+ gr->StartGroup("data"); gr->Plot(rnd, ". "); gr->EndGroup(); -+ gr->StartGroup("Box"); gr->Box(); gr->EndGroup(); -+ -+ float ini[3] = {1,1,3}; -+ gr->Fit(res, rnd, "a+b*sin(c*x)", "abc", ini); -+ gr->StartGroup("fitted trendline"); gr->Plot(res, "r"); gr->EndGroup(); -+ gr->StartGroup("real trendline"); gr->Plot(in, "b"); gr->EndGroup(); -+ gr->StartGroup("fitted equation"); -+ gr->Text(mglPoint(-1, -1.3), "fitted:", "L:r", -1); -+ gr->PutsFit(mglPoint(0, -1.8), "y = ", "C:r", -1); -+ gr->EndGroup(); -+ gr->StartGroup("initial equation"); gr->Text(mglPoint(0, 2.2), "initial: y = 0.3+sin(2\\pi x)", "C:b", -1); gr->EndGroup(); -+ -+ return 0; -+} -+//----------------------------------------------------------------------------- -+#define SAMPLE( FUNC, FNAME) \ -+ gr->DefaultPlotParam(); gr->Compression(compression); gr->VertexColor(vertex_color); \ -+ sample_ ## FUNC(gr); save(gr,#FNAME,suf,type); -+ -+int all_samples(mglGraph *gr, const void *s) -+{ -+ const char *suf = (const char *)s; -+ gr->DefaultPlotParam(); gr->Compression(false); gr->VertexColor(false); -+ sample_colors(gr); save(gr,"colors",suf,type); -+ gr->SetScheme("BbcyrR"); -+ -+ SAMPLE(a1, sample1); -+ SAMPLE(a2, sample2); -+ SAMPLE(a3, sample3); -+ SAMPLE(a4, sample4); -+ SAMPLE(a5, sample5); -+ SAMPLE(a6, sample6); -+ SAMPLE(a7, sample7); -+ SAMPLE(a8, sample8); -+ SAMPLE(a9, sample9); -+ SAMPLE(aa, samplea); -+ SAMPLE(ab, sampleb); -+ SAMPLE(ac, samplec); -+ SAMPLE(ad, sampled); -+ SAMPLE(ae, samplee); -+ SAMPLE(molecule,molecule); -+ SAMPLE(ternary, ternary); -+ SAMPLE(fit, fit); -+ SAMPLE(drops, drops); -+ SAMPLE(fish, fish); -+ SAMPLE(semilog, semilog); -+ SAMPLE(loglog, loglog); -+ SAMPLE(mirror, mirror); -+ -+ gr->DefaultPlotParam(); gr->Compression(compression); gr->VertexColor(vertex_color); -+ -+ return 0; -+} -+#undef SAMPLE -+ -+static struct option longopts[] = { -+ { "idtf", no_argument, &type, IDTF_TYPE }, -+ { "png", no_argument, &type, 0 }, -+ { "enable-vertex-color", no_argument, &vertex_color, 1 }, -+ { "disable-vertex-color", no_argument, &vertex_color, 0 }, -+ { "enable-compression", no_argument, &compression, 1 }, -+ { "disable-compression", no_argument, &compression, 0 }, -+ { "enable-pdf-transparency", no_argument, &pdftransparency, 1 }, -+ { "disable-pdf-transparency", no_argument, &pdftransparency, 0 }, -+ { "help", no_argument, NULL, 'h' }, -+ { NULL, 0, NULL, 0 } -+}; -+ -+void usage() -+{ -+ puts( \ -+ "idtf - output idtf\n" \ -+ "png - output png\n" \ -+ " other options affect idtf mode only and take form enable-smth or disable-smth\n" \ -+ "vertex-color - use by default per-vertex coloring or not\n" \ -+ "compression - use by default compression or not\n" \ -+ "pdf-transparency - assume that the pdf making software can set transparency for surfaces\n" \ -+ ); -+ exit(0); -+}; -+ -+ -+//----------------------------------------------------------------------------- -+int main(int argc,char **argv) -+{ -+ const char *suf = ""; -+ int ch; -+ mglGraphIDTF u3d; -+ mglGraphZB zb; -+ mglGraph *gr = NULL; -+ while ((ch = getopt_long_only(argc, argv, "", longopts, NULL)) != -1) -+ switch (ch) { -+ case 0: -+ break; -+ case 'h': -+ default: -+ usage(); -+ } -+ -+ if (type==IDTF_TYPE) -+ { -+ gr = &u3d; -+ idtf_mode = true; -+ } -+ else -+ { -+ gr = &zb; -+ idtf_mode = false; -+ gr->SetSize(300,300); -+ } -+ -+// gr.BaseLineWidth = 2; -+ all_samples(gr,suf); -+ sample_transp(gr,suf); -+ u3d.unrotate_flag = true; -+ sample_hint(gr,suf); -+ u3d.unrotate_flag = false; -+ gr->Org = mglPoint(0,0,0); -+ full_test(gr,suf); -+ -+ return 0; -+} -+//----------------------------------------------------------------------------- ---- mathgl-1.10.2.1.orig/mgl/Makefile.in -+++ mathgl-1.10.2.1/mgl/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -47,7 +47,11 @@ subdir = mgl - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d ---- mathgl-1.10.2.1.orig/utils/Makefile.in -+++ mathgl-1.10.2.1/utils/Makefile.in -@@ -1,4 +1,4 @@ --# Makefile.in generated by automake 1.11 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -@@ -42,7 +42,11 @@ subdir = utils - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/config/autotroll.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/config/libtool.m4 \ -+ $(top_srcdir)/config/ltoptions.m4 \ -+ $(top_srcdir)/config/ltsugar.m4 \ -+ $(top_srcdir)/config/ltversion.m4 \ -+ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - mkinstalldirs = $(install_sh) -d -@@ -76,7 +80,8 @@ am__mglview_SOURCES_DIST = mglview.cpp - @USE_FLTK_TRUE@am_mglview_OBJECTS = mglview-mglview.$(OBJEXT) - mglview_OBJECTS = $(am_mglview_OBJECTS) - @USE_FLTK_TRUE@mglview_DEPENDENCIES = \ --@USE_FLTK_TRUE@ $(top_builddir)/widgets/libmgl-fltk.la -+@USE_FLTK_TRUE@ $(top_builddir)/widgets/libmgl-fltk.la \ -+@USE_FLTK_TRUE@ $(top_builddir)/mgl/libmgl.la - mglview_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(mglview_CXXFLAGS) $(CXXFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -@@ -281,7 +286,7 @@ mgl2eps_LDADD = $(top_builddir)/mgl/libm - mgl2svg_SOURCES = mgl2svg.cpp - mgl2svg_LDADD = $(top_builddir)/mgl/libmgl.la - @USE_FLTK_TRUE@mglview_SOURCES = mglview.cpp --@USE_FLTK_TRUE@mglview_LDADD = $(top_builddir)/widgets/libmgl-fltk.la -+@USE_FLTK_TRUE@mglview_LDADD = $(top_builddir)/widgets/libmgl-fltk.la $(top_builddir)/mgl/libmgl.la - @USE_FLTK_TRUE@mglview_CXXFLAGS = $(FLTK_FLAGS) $(AM_CXXFLAGS) - @USE_GIF_TRUE@mgl2gif_SOURCES = mgl2gif.cpp - @USE_GIF_TRUE@mgl2gif_LDADD = $(top_builddir)/mgl/libmgl.la -- 2.30.2