3
# Demo x06 for the PLplot PDL binding
7
# Copyright (C) 2004 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
28
use PDL::Graphics::PLplot;
30
# Parse and process command line arguments
32
plParseOpts (\@ARGV, PL_PARSE_SKIP | PL_PARSE_NOPROGRAM);
38
for ( my $kindfont = 0; $kindfont < 2; $kindfont++) {
39
plfontld ( $kindfont );
41
if ( $kindfont == 0 ) {
46
for ( my $font = 0; $font < $maxfont; $font++ ) {
51
# Set up viewport and window
54
plvpor (0.1, 1.0, 0.1, 0.9);
55
plwind (0.0, 1.0, 0.0, 1.3);
57
# Draw the grid using plbox
59
plbox (0.1, 0, 0.1, 0, "bcg", "bcg");
61
# Write the digits below the frame
67
for ($i = 0; $i <= 9; $i++) {
68
plmtex (1.5, (0.1 * $i + 0.05), 0.5, "b", $i);
73
for ($i = 0; $i <= 12; $i++) {
75
# Write the digits to the left of the frame
77
plmtex (1.0, (1.0 - (2 * $i + 1) / 26.0), 1.0, "lv", 10 * $i);
79
for ($j = 0; $j <= 9; $j++) {
80
my $x = 0.1 * $j + 0.05;
81
my $y = 1.25 - 0.1 * $i;
92
if ( $kindfont == 0 ) {
93
plmtex (1.5, 0.5, 0.5, "t", "PLplot Example 6 - plpoin symbols (compact)");
95
plmtex (1.5, 0.5, 0.5, "t", "PLplot Example 6 - plpoin symbols (extended)");