MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Filling in ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105074] Re: Filling in ListPlot
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Fri, 20 Nov 2009 06:37:54 -0500 (EST)
  • References: <he36dp$eci$1@smc.vnet.net>

The Filling documentation uses the same trick (I guess that's where
you took it from), so I assume this is the best way to do it.

On Nov 19, 12:24 pm, fd <fdi... at gmail.com> wrote:
> All
>
> I'm having problems with Filling in ListPlot. I have two curves and
> would like different colors as one curve goes above the other, here
> goes the code;
>
> aris = {10000, 5000, 1000, 500, 100, 50, 20}; y = 10000;
>
> elist = Flatten[ConstantArray[#, IntegerPart[y/#]] & /@ aris];
>
> n = 1;
> ariList = Reverse[{N[y/n++], #} & /@ elist]
>
> ListLogLogPlot[{ariList, {{1, 1}, {100000, 100000}}},
>  PlotRange -> All, InterpolationOrder -> {0, 1}, Joined -> True,
>  Filling -> {2 -> {{1}, {Yellow, Orange}}}]
>
> If I define a interpolation function myself it works, but it is a bit
> of a nuisance
>
> f[x_] = Interpolation[ariList, InterpolationOrder -> 0][x];
>
> LogLogPlot[{f[x], x}, {x, 10, 10000},
>  Filling -> {2 -> {{1}, {Yellow, Orange}}}]
>
> Is there a way of making it work correctly with ListPlot ? Would this
> be a bug ?
>
> Best
> F.



  • Prev by Date: Re: Can't connect to remote kernel on Mac OS 10.6
  • Next by Date: Mathematica 7.0 - Wrong Documentation on StudentTCI
  • Previous by thread: Filling in ListPlot
  • Next by thread: Re: Filling in ListPlot