[Date Index]
[Thread Index]
[Author Index]
Re: axes for Plot3D
*To*: mathgroup at smc.vnet.net
*Subject*: [mg60866] Re: axes for Plot3D
*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
*Date*: Sat, 1 Oct 2005 02:55:43 -0400 (EDT)
*Organization*: The Open University, Milton Keynes, U.K.
*References*: <dhirom$lua$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
grimey wrote:
> Hello,
> I have a question for you guys.
> I want to do a simple 3D-plot, say
> Plot3D[Sin[xy],{x,-Pi,Pi},{y,-Pi,Pi}].
> But I don't want the PlotRange for the x-axis (in front) from (left
> side) -Pi to (right side)
> +Pi, but from (left side) +Pi to (right side) -Pi. But the y-axis
> should remain from (front) -Pi to (back) +Pi.
> Is it possible to change that? I know that it is not working with
> ViewPoint, of course.
> And if I type
> Plot3D[Sin[xy],{x,Pi,-Pi},{y,-Pi,Pi}], it gives the same plot as the
> one above, of course.
> But I've seen that before in some papers, so it has to be possible, but
> I didn't found anything?
> Can you help me?
>
> Thank you very much!
>
> Thomas Geyer
> (tfgeyer at yahoo.com)
>
Hi Thomas,
One way of doing what you want is the following. First, we create the
graph without displaying it (DisplayFunction->Identity) and save it in a
variable g, say.
In[1]:=
g = Plot3D[Sin[x*y], {x, 0, Pi}, {y, -Pi, Pi}, DisplayFunction ->
Identity];
Then, we reverse the order of the list of points, points that are store
in the first element of the surfacegraphic object (you can see it with
FullForm[g])
In[2]:=
g[[1]] = Map[Reverse, g[[1]], {1}];
Finally, we display the updated graph and tell Mathematica where the
tick marks are going to be located and with what labels.
In[3]:=
Show[g, Ticks -> {{{0, Pi}, {Pi/2, Pi/2}, {Pi, 0}}, Automatic, Automatic},
DisplayFunction -> $DisplayFunction];
Hope this helps,
/J.M.
Prev by Date:
**Re: Re: Re: what is wrong with this plot?**
Next by Date:
**Re: simultaneous ... and ___**
Previous by thread:
**Re: axes for Plot3D**
Next by thread:
**Re: Re: axes for Plot3D**
| |