MathGroup Archive 1998

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

Search the Archive

Re: Re: Reversing the axis of a plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15168] Re: [mg15153] Re: Reversing the axis of a plot
  • From: MJE <evans.nospam at gte.net>
  • Date: Thu, 17 Dec 1998 00:27:46 -0500
  • Organization: None
  • References: <199812160811.DAA24555@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

I want the same capability for ListDensityPlot, ListContourPlot,
DensityPlot, ContourPlot.  It's often undesirable to have the array
indices going up instead of down.  Especially when one is examining an
image.  It plots upside down.  You can use Reverse on the data but then
the y ticks are invalid.  You can define a tick function but what a
pain.

There should perhaps be a simple option (ReverseAxes->{False,True} in my
case).

Mark
remove ".nospam" to reply


JOHN C ERB wrote:
> 
> Click,
> 
> Perhaps a misunderstanding.
> I wish to reverse one of the axes, rather than to switch axes. For
> example, the y-axis would remain the y-axis, and would range from 0 to
> 5, and the x-axis would remain the x-axis; however, the x-axis would
> now range from 5 to 0 (with the plot reversed), as one goes from left
> to right along the axis.
> 
> John C. Erb
> 
> -----Original Message-----
> From: Click Work <cwork at xs4all.nl>
To: mathgroup at smc.vnet.net
> To: mathgroup at smc.vnet.net
> Subject: [mg15168] [mg15153] [mg15153] Re: Reversing the axis of a plot
> 
> >Why don't you just use a ParametricPlot?
> >
> >>use: Plot[3x^2+5x+2,{x,0,5}];
> >
> >ParametricPlot[{x,3x^2+5x+2},{x,0,5}]
> >
> >Now reverse the axes :
> >
> >ParametricPlot[{3x^2+5x+2,x},{x,0,5}]
> >
> >
> >Hope this helps you out....
> >
> >-----Oorspronkelijk bericht-----
> >Van: John C. Erb, Ph.D. <JOHN_C_ERB at prodigy.net>
> >Nieuwsgroepen: comp.soft-sys.math.mathematica
> >Datum: Wednesday, December 09, 1998 10:01 AM
> >Onderwerp: Reversing the axis of a plot
> >
> >
> >>
> >>Occasionally, I have would like to make a plot where one of the axes is
> >>reversed; Mathematica does not seem to have this capability built in.
> >>
> >>Wolfram support shows how to reverse the order of ticks in a plot (see
> >>www.wolfram.com/support/Graphics/Axes/Ticks/Reverse.html); however it
> >>does not reverse the plot,just the ticks on the axis.
> >>
> >>The best workaround I've come up is given in the following example,
> >>which makes use of reversing the ticks.
> >>
> >>I want to reverse the x-axis of the
> >>plot of 3x^2+5x+2.
> >>
> >>To get a normal plot I could
> >>use: Plot[3x^2+5x+2,{x,0,5}];
> >>
> >>To reverse the plot for the x-axis,
> >>I would do the following.
> >>---------------------------------------------------------
> >>Needs["ExtendGraphics`Ticks`"];
> >>
> >>tickreverse[start_,finish_]:=
> >>    TickFunction[start,finish,TextFunction->Reverse];
> >>
> >>this=Table[{x,3x^2+5x+2},{x,0,5,0.25}]; {x,y}=Transpose[this];
> >>that=Transpose[{Reverse[x],y}];
> >>ListPlot[that,Ticks->{tickreverse,Automatic},PlotJoined->True];
> >>---------------------------------------------------------- NOTE: For
> >>some reason, the above needs to be in 3 separate cells to function
> >>properly. Does anyone have a more eloquent solution or any comments?
> >>
> >>John C. Erb
> >>
> >>email: John_C_Erb at prodigy.net
> >>
> >



  • Prev by Date: Re: package loading
  • Next by Date: Re: No trace of trace!
  • Previous by thread: Re: Reversing the axis of a plot
  • Next by thread: Re: Re: Reversing the axis of a plot