MathGroup Archive 2004

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

Search the Archive

Re: FilledPlot Sideways?

  • To: mathgroup at
  • Subject: [mg51394] Re: [mg51339] FilledPlot Sideways?
  • From: Tomas Garza <tgarza01 at>
  • Date: Fri, 15 Oct 2004 02:48:45 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

I suggest the following: from the original plot (not the FilledPlot) extract
the coordinates of the points on the curve. Then Reverse the two coordinates
in each point. This transposes the two axes. Now work separately with those
points which are on the positive side and those on the negative side, and
construct for each list the ListFilledPlot. Finally, Show the two plots
together. Example:

g1 = Plot[x^2, {x, -2, 2}];

transpPtsOnCurve = Cases[g1, x_ -> x, {5}] /. {x_, y_} -> {y, x}

posPts = Cases[transpPtsOnCurve, {x_, y_} /; y >= 0]

upPart = FilledListPlot[posPts, DisplayFunction -> Identity];

dnPart = FilledListPlot[posPts /. {x_, y_} -> {x, -y},
    DisplayFunction -> Identity];

Show[upPart, dnPart, DisplayFunction -> $DisplayFunction];

By the way, this has the interior of the curve filled. If you want the
exterior to be filled instead, that is a different situation, but not
difficult to handle.

Tomas Garza

Mexico City

----- Original Message ----- 
From: "Tom Aldenberg" <Tom.Aldenberg at>
To: mathgroup at
Subject: [mg51394] [mg51339] FilledPlot Sideways?

> Hi,
> How can I make FilledPlots sideways?
> So I want the equivalent of FilledPlot [x^2, {x,-2,2}], but with the axes
> transposed.
> The curve is something like ParametricPlot[{x^2, x}, {x,-2,2}]. How to do
> the shading?
> Tom Aldenberg

  • Prev by Date: Re: Sorting a list of pairs on the second elements
  • Next by Date: Re: GUIKit / GraphEditor - java code for SetPropertyValue[]
  • Previous by thread: FilledPlot Sideways?
  • Next by thread: Re: FilledPlot Sideways?