Re: two y-axes in one plot
- To: mathgroup at smc.vnet.net
- Subject: [mg8100] Re: [mg8040] two y-axes in one plot
- From: Thomas Bohl <T.Bohl at cern.ch>
- Date: Tue, 12 Aug 1997 00:54:40 -0400
- Organization: CERN European Lab for Particle Physics
- Sender: owner-wri-mathgroup at wolfram.com
Fabian Haas wrote: > > Buttgereit <Buttgereit at compuserve.com> wrote > > >Hi, > >an example: > > > >Plot[ > > { > > Sin[x], > > .5 2 Cos[x] > > }, {x,0,2 Pi}, > > Frame->{True,True,False,True}, > > FrameTicks->{ > > Automatic, > > {{-1,"-1"},{0,"0"},{1,"1"}}, > > False, > > {{1,"2"},{.5,"1"},{0,"0"},{-.5,"1"},{1,"2"}} > > } > >] > > > >1. Map one y-range into the other; here I have mapped the range {-2,2} of > > > > >the function 2 Cos[x] into the range {-1,1} of Sin[x] - so both functions > > > > >will use all available space to be displayed (or use an other map to have > > a > >certain scale). > > > >2. use different FrameTicks for different axes. > > > >Tom Wickham-Jones has defined a couple of functions for labeling ticks. > >They are described and explained in his book "Mathematica Graphics" > >(Springer, '94) - it might already be available on MathSource > >(EnhancedGraphics or something like that). > > > >If you use Graphics`MultipleListPlot` you will easily be able to use > >different styles for your two functions... > > > >Greetings, > >Peter > > Hi, > > the simplest way would be to use Plot for each function and define your= > styles there. Then combined the Plots with Show[ p1, p2, p3 ]. > If you only want to have differnent line colours use PlotStyle option. > > Cheers > > ------------------------------------------------------------------------- > Dipl.Biol. Fabian Haas, MPhil > Institut f=FCr Spezielle Zoologie und Evolutionsbiologie > Erbertstr. 1 > D-07743 Jena > b5hafa at pop3.uni-jena.de > Deutschland / Germany > TEL ++ 49 361 630 424 > =46AX ++ 49 361 630 392 > :-) (-: > ------------------------------------------------------------------------- I am using the IBM RISC System/6000 Version 2.2 (Sep 22, 1994) and whatever I do, I get frame ticks/labels on the left hand axis but on the right hand axis I just get the ticks (but NO labels). Is that a feature of Version 2.2? Cheers, Thomas.