Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: sfeam Newsgroups: comp.graphics.apps.gnuplot Subject: Re: grid with gapped histogram Followup-To: comp.graphics.apps.gnuplot Date: Tue, 05 Apr 2011 20:06:06 -0700 Organization: gnuplot development team Lines: 57 Message-ID: References: Reply-To: sfeam@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Wed, 6 Apr 2011 03:06:12 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="WEZLCPHRH3QJlZRyUKB04A"; logging-data="23803"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184Cjq1amwFxbjVCGgeqeiE" User-Agent: KNode/4.4.3 Cancel-Lock: sha1:dt3+FkIxA5emBUKFJJADWnX4cUc= Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:216 bryan wrote: > it appears that I have a grid with lines missing along x at the > intervals of gaps I have in the data (see below). The grid lines are drawn at the position of the axis tick marks. As it is, you have only placed x-axis tick marks at places where there is a data point. That is, the tics come (only) from the using ... xticlabel(4) If you want to add in other ticks, you need to use the "add" option for xtics. For example: set xtics add 1, 1, 10 Would add an additional marks, and grid lines, every 1 unit on x starting a 1 and ending at 10. > I have read that placement of "set grid" with perhaps ytics (help > grid) might help, however, any pointers appreciated while I read "help > grid". > > > # gnuplot input > reset > set boxwidth 0.5 > set title "test" > set bars back ; set xrange [0:22] ; set yrange [0:110] > set datafile missing "." > set xlabel "xlabel" ; set ylabel "ylabel" > set style histogram clustered gap 1 title offset 2,0.25 > set style fill solid border -1 ; set xtics offset 0,-0.5 nomirror > rotate by 0 set grid > plot \ > for [i=0:1] 'data_test_1.dat' u 1:2:(2 * $3):xticlabel(4) every ::i w > boxerror fill empty notitle lw 2 lc -1, \ for [i=2:2] '' u 1:2:(2 * > $3):xticlabel(4) every ::i w boxerror fill empty notitle lw 2 lc -1, \ > for [i=3:7] '' u 1:2:(2 * $3):xticlabel(4) every ::i w boxerror fill > empty notitle lw 2 lc -1, \ for [i=9:16] '' u 1:2:(2 * > $3):xticlabel(4) every ::i w boxerror fill empty notitle lw 2 lc -1, \ > for [i=18:19] '' u 1:2:(2 * $3):xticlabel(4) every ::i w boxerror fill > empty notitle lw 2 lc -1, \ for [i=0:1] '' u 1:2 every ::i w boxes > notitle lc 1, \ for [i=2:2] '' u 1:2 every ::i notitle lc -1 ps 0 lw > 0, \ for [i=3:7] '' u 1:2 every ::i w boxes notitle lc 2, \ for > [i=9:16] '' u 1:2 every ::i w boxes notitle lc 3, \ for [i=18:19] '' u > 1:2 every ::i w boxes notitle lc 1 > > # data file sample: > > 1 81.2756 8.0398 Aaaa > 2 19.8923 2.2855 Bbbb > 3 . . . . > 4 42.2179 4.5625 Cccc > 5 41.0852 3.6900 Dddd > # data continues like that...