MathGroup Archive 2001

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

Search the Archive

Re: third vert axis

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30444] Re: [mg30431] third vert axis
  • From: BobHanlon at aol.com
  • Date: Sun, 19 Aug 2001 02:01:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 2001/8/18 4:18:20 AM, bernd at bio.vu.nl writes:

>I have a plot with three functions, and would like to have three
>vertical axis.  With Plot, Frame-> True i already have two, and thought
>of drawing a line myself as a third axis.
>So far i have not been able to figure out how to do this.
>
>Show[Block[{$DisplayFunction = Identity}, {Plot[x, {x, 0, 5}, Frame ->
>True, Axes -> False], Graphics[Line[{{10, 0}, {10, 10}}], PlotRegion ->
>{{0, 1}, {0, 1}}]}]]
>
>Plot the Line inside the graph itself. How can i force the line to be outside
>the frame? Also GraphicsArray does not do what i want (i think).
>
>This shows what i mean:
>Show[Graphics[{Rectangle[{0, 0}, {1, 1}, Plot[x, {x, 0, 5}, Frame ->
>True, Axes -> False]], Rectangle[{1, 0}, {2, 1}, Graphics[Line[{{0, 0},
>{0, 10}}]]]}]]
>      
>Has anyone made such a plot before?
>

Here is one approach:

Needs["Graphics`Graphics`"];
Needs["Graphics`Colors`"];

xmin = -20; xmax = 100; 

ca = Block[{$DisplayFunction = Identity}, 
      (Ticks /. AbsoluteOptions[
                Plot[5(x-32)/9, {x, xmin, xmax}]])[[2]] /. 
        {x_?NumberQ, r__} -> {9*x/5 + 32, r}];

ka = Block[{$DisplayFunction = Identity}, 
      (Ticks /. AbsoluteOptions[
                Plot[5(x-32)/9+273.15, {x, xmin, xmax}]])[[2]] /. 
        {x_?NumberQ, r__} -> {9*(x-273.15)/5 + 32, r}];

aox = xmax+5;

(cag = (ca /. {
            {y_?NumberQ, "", len_List, sty_} -> 
              {sty, Line[{{aox-1, y}, {aox, y}}]}, 
            {y_?NumberQ, yl_, len_List, sty_} -> 
              {sty, Line[{{aox-2, y}, {aox, y}}], 
                Text[yl, {aox+17, y}, {1, 0}]}}));

Plot[{x, x/2, x/3}, {x, xmin, xmax}, 
    PlotStyle -> {Red, Green, Blue}, 
    Frame -> True, Axes -> False, 
    FrameStyle -> {{}, {Red}, {}, {Green}}, 
    FrameLabel -> {None, "F", None, "K "}, 
    FrameTicks -> {Automatic, Automatic, Automatic, ka}, 
    PlotRange -> {{xmin-2, aox+30}, Automatic}, 
    Epilog -> Join[cag, 
        {Text["C", {aox+22, 38}], {Blue, Line[{{aox, -26}, {aox, 102}}]}}], 
    PlotRegion -> {{0,0.98}, {0,1}}];


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: Polynomial Reduction with Mod
  • Next by Date: Re: Looking for Mathematica Wavelet Notebooks/Files
  • Previous by thread: third vert axis
  • Next by thread: Re: third vert axis