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


Groups > comp.soft-sys.math.mathematica > #1746

Re: ListLinePlot and Filling, or not ....

From Peter Pein <petsie@dordos.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: ListLinePlot and Filling, or not ....
Date 2011-04-17 11:54 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ioekd4$n2f$1@smc.vnet.net> (permalink)
References <iobun4$b7h$1@smc.vnet.net>

Show all headers | View raw


Am 16.04.2011 13:31, schrieb annetts729:
> Hi,
>
> I'd like to plot the data
>
> dset = {{{498847., 140.63}, {498836., 140.52}, {498824., 140.42},
> {498813.,
>     140.37}, {498802., 140.39}, {498790., 140.46}, {498779.,
>     140.41}, {498767., 140.35}, {498756., 140.34}, {498744.,
>     140.35}}, {{498847., 121.8}, {498836., 120.71}, {498824.,
>     119.79}, {498813., 118.62}, {498802., 117.45}, {498790.,
>     116.26}, {498779., 114.92}, {498767., 113.57}, {498756.,
>     110.74}, {498744., 109.15}}, {{498847., 100.26}, {498836.,
>     99.04}, {498824., 97.84}, {498813., 96.59}, {498802.,
>     95.32}, {498790., 93.99}, {498779., 92.47}, {498767.,
>     90.94}, {498756., 88.01}, {498744., 86.25}}, {{498847.,
>     90.332}, {498836., 89.067}, {498824., 87.61}, {498813.,
>     86.32}, {498802., 85.}, {498790., 83.61}, {498779.,
>     82.04}, {498767., 80.46}, {498756., 77.68}, {498744.,
>     75.9}}, {{498847., 74.022}, {498836., 72.577}, {498824.,
>     70.31}, {498813., 68.84}, {498802., 67.29}, {498790.,
>     65.6}, {498779., 63.68}, {498767., 61.73}, {498756.,
>     58.95}, {498744., 56.8}}};
>
> which I can do using
>
> pl03 = ListLinePlot[dset, Joined ->  True,
>    PlotStyle ->  {Lighter@Gray, Lighter@Gray, Red, Red, Lighter@Gray},
>    Mesh ->  All, MeshStyle ->  Yellow,
>    PlotRange ->  {Automatic, {-50, 200}},
>    ImageSize ->  500]
>
> I'd like to have to area between those two red traces filled.
>
> Using 8.0.1, I can insert the command Filling->{1->Top, 5->Bottom} to
> fill between the upper&  lower traces.  Given that the command
> Plot[Evaluate[Table[BesselJ[n, x], {n, 4}]], {x, 0, 10}, Filling ->  {2
> ->  {3}}] (from the documentation)
> works as expected (ie. shades between the second&  third curves), why
> doesn't the command
> Filling->{3->{4}} (inserted into the ListLinePlot[] block above) work?
>
> Many thanks,
>
> Dave.
>

Hi Dave,

you could try to interpolate the points to get functions to be 
visualized wit Plot:

Plot[Evaluate[Through[((Interpolation[#1, InterpolationOrder -> 1] & ) 
/@ dset)[x]]],
   {x, 498744, 498847}, PlotStyle -> {Lighter[Gray], Lighter[Gray], Red, 
Red, Lighter[Gray]},
   Mesh -> MapThread[Union, Transpose /@ dset], MeshStyle -> 
Darker[Yellow],
   PlotRange -> {Automatic, {-50, 200}}, ImageSize -> 500, Filling -> {3 
-> {4}},
   FillingStyle -> Lighter[Orange]]

Peter

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

ListLinePlot and Filling, or not .... annetts729 <annetts729@gmail.com> - 2011-04-16 11:31 +0000
  Re: ListLinePlot and Filling, or not .... Peter Pein <petsie@dordos.net> - 2011-04-17 11:54 +0000

csiph-web