1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
# ex_linestyles.ppl
#
# The code in this file is part of Pyxplot
# <http://www.pyxplot.org.uk>
#
# Copyright (C) 2006-2012 Dominic Ford <coders@pyxplot.org.uk>
# 2008-2012 Ross Church
#
# $Id: ex_linestyles.ppl 1261 2012-07-11 21:38:05Z dcf21 $
#
# Pyxplot 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.
#
# You should have received a copy of the GNU General Public License along with
# Pyxplot; if not, write to the Free Software Foundation, Inc., 51 Franklin
# Street, Fifth Floor, Boston, MA 02110-1301, USA
# ----------------------------------------------------------------------------
# This script produces a figure for the Pyxplot Users' Guide
# Call common initialisation script
reset
# Set output destination
title = "ex_linestyles" ; load "examples/fig_init.ppl"
set multiplot
set nodisplay
set texthalign left
set textvalign center
for i=0 to 43
{
y = -(i%15) * unit(1*cm)
x = floor(i/15) * unit(4*cm)
point x,y with pt i+1 color red
if (i<10) { ; name = r"Point type \phantom{0}%d"%(i+1)
} else { ; name = r"Point type %d"%(i+1) ; }
text name at x+unit(5*mm),y
}
set display
refresh
# Set output destination
load "examples/fig_end.ppl"
title = "ex_linestyles2" ; load "examples/fig_init.ppl"
# Main body of figure script
clear
set multiplot
set nodisplay
text 'Line width 1' at unit( 1.25*cm),unit(cm) hal c val c
text 'Line width 2' at unit( 6.75*cm),unit(cm) hal c val c
text 'Line width 4' at unit(10.25*cm),unit(cm) hal c val c
for i=0 to 9
{
y = -i * unit(1*cm)
x = unit(0*cm)
line from x+unit(0.0*cm),y to x+unit( 2.5*cm),y with lw 1 lt i+1
line from x+unit(5.5*cm),y to x+unit( 8.0*cm),y with lw 2 lt i+1
line from x+unit(9.0*cm),y to x+unit(11.5*cm),y with lw 4 lt i+1
if (i<10) { ; name = r"Line type \phantom{0}%d"%(i+1)
} else { ; name = r"Line type %d"%(i+1) ; }
text name at x+unit(3.0*cm),y
}
set display
refresh
# Set output destination
load "examples/fig_end.ppl"
title = "ex_linestyles3" ; load "examples/fig_init.ppl"
# Main body of figure script
clear
set multiplot
set nodisplay
set axis x invisible
set axis y invisible
set xrange [-1:1]
set yrange [-1:1]
set width 0.01*unit(cm)
set noclip
set nokey
box from unit(-2.5*cm),unit(3.0*cm) to unit(13*cm),unit(-21.5*cm)
for i=0 to 9
{
y = -(i%5) * unit(4.7*cm)
x = floor(i/5) * unit(7.6cm)
set origin x,y
plot 'examples/ex_linestyles.dat' with stars pt i+1
if (i<10) { ; name = r"Star type \phantom{0}%d"%(i+1)
} else { ; name = r"Star type %d"%(i+1) ; }
text name at x+unit(2.4*cm),y
}
set display
refresh
# Call common cleanup script
load "examples/fig_end.ppl"
|