Loading ...
Sorry, an error occurred while loading the content.

Re: [ploticus] Re: How do I set background colours for regions on a graph/plot?

Expand Messages
  • Stephen C. Grubb
    Hi, I can t offer any suggestion on this one. -Steve ... Stephen C. Grubb scg@jax.org Scientific Software Engineer, The Jackson Laboratory 600 Main Street
    Message 1 of 4 , Dec 15, 2004
    • 0 Attachment
      Hi, I can't offer any suggestion on this one.

      -Steve

      On Thu, 2 Dec 2004, raoulsam wrote:

      >
      >
      > Not really sure how to get this to work.
      >
      > My script looks like this now and all i get is two lines but no shaded
      > area. What I want is for the entire graph to be shaded (a rectangle)
      > from the top of th graph to the bottom in a color but only where the
      > values for the b column are lower than the c column. the b column
      > should always be higher than the c column, so if there is a region
      > where it isn't, i'd like to highlight that region.
      >
      > r-s
      >
      > #proc getdata
      > file: test.dat
      > fieldnames: a b c d
      >
      > #proc areadef
      > xautorange: datafield=a
      > yautorange: datafield=b
      > xaxis.stubs: inc
      > yaxis.stubs: inc
      > xaxis.stubdetails: size=6
      > yaxis.stubdetails: size=6
      > yaxis.label: Log(Copy Number)
      > xaxis.label: Probe Index
      > xaxis.grid: color=gray(0.8)
      > yaxis.grid: color=gray(0.8)
      >
      > #proc processdata
      > action: stats
      > fields: d
      > #endproc
      >
      > #if @MAX > 0
      > #set SHADE_IT = 1
      > #else
      > #set SHADE_IT = 0
      > #endif
      >
      > #if @SHADE_IT = 1
      > areacolor: dullyellow
      > #endif
      >
      > #proc lineplot
      > xfield: a
      > yfield: b
      > linedetails: width=0.5 color=blue
      >
      > #proc lineplot
      > xfield: a
      > yfield: c
      > linedetails: width=0.5 color=red
      >
      > No shading happens at all. What I'd like really is the plot to
      >
      > --- In ploticus@yahoogroups.com, "Stephen C. Grubb" <scg@j...> wrote:
      > > I'm assuming you're talking about one plot here, involving the 10
      > data
      > > points.
      > >
      > > Do you mean, if any cases where V1 > V2 are encountered in the data,
      > then
      > > shade the plotting area?
      > >
      > > If you're writing a script and have pl 2.30, I think you can do it
      > this
      > > way:
      > >
      > > #proc getdata
      > > ....
      > >
      > > // find the max of field 4..
      > > #proc processdata
      > > action: stats
      > > fields: 4
      > > #endproc
      > >
      > > #if @MAX > 0
      > > #set SHADE_IT = 1
      > > #else
      > > #set SHADE_IT = 0
      > > #endif
      > >
      > > #proc areadef
      > > ...
      > > #if @SHADE_IT = 1
      > > areacolor: dullyellow
      > > #endif
      > > ...
      > >
      > >
      > > -Steve
      > >
      > > On Tue, 30 Nov 2004, raoulsam wrote:
      > >
      > > >
      > > >
      > > > Consider this example data:
      > > >
      > > > idx V1 V2 V1 > V2
      > > > 1 1 5 0
      > > > 2 2 6 0
      > > > 3 3 7 0
      > > > 4 4 8 0
      > > > 5 5 3 1
      > > > 6 6 0 1
      > > > 7 12 5 1
      > > > 8 8 9 0
      > > > 9 11 9 1
      > > > 10 10 8 1
      > > >
      > > > I can plot a time series for V1 and V2 against idx easily.
      > > >
      > > > What I would like to be able to do is shade the entire background
      > of a
      > > > plot (areadef'd region) yellow if V1>V2.
      > > >
      > > > Does anyone know how to do this?
      > > >
      > > > Thanks
      > > >
      > > > R-S
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > > Yahoo! Groups Links
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > >
      > >
      > > Stephen C. Grubb scg@j...
      > > Scientific Software Engineer, The Jackson Laboratory
      > > 600 Main Street Bar Harbor, Maine 04609 USA
      >
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >


      Stephen C. Grubb scg@...
      Scientific Software Engineer, The Jackson Laboratory
      600 Main Street Bar Harbor, Maine 04609 USA
    Your message has been successfully submitted and would be delivered to recipients shortly.