Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1072

Line Style Color per Index Question

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe12.iad.POSTED!00000000!not-for-mail
Content-Type text/plain; charset="ISO-8859-1"
From Richard Bair <bairs5@charter.net>
User-Agent KNode/4.8.2
Content-Transfer-Encoding 7Bit
Newsgroups comp.graphics.apps.gnuplot
Subject Line Style Color per Index Question
Lines 61
MIME-Version 1.0
Message-ID <QLyor.35253$FQ1.30147@newsfe12.iad> (permalink)
NNTP-Posting-Host pijmengmgpalmgpnblbbgokhioebdhjd
X-Complaints-To abuse@charter.net
X-Trace dolmjbnehhedbigjlgdegddckechphcokkmjppmbgldiolpppijmengmgpalmgpnbimeediemdpakoonhnjcbengdifocioiklindaeolojhomfhkcahihpcaohdkifdfdlbpmaelemcakjp
NNTP-Posting-Date Thu, 03 May 2012 16:55:12 UTC
Date Thu, 03 May 2012 12:55:12 -0400
X-Received-Bytes 2079
Xref csiph.com comp.graphics.apps.gnuplot:1072

Show key headers only | View raw


I'm struggling to set the color of 4x plotted lines with the following data 
file and plt file.  It seems only my first style called in the plot command 
will be used for all 4x lines.  Please advise.

Thanks!

dat file:
# Jan SF Test (12A then 12B)
2/1/2012 0
5/1/2012 28

2/1/2012 0
5/1/2012 2

# Feb SF Test (12A then 12B)
3/1/2012 0
5/1/2012 20

3/1/2012 0
5/1/2012 4

load plt file:
# inits
clear
unset colorbox
unset multiplot
unset key
set termoption dashed
set autoscale xy
set grid
set origin 0,0

# # y-axis
set yrange[0:30]

# x-axis
set timefmt "%m/%d/%Y"
set xdata time
set xrange["1/1/2012":"6/1/2012"]
set nomxtics
#set xtics format "%b-%y"
#set xtics "1/1/2012", 1209600, "5/1/2012"

# chart
set title "12A vs. 12B Linear Projections"
set style line 1 lt rgb "red" lw 1
set style line 2 lt rgb "blue" lw 1

# plot
plot'/home/rich/Documents/rich/code/gnuplot/gnu_chart.dat' using 1:2 index 
0 
with linespoints ls 1, \
    '/home/rich/Documents/rich/code/gnuplot/gnu_chart.dat' using 1:2 index 
1 
with linespoints ls 2, \
    '/home/rich/Documents/rich/code/gnuplot/gnu_chart.dat' using 1:2 index 
2 
with linespoints ls 1, \
    '/home/rich/Documents/rich/code/gnuplot/gnu_chart.dat' using 1:2 index 
3 
with linespoints ls 2

Back to comp.graphics.apps.gnuplot | Previous | NextNext in thread | Find similar


Thread

Line Style Color per Index Question Richard Bair <bairs5@charter.net> - 2012-05-03 12:55 -0400
  Re: Line Style Color per Index Question Richard Bair <bairs5@charter.net> - 2012-05-04 07:54 -0400

csiph-web