The PyXPlot logo

PyXPlot

Examples: Bar Charts

Download
.ppl
1.5K
.eps
88K
.png
14K

Boxes, steps and impulses

Previous
Up
Graphical output from PyXPlot

Script

set multiplot
set nodisplay
set samples 25
width=7
gold_ratio = 1/((1+sqrt(5))/2)

set width width
set xrange [-10.9:10.9]
set yrange [-1.2:1.2]
set nokey

# Plot 0 (bottom left)
set xlabel 'x'
set ylabel 'y'
set label 1 '(a)' at -9,0.8
set label 2 'histeps' -3.7,0.8
plot 'example6.dat' with histeps, 'example6.dat' with points

# Plot 1 (bottom right)
set origin 1*width, 0*width*gold_ratio
set xlabel 'x'
set ylabel 'linkaxis 0'
set label 1 '(b)' at -9,0.8
set label 2 'boxes' -3.7,0.8
plot 'example6.dat' with boxes, 'example6.dat' with points

# Plot 2 (middle left)
set origin 0*width, 1*width*gold_ratio
set xlabel 'linkaxis 0'
set ylabel 'y'
set label 1 '(c)' at -9,0.8
set label 2 'fsteps' -3.7,0.8
plot 'example6.dat' with fsteps, 'example6.dat' with points

# Plot 3 (middle right)
set origin 1*width, 1*width*gold_ratio
set xlabel 'linkaxis 1'
set ylabel 'linkaxis 2'
set label 1 '(d)' at -9,0.8
set label 2 'steps' -3.7,0.8
plot 'example6.dat' with steps, 'example6.dat' with points

# Plot 4 (top left)
set origin 0*width, 2*width*gold_ratio
set xlabel 'linkaxis 0'
set ylabel 'y'
set label 1 '(e)' at -9,0.8
set label 2 'impulses' -3.7,0.8
plot 'example6.dat' with impulses, 'example6.dat' with points

# Plot 5 (top right)
set origin 1*width, 2*width*gold_ratio
set boxfrom -0.5
set xlabel 'linkaxis 1'
set ylabel 'linkaxis 4'
set label 1 '(f)' at -9,0.8
set label 2 'boxes' -3.7,0.8
plot 'example6.dat' with boxes, 'example6.dat' with points

set display
refresh

Notes

This example illustrates the boxes, impulses and steps plot styles, which operate similarly to the styles of the same name in gnuplot. Panels (a) and (b) illustrates the impulses plot style for a sine wave, using the set boxfrom command to define the point from which the lines originate. Panel (c) illustrates the fsteps plot style, (d) steps, (e) histeps and (f) boxes.