Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: FilledPlot Sideways?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51394] Re: [mg51339] FilledPlot Sideways?
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Fri, 15 Oct 2004 02:48:45 -0400 (EDT)
  • References: <200410141037.GAA15004@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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:

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

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

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

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

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

In[6]:=
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 rivm.nl>
To: mathgroup at smc.vnet.net
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?