Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1072
| From | Richard Bair <bairs5@charter.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Line Style Color per Index Question |
| Message-ID | <QLyor.35253$FQ1.30147@newsfe12.iad> (permalink) |
| Date | 2012-05-03 12:55 -0400 |
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 | Next — Next in thread | Find similar
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