1#!/usr/local/bin/python
2
3# Copyright (C) 2004-2016 Alan W. Irwin
4# Copyright (C) 2004 Andrew Ross
5#
6# This file is part of PLplot.
7#
8# PLplot is free software; you can redistribute it and/or modify
9# it under the terms of the GNU Library General Public License as published
10# by the Free Software Foundation; version 2 of the License.
11#
12# PLplot is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU Library General Public License for more details.
16#
17# You should have received a copy of the GNU Library General Public License
18# along with the file PLplot; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
20
21
22# Run python plplot example 16 non-interactively.
23
24# Append to effective python path so that can find plplot modules.
25from plplot_python_start import *
26
27import sys
28import plplot as w
29
30# Parse and process command line arguments
31w.plparseopts(sys.argv, w.PL_PARSE_FULL)
32
33# Initialize plplot
34
35# Colour palette must be set before
36# w.plinit to follow C version and
37# to set the first page background properly.
38w.plspal0("cmap0_black_on_white.pal")
39w.plspal1("cmap1_gray.pal",1)
40w.plscmap0n(3)
41w.plinit()
42
43import x16
44x16.main(w)
45
46# Terminate plplot
47w.plend()
48