Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Rotate a 2D graph

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81655] Re: Rotate a 2D graph
  • From: "David Park" <djmpark at comcast.net>
  • Date: Mon, 1 Oct 2007 04:38:05 -0400 (EDT)
  • References: <fdnlnp$kpk$1@smc.vnet.net>

Tom,

This is how I would do it with DrawGraphics.

Needs["DrawGraphics6`DrawingMaster`"]
Needs["BarCharts`"]

bottomticks = CustomTicks[(10 # + 1) &, {0, 0.3, 0.1, 5}];
topticks = CustomTicks[(# + 1) &, {0, 3, 1, 5}];
leftticks = {{0, "a"}, {1, "b"}, {2, "c"}, {3, "d"}};
Draw2D[
 {{BarChart[{1, 2, 3, 2}, BarStyle -> Red,
      BarOrientation -> Vertical] // DrawGraphics,
    ListDraw[{1, 0.5, 3, 0.74}, Joined -> True,
     PlotStyle -> {Black, Thick}]} // RotateOp[-\[Pi]/2]},
 Frame -> True,
 FrameTicks -> {{leftticks, None}, {bottomticks, topticks}},
 FrameLabel -> {Style["f2", Blue], "x", "f1", None},
 PlotRangePadding -> 0.05,
 ImageSize -> 300]


-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


<tomfabtastic at hotmail.com> wrote in message 
news:fdnlnp$kpk$1 at smc.vnet.net...
> Hello,
>
> I would like to rotate the below graph so that the FrameLabel "f1"
> reads at the top of the graph and "f2" is at the bottom. I want to
> keep everything as is, but rotate the graph 90 degrees clockwise. Any
> ideas ?
>
> Needs["BarCharts`"]
> aa = BarChart[{1, 2, 3, 2}, BarStyle -> Red,
>   BarOrientation -> Vertical];
> bb = ListPlot[{1, 0.5, 3, 0.74}, Joined -> True,
>   PlotStyle -> {Black, Thick}];
> comp = Show[{aa, bb}, PlotLabel -> "Plotting together", Frame -> True,
>   FrameLabel -> {x, f1, None, StyleForm[f2, FontColor -> Blue]},
>  FrameTicks -> {{{1, "a"}, {2, "b"}, {3, "c"}, {4, "d"}}, {1, 2, 3},
>    None, Table[{y, Style[N[y/10], Blue]}, {y, 0, 3, 1}]}]
>
> Thanks,
> Tom
>
> 



  • Prev by Date: Re: Flat colour in RegionPlot; millions of little triangles
  • Next by Date: Re: advanced fill effects for graphics primitives
  • Previous by thread: Re: Rotate a 2D graph
  • Next by thread: Creating "sticky" item in File >> Open Recent menu?