Skip to content

Commit

Permalink
new demo
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeam committed Sep 19, 2017
1 parent da30cb7 commit 2ae1783
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions demo/columnhead.dem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# - Demonstrates use of columnhead(N) in a using specifier.
# - Demonstrates delayed evaluation of columnhead(N) in plot title
# - Demonstrates failure of 5.0 and 5.2.0 to terminate open-ended iteration
# at the front of a plot command.
#

$DATA << EOD
aA bB cC dD
4 8 6 7
8 5 7 3
3 8 4 6
1 2 9 10
EOD

set key box autotitle columnhead width 2 samplen 0
set key title "Columns"
set offset 1,1,1,1
set xlabel "Line in data file"
set ylabel "Column values"
set title "Point labels show which column they came from"
set xtics 1,1,4 format "line %.0g"

plot for [col=1:*] $DATA using (1+$0):(column(col)):(columnhead(col)[2:2]) with labels title columnhead(col)[2:2]
pause -1

reset

0 comments on commit 2ae1783

Please sign in to comment.