MathGroup Archive 1994

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

Search the Archive

Re: plots in reverse order

  • To: mathgroup at
  • Subject: Re: plots in reverse order
  • From: Allan Hayes <hay at>
  • Date: Sun, 16 Oct 94 22:07:43 +0100

John Pender (tuk at (John Pender)) writes:

> on rare occasions i like to make plots for which the value of a 

> point on the x axis decreases as you go from left to right, as 

> opposed to increases.  i realize that >99.99% of the time you want 

> the values to increase as you go from left to right, but every so 

> often i want to duplicate the format of a plot in the (mostly 

> older) literature.  i haven't found an obvious solution (meaning an
> option that i can set for one or another of the various plotting 

> commands). does anyone out there have a clean solution?
> john pender

Is this any  use?


ReverseXPlot[f_,{x_,a_,b_},opts___?OptionQ] :=
		Plot[(f/.x->(b -(x-a)))//Evaluate, {x,a,b}, opts,
				DisplayFunction -> Identity
		{lines_,{xaxis_, yaxis_,xticks_,r___}},z___] :> 

				{	xaxis,

				Text[(b -(n-a)),w],
		DisplayFunction -> $DisplayFunction,
		PlotRange-> All,
		FilterOptions[Graphics, opts]		
ReverseXPlot[{x,x^2,x^3}, {x,1,0}]

	Allan Hayes
	hay at (NEXTMAIL welcome)

  • Prev by Date: Mathematica Training
  • Next by Date: [no subject]
  • Previous by thread: Mathematica Training
  • Next by thread: Re: plots in reverse order