~ubuntu-branches/ubuntu/oneiric/ctioga2/oneiric

« back to all changes in this revision

Viewing changes to tests/axes.sh

  • Committer: Bazaar Package Importer
  • Author(s): Vincent Fourmond
  • Date: 2011-01-24 21:36:06 UTC
  • Revision ID: james.westby@ubuntu.com-20110124213606-9ettx0ugl83z0bzp
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# axes.sh: various aspects of axes
 
2
# Copyright 2009 by Vincent Fourmond
 
3
 
4
# You can do whatever you want with this file, including removing the
 
5
# copyright notice and this text.
 
6
 
 
7
. ./test-include.sh
 
8
 
 
9
$ct -x '$x$ values' 'sin(x)' -y '$y$ values' 
 
10
 
 
11
$ct -t 'Notice how the top shrinks' \
 
12
    -x '$x$ values' 'sin(x)' -y '$y$ values' 
 
13
 
 
14
$ct -t 'Now, second Y axis on the left' \
 
15
    -x '$x$ values' 'sin(x)' -y '$y_1$ values' \
 
16
    --y2 'x**2'
 
17
 
 
18
$ct -t 'See how to specify the second Y label' \
 
19
    -x '$x$ values' 'sin(x)' -y '$y_1$ values' \
 
20
    --y2 'x**2' -y '$y_2$ values' 
 
21
 
 
22
# @todo this shows it is cumbersome to change all the colors in one go:
 
23
# providing a --axis-color that just works would be great.
 
24
 
 
25
# See how the meaning of y and yaxis is dependent on the default axis.
 
26
$ct -t 'With different colors for the axes' \
 
27
    -x '$x$ values' 'sin(x)' -y '$y_1$ values' /color Red \
 
28
    --axis-style y /stroke_color Red \
 
29
    --label-style yaxis /color Red \
 
30
    --y2 'x**2' -y '$y_2$ values' /color Blue \
 
31
    --label-style yaxis /color Blue \
 
32
    --axis-style y /stroke_color Blue 
 
33
 
 
34
 
 
35
 
 
36
# # Alternative axes
 
37
# $ct 'sin(x)' --x2 --y2 'x**2' --yrange -20:50 'cos(x)' /yaxis left \
 
38
#     --draw-text 0,50 'biniou' --yaxis left --yrange -1.2:1.2