Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10975 > unrolled thread
| Started by | windlessaegis@gmail.com |
|---|---|
| First post | 2012-07-19 07:52 +0000 |
| Last post | 2012-07-19 07:52 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: switching axes in Plot? windlessaegis@gmail.com - 2012-07-19 07:52 +0000
| From | windlessaegis@gmail.com |
|---|---|
| Date | 2012-07-19 07:52 +0000 |
| Subject | Re: switching axes in Plot? |
| Message-ID | <ju8eb7$99q$1@smc.vnet.net> |
On Wednesday, February 11, 2009 5:20:58 AM UTC-5, (unknown) wrote:
> When using Plot to plot F[x] as a function of x, Mathematica automatically
> assigns the independent variable x to the horizontal axis and the dependent variable F[x] to the horizontal. I often want to switch this around so that the independent variable runs on the vertical axis and the dependent on the horizontal. I feel sure there ought to be a simple way to tell Plot to make this change but I have never found it and instead have resorted to convoluted approaches. Can anyone tell me what the simple trick is, if it exists?
> Thanks
> John Finnigan
Hi,
I just found this looking for the answer myself. Then it hit me: try changing the order that you define the variables within the plot operation.
So as an example, given:
ContourPlot[
Evaluate[Re[
Product[x + I y - (a + I b), {a, -2, 2}, {b, -2, 2}]]], {x, -3,
3}, {y, -3, 3}]
To swap axes, just define y and then x -- like this:
ContourPlot[
Evaluate[Re[
Product[x + I y - (a + I b), {a, -2, 2}, {b, -2, 2}]]], {y, -3,
3}, {x, -3, 3}]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web