Groups | Search | Server Info | Keyboard shortcuts | Login | Register


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

Re: grid with gapped histogram

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: grid with gapped histogram
Followup-To comp.graphics.apps.gnuplot
Date 2011-04-05 20:06 -0700
Organization gnuplot development team
Message-ID <inglb3$n7r$1@dont-email.me> (permalink)
References <b1f075fd-c97f-4c9b-80d2-e171c5ddd2d1@glegroupsg2000goo.googlegroups.com>

Followups directed to: comp.graphics.apps.gnuplot

Show all headers | View raw


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...

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


Thread

grid with gapped histogram bryan <bryanlepore@gmail.com> - 2011-04-05 09:12 -0700
  Re: grid with gapped histogram sfeam <sfeam@users.sourceforge.net> - 2011-04-05 20:06 -0700

csiph-web