MathGroup Archive 2010

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

Search the Archive

Re: ListPlot with two horizontal axes

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109126] Re: ListPlot with two horizontal axes
  • From: David Annetts <david.annetts at iinet.net.au>
  • Date: Mon, 19 Apr 2010 04:07:48 -0400 (EDT)

Hi Eli,
> I have data I would like to plot with two horizontal axes.  I.e.
> signal magnitude as a function of wavelength and frequency.  Is there
> a way to label the horizontal axis with two scales? (Note, freq is
> inversely proportional to wavelength.)
> Thanks!
> Eli.
>    
One way is to use different labels on the same scales
     tiktop = {#, #} & /@ Range[10];
     tikbot = {#, 1/#} & /@ Range[10];
     Plot[x, {x, 1, 10},
          FrameTicks -> {{Automatic, Automatic}, {tiktop, tikbot}},
          Frame -> True, Axes -> False
      ]

Another way is to manually construct the axis using a combination of 
differently-oriented lines & text, and placing it using Epilog.  This 
second way is very, very fiddly.

D.


  • Prev by Date: Re: if using Mathematica to solve an algebraic problem
  • Next by Date: Re: if using Mathematica to solve an algebraic problem
  • Previous by thread: ListPlot with two horizontal axes
  • Next by thread: Re: ListPlot with two horizontal axes