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


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

Re: Reading pattern from a column...

Newsgroups comp.graphics.apps.gnuplot
Date 2014-10-23 22:31 -0700
References <6e475ddd-8f01-4d0a-aa0d-18ec78fc93f7@googlegroups.com> <m2b99e$2dt$1@news.rz.uni-karlsruhe.de>
Message-ID <94d8d4c3-cd68-4795-9076-156556796192@googlegroups.com> (permalink)
Subject Re: Reading pattern from a column...
From ChaMi <ck.mitra@gmail.com>

Show all headers | View raw


On Thursday, October 23, 2014 9:40:23 PM UTC+5:30, Karl wrote:
> Am 23.10.2014 um 15:47 schrieb ChaMi:
> > I am using gnuplot 4.6 on ubuntu linux.
> > 
> > I am plotting a histogram but I want the bars to have different fill styles. I have added one column of data (0,1,2,3,4 etc.) and I am trying to using the plot command as:
> > 
> > plot 'kk.csv' usi 9:xtic(1) with boxes fillstyle pattern $10
> > 
> > As you have guessed, it is not not working; it says ; expected.
> > 
> > Please tell me what I am doing wrong?
> > 
> 
> I think you want something similar to
> 
> 	plot $data usi 0:1:(.5):2:xtic(3) with boxes lc variable
> 
> only the pattern should change instead of the colour (which is taken
> here from column 2)?
> 
> ($data is a new inline data variant in gp5.0, just replace it with your
> file name)
> 
> The keyword "variable" unfortunately is not implemented for fillstyles,
> so i´m not sure it is possible to take the fillstyle from a column.
> 
> As there are not so many patterns available anyway, you could however do
> this (pattern in column 2 again):
> 
> plot for [i=1:5] $data us ($2==i ? $0 : NaN):1:(.5):xtic(3) \
> 	with boxes fillst pattern i
> 
> i.e. cycle though the patterns and eacht time only plot the data in rows
> where $2 matches.
> 
>   Karl

Thanks a lot! That did it. Although I am getting a lot of warning, but the result is what I wanted.

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


Thread

Reading pattern from a column... ChaMi <ck.mitra@gmail.com> - 2014-10-23 06:47 -0700
  Re: Reading pattern from a column... Karl <mail.kfr@gmx.net> - 2014-10-23 18:13 +0200
    Re: Reading pattern from a column... ChaMi <ck.mitra@gmail.com> - 2014-10-23 22:31 -0700
      Re: Reading pattern from a column... Karl <mail.kfr@gmx.net> - 2014-10-24 12:09 +0200

csiph-web