Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

AW: Reverse Axis

  • To: mathgroup at
  • Subject: [mg23610] AW: [mg23559] Reverse Axis
  • From: Wolf Hartmut <hwolf at>
  • Date: Wed, 24 May 2000 02:16:10 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

	-----Ursprüngliche Nachricht-----
	Von:	Carl Liggio [SMTP:cliggio at]
	Gesendet am:	Samstag, 20. Mai 2000 09:11
	An:	mathgroup at
	Betreff:	[mg23559] Reverse Axis

	Is there a way to reverse the axis on a 2-D plot?

	I am trying to flip the negative and the positive.

Dear Carl,

perhaps you may try out the following:

You may have plots

	p = Plot[BesselJ[0, x], {x, 0, 6 Pi}]

	p2 = Plot[BesselJ[1, x], {x, 0, 4 Pi}, PlotStyle -> Hue[0]]


	ShowReflected[plots__, op_] := 
	  With[{g0 = FullGraphics[First[Flatten[{plots}]]], 
	      grest = Graphics /@ Rest[Flatten[{plots}]]}, 
	    Show[{g0, grest} /. {Line[pts_] :> Line[op # & /@ pts], 
	          Text[t_, coord_, offset_] :> Text[t, op coord, op
	      PlotRegion -> {{0.05, 0.95}, {0, 1}}]]

and try

	ShowReflected[p, p2, {-1, 1}]

	ShowReflected[p, p2, {1, -1}]

	ShowReflected[p, p2, {-1, -1}]

(perhaps some time you need to tamper with PlotRegion)

Kind regards,  Hartmut

  • Prev by Date: Re: Linking with C++
  • Next by Date: Re: hung for good?
  • Previous by thread: Pb with ZeroTest
  • Next by thread: Re: , sending notebook attatchments, -- a partial solution...