3
# Demo x24 for the PLplot PDL binding
7
# Copyright (C) 2005 Rafael Laboissiere
9
# This file is part of PLplot.
11
# PLplot is free software; you can redistribute it and/or modify
12
# it under the terms of the GNU Library General Public License as published
13
# by the Free Software Foundation; either version 2 of the License, or
14
# (at your option) any later version.
16
# PLplot is distributed in the hope that it will be useful,
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
# GNU Library General Public License for more details.
21
# You should have received a copy of the GNU Library General Public License
22
# along with PLplot; if not, write to the Free Software
23
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25
# In Debian, run like this:
27
# PLPLOT_FREETYPE_SANS_FONT=/usr/share/fonts/truetype/arphic/bkai00mp.ttf \
28
# PLPLOT_FREETYPE_SERIF_FONT=/usr/share/fonts/truetype/freefont/FreeSerif.ttf \
29
# PLPLOT_FREETYPE_MONO_FONT=/usr/share/fonts/truetype/ttf-devanagari-fonts/lohit_hi.ttf \
30
# PLPLOT_FREETYPE_SCRIPT_FONT=/usr/share/fonts/truetype/unfonts/UnBatang.ttf \
31
# PLPLOT_FREETYPE_SYMBOL_FONT=/usr/share/fonts/truetype/ttf-bangla-fonts/JamrulNormal.ttf \
32
# ./x24.pl -dev png -o x24pdl.png
42
# For the latest Ubuntu systems lohit_hi.ttf has been moved to the
43
# ttf-indic-fonts-core package instead of ttf-devanagari-fonts so you
44
# will have to use this package instead and update the font path.
50
use PDL::Graphics::PLplot;
52
my $red = pdl [240, 204, 204, 204, 0, 39, 125];
53
my $green = pdl [240, 0, 125, 204, 204, 80, 0];
54
my $blue = pdl [240, 0, 0, 0, 0, 204, 125];
56
my $px = pdl [0.0, 0.0, 1.0, 1.0];
57
my $py = pdl [0.0, 0.25, 0.25, 0.0];
90
# Taken from http://www.columbia.edu/~fdc/pace/
119
plParseOpts (\@ARGV, PL_PARSE_SKIP | PL_PARSE_NOPROGRAM);
124
plvpor (0.0, 1.0, 0.0, 1.0);
125
plwind (0.0, 1.0, 0.0, 1.0);
127
plbox ("", 1.0, 0, "", 1.0, 0);
130
plscmap0 ($red, $green, $blue);
135
for (my $i = 0; $i < 4; $i++) {
145
for (my $i = 0; $i < 12; $i++) {
146
plptex ($sx [$i], $sy [$i], 1.0, 0.0, 0.5, $peace [$i]);