An open API service indexing awesome lists of open source software.

https://github.com/emmt/gistplot

Plotting library based on Yorick Gist
https://github.com/emmt/gistplot

Last synced: 11 months ago
JSON representation

Plotting library based on Yorick Gist

Awesome Lists containing this project

README

          

# Gist2 Library

Gist2 is a library for scientific plotting based on the Gist part of
[Yorick][yorick-url]. It is intended to be independent of Yorick and callable
from any software. As Yorick, Gist2 is licensed under the [BSD
license][license-url].

## Installation

On most UNIX-like systems (including Linux and MacOS X), you can build Gist2 by
changing to the top level directory of the source distribution and typing:

```sh
cd "$SRC_DIR"
./configure
make
make install
```

where `$SRC_DIR` is the path to the top level directory of the source
distribution.

You can also build the software from (almost) any other directory, say
`$BUILD_DIR`, by typing:

```sh
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
"$SRC_DIR"/configure
make
make install
```

The `configure` script has a number of options or arguments that may be of
interest (call the script with option `--help` for a list). For instance, to
use the GNU C compiler, run the configuration script as:

```sh
./configure CC=gcc
```

or set the environment variable `CC` prior to call `configure`.

To build Gist2 on a MS Windows machine, read [win/README](win/README).

## Notes for developers

To make Play and Gist libraries compatible with other software, exported
symbols (functions and variables) and macros have been renamed to use more
specific prefixes.

The dependencies and rules for compiling any of the source files are given by
the `Make.rules` file which is generated by the `makerules` script. In this
script, the dependencies are automatically guessed by calling the C compiler
with option `-MM`. To add other sources to be compiled or to modify the flags
for compiling a given file, it should be sufficient to edit the `makerules`
script and to re-generate `Make.rules` by typing:

```sh
./makerules >Make.rules
```

The C compiler to generate the dependencies can be specified in the command
line. For instance:

```sh
./makerules CC=gcc >Make.rules
```

## Organization of code

The top-level distribution directory contains this README, scripts for
configuring and building yorick, and a number of subdirectories. Some
subdirectories contain core parts of yorick; others are extras which
you might reasonably omit. Here's a quick roadmap:

- `play/` (portability layer) here are event loop, low level io, graphics
primitives everything else is supposed to be strictly
architecture-independent (however, other non-core packages may slightly
violate this rule);
- `win/` (MS Windows specific files) here are the MS Visual C++ project files
some Windows code is in subdirectories like play/win;
- `gist/` play-based 2D scientific visualization library `etc/` Gist palettes
and style files;
- `doc/` documentation.

## Other build options

You can take up to four steps to configure, build, test, and install
yorick. In order, the four separate commands are:

make config
make
make check
make install

Yorick requires an ANSI C compiler and libraries, some POSIX standard
functions (plus either poll or select, which are not covered by any
standard, but are present on all UNIX systems), and the basic X11
library (R4 might work, but anything R5 or better should certainly
work). However, these components may be misinstalled or installed in
places where the configuration process cannot find them. If so, you
can either fix your system or edit the files Make.cfg and
play/unix/config.h by hand to repair any errors or oversights of "make
config".

The `make config` step creates the file `Make.cfg` (in this top-level
directory). By default, the compiler and loader flags are just `-O`.
If you want fancier options, you can edit Make.cfg before you build;
just modify the `GIST_CFLAGS` and/or `GIST_LDFLAGS` variable.
Optimization flags like `-g` or `-O` are handled separately; use the
`GIST_COPT` variable to set those.

Instead of editing Make.cfg by hand after the "make config" step, you
can also set a variety of environment variables to control the
configuration process. You can read the configuration scripts --
configure, play/unix/config.sh, play/x11/xconfig.sh, and
yorick/yconfig.sh -- to find out precisely what they do. Here they
are, with sample non-default values:

CC='xlc -q64' # C compiler name plus overall mode switch
CFLAGS=-g # compile flags (-O is default)
LDFLAGS=-g # load flags (optimization CFLAGS is default)
AR='ar -X 64' # ar archive program
RANLIB='ranlib -X 64' # ranlib archive indexer
MATHLIB=-lmcompat # math library (-lm is default)

FPU_IGNORE=yes # give up trying to catch floating point exceptions
NO_PLUGINS=yes # build yorick with no plugin support
LD_STATIC=yes # force hex and drat packages to be statically loaded
NO_PASSWD=yes # hack for crippled OSes or crosscompilers (catamount)
NO_CUSERID=yes # hack for crippled OSes or crosscompilers (catamount)
NO_PROCS=yes # build yorick with no subprocess or poll/select support
(catamount) - this cripples yorick event handling
NO_POLL=yes # forces use of select when poll present but broken
(Mac OS X uses this by default)

NO_XLIB=yes # build yorick with no onscreen graphics
X11BASE=/weird/X11root # try -I/weird/X11root/include, and
-L/weird/X11root/lib
X11INC=/weird/X11root/include # directory containing X11/Xlib.h
X11LIB=/weird/X11root/lib # directory containing libX11.a or .so

Other make targets include:

clean -- get rid of the mess left over from the build
do this after successful install
distclean -- clean plus all files generated by the config step
config does distclean before it begins
uninstall -- gets rid of all installed files
be sure to do uninstall before distclean if you want to
get rid of the yorick you installed (otherwise you will
need to make ysite again)

There are many more build targets and make macros. Read the comments
in Makefile and Makepkg for more information.

[license-url]: ./LICENSE.md
[license-img]: http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat

[yorick-url]: http://dhmunro.github.io/yorick-doc/