Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: framed plots with two y axes scales

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79956] Re: framed plots with two y axes scales
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Thu, 9 Aug 2007 05:28:53 -0400 (EDT)
  • References: <acbec1a40708082003m7cd87835y13c699611eb2bd79@mail.gmail.com>

In addition, the last example I gave shows that the same setting for
FrameTicks is actually giving ticks with different labels, too. What's
up with this program?

On 8/8/07, Chris Chiasson <chris at chiasson.name> wrote:
> Actually, I suspect a subtle error in Mathematica's code instead of
> mine, since I think the following plots should have identical tick
> sizes:
>
> Plot[t,{t,0,2},Frame->True]
> Show[%,AbsoluteOptions[%,FrameTicks]]
>
> On 8/8/07, Chris Chiasson <chris at chiasson.name> wrote:
> > In the old version of Mathematica, I used David Park's Draw Graphics
> > package to obtain graphs with two y axes scales. I was successful in
> > making these graphs without the package in the new version, but my
> > technique involves a lot of code. Is there a cleaner way, such as
> > being able to specify a scaling factor between both sides?
> >
> > Simple example:
> > Height of a ball thrown straight up in a gravitational field with some
> > initial velocity and no drag:
> >
> > plotExpr=h@t/.DSolve[m h''@t==-m g&&h'@0==v0&&h@0==0,h,t]/.{g->9.80665,v0->10}
> > labelRightAxisTicks=Function[gr,With[{frameTicks=FrameTicks/.AbsoluteOptions[gr,FrameTicks],cf=3.2808},Show[gr,FrameTicks->Append[Drop[frameTicks,-1],{#1,If[#2=!="",SetPrecision[#1
> > cf,3],""],##3}&@@@frameTicks[[2]]]]]]
> > Plot[Evaluate@plotExpr,{t,0,2},Frame->True,FrameLabel->{"t (s)","h
> > (m)",None,"h (ft)"}]
> > labelRightAxisTicks@%
> >
> > Also, I suspect a subtle error in my code because the tick marks are
> > not the size they should be (relative to the plot area).
> >
> >
> > --
> > http://chris.chiasson.name/
> >
>
>
> --
> http://chris.chiasson.name/
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: why DateListPlot is so slow?
  • Next by Date: Re: framed plots with two y axes scales
  • Previous by thread: framed plots with two y axes scales
  • Next by thread: Re: framed plots with two y axes scales