Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Filling between lines in ListPlot not working

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128443] Re: Filling between lines in ListPlot not working
  • From: Joug Raw <jougraw at gmail.com>
  • Date: Sat, 20 Oct 2012 00:31:45 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20121019063943.87E9A6891@smc.vnet.net>

Hi,

You forgot to sort the list. Try the code below

ListLogPlot[Map[SortBy[#, #[[1]] &] &, {minv, maxv}],
 Prolog -> Line[{{320, 1}, {1850, 1}}], Axes -> None, Frame -> True,
 Joined -> {True, True}, Filling -> 1 -> {2},
 PlotRange -> {{320, 1850}, {.1, 30}}, ImageSize -> 600]

JR


On Fri, Oct 19, 2012 at 8:39 AM, Dominik Hezel <sendme2000 at me.com> wrote:

> Hello,
>
> could someone please help and tell me why I don't get a filling between
> the two lines?
>
> Thanks!
>
> minval = {{1818.`, 1.3157894736842106`}, {1812.`,
>     1.3673469387755104`}, {1794.`, 1.1827956989247312`}, {1717.`,
>     1.3846153846153848`}, {1690.`, 1.3333333333333335`}, {1650.`,
>     1.2138728323699424`}, {1603.`, 1.247311827956989`}, {1598.`,
>     1.2272727272727273`}, {1598.`, 1.3513513513513515`}, {1598.`,
>     1.12`}, {1598.`, 1.25`}, {1598.`, 1.4000000000000001`}, {1598.`,
>     1.2`}, {1598.`, 1.4137931034482758`}, {1597.`,
>     1.4499999999999997`}, {1595.`, 0.41304347826086957`}, {1580.`,
>     1.5`}, {1565.`, 1.2253521126760565`}, {1563.`,
>     1.3608695652173912`}, {1560.`, 1.2333333333333334`}, {1544.`,
>     1.2340425531914894`}, {1543.`, 1.357142857142857`}, {1518.`,
>     1.3930885529157666`}, {1493.`, 1.3125`}, {1455.`,
>     1.1454545454545455`}, {1440.`, 1.2096774193548387`}, {1411.`,
>     0.98`}, {1356.`, 1.108910891089109`}, {1354.`,
>     1.1181818181818182`}, {1340.`, 1.1649484536082475`}, {1338.`,
>     1.3333333333333333`}, {1337.`, 1.1703296703296704`}, {1311.`,
>     1.193609022556391`}, {1301.`, 1.150943396226415`}, {1225.`,
>     0.8275862068965517`}, {1217.`, 1.36986301369863`}, {1190.`,
>     0.5257731958762887`}, {1163.`, 1.276595744680851`}, {1151.`,
>     1.0842105263157895`}, {1135.`, 0.7567567567567567`}, {1037.`,
>     0.72`}, {1000.`, 0.36363636363636365`}, {1000.`,
>     0.47826086956521746`}, {970.`, 0.36`}, {952.`, 0.475`}, {918.`,
>     0.48979591836734687`}, {912.`, 0.4444444444444444`}, {863.`,
>     0.35714285714285715`}, {720.`, 0.28823529411764703`}, {684.`,
>     0.18571428571428572`}, {660.`, 0.12698412698412698`}, {470.`,
>     0.3125`}, {429.`, 0.011594202898550727`}};
>
> maxval = {{1818.`, 1.9210526315789473`}, {1812.`,
>     2.346938775510204`}, {1794.`, 1.9354838709677418`}, {1717.`,
>     2.307692307692308`}, {1690.`, 2.380952380952381`}, {1650.`,
>     1.9421965317919074`}, {1603.`, 2.3010752688172045`}, {1598.`,
>     2.1363636363636362`}, {1598.`, 1.9189189189189189`}, {1598.`,
>     1.96`}, {1598.`, 1.7857142857142858`}, {1598.`, 1.92`}, {1598.`,
>     1.8399999999999999`}, {1598.`, 2.758620689655172`}, {1597.`,
>     2.1999999999999997`}, {1595.`, 2.1739130434782608`}, {1580.`,
>     2.25`}, {1565.`, 2.2535211267605635`}, {1563.`,
>     2.152173913043478`}, {1560.`, 1.96`}, {1544.`,
>     1.995744680851064`}, {1543.`, 1.357142857142857`}, {1518.`,
>     1.9870410367170626`}, {1493.`, 2.`}, {1455.`,
>     1.7636363636363637`}, {1440.`, 2.0483870967741935`}, {1411.`,
>     1.7`}, {1356.`, 2.1782178217821784`}, {1354.`,
>     2.3363636363636364`}, {1340.`, 1.5154639175257731`}, {1338.`,
>     1.9298245614035088`}, {1337.`, 2.087912087912088`}, {1311.`,
>     1.4849624060150375`}, {1301.`, 1.3320754716981131`}, {1225.`,
>     1.7241379310344829`}, {1217.`, 2.0547945205479454`}, {1190.`,
>     0.8556701030927835`}, {1163.`, 2.`}, {1151.`,
>     1.2736842105263158`}, {1135.`, 1.243243243243243`}, {1037.`,
>     1.04`}, {1000.`, 0.6727272727272727`}, {1000.`,
>     0.6956521739130436`}, {970.`, 0.84`}, {952.`,
>     0.7999999999999999`}, {918.`, 0.7755102040816325`}, {912.`,
>     0.9629629629629629`}, {863.`, 0.6142857142857143`}, {720.`,
>     0.5235294117647059`}, {684.`, 0.5714285714285714`}, {660.`,
>     0.5714285714285714`}, {470.`, 0.625`}, {429.`,
>     0.6086956521739131`}};
>
> ListLogPlot[
>  {minv, maxv}
>  , Prolog -> Line[{{320, 1}, {1850, 1}}]
>  , Axes -> None
>  , Frame -> True
>  , Joined -> {True, True}
>  , Filling -> 1 -> {2}
>  , PlotRange -> {{320, 1850}, {.1, 30}}
>  , ImageSize -> 600
>  ]
>
>




  • Prev by Date: More Button crashes
  • Next by Date: Re: Export Data from Mathematica to Excel
  • Previous by thread: Filling between lines in ListPlot not working
  • Next by thread: Re: Filling between lines in ListPlot not working