MathGroup Archive 2004

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

Search the Archive

Re: Why aboluteoptions doesn't work here?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49451] Re: [mg49424] Why aboluteoptions doesn't work here?
  • From: Ramesh Raju Mudunuri <rmudunuri at uh.edu>
  • Date: Tue, 20 Jul 2004 07:53:57 -0400 (EDT)
  • References: <200407191146.HAA09118@smc.vnet.net>
  • Reply-to: Ramesh Raju Mudunuri <rmudunuri at uh.edu>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
Show can be used to combine plots into a single
plot. In your case you don't need the last Show command to 
see ticks on all four axes. However if you want to change the 
length of the tickmarks in the final plot then you can use 
AbsoluteOptions and the rest as posted in some previous Mathgroup
postings (Please check them yourself). 

If you still want to use AbsoluteOptions as you have done in your last
Show command, you need to change 
FrameTicks->Ticks/.AbsoluteOptions[kk] 
to FrameTicks->FrameTicks/.AbsoluteOptions[kk]. Because you used 
Ticks instead of FrameTicks, ticks were absent in the final graph. 

The default tickmarks are too small and I usually use the following to make a
better bigger plot

Show[%, ImageSize -> 500, AspectRatio -> 3/4,
FrameTicks -> (FrameTicks /. AbsoluteOptions[%]) /. {{0.00625, 0.} -> {0.015, 0},
{0.00375, 0.} -> {0.009, 0}, 
x_?((FractionalPart[#] == 0.) &) -> IntegerPart[x]}]

You can change the length of the tickmarks by changing 0.015 and 0.009 to  
appropriate values in the above command. The last part of the above command 
makes sure that a decimal point does not appear after integers. 

p1 = Plot[x, {x, 0, 2}];
p2 = Plot[x + 1, {x, 0, 2}];
p3 = Plot[x + 2, {x, 0, 2}];
p4 = Plot[x + 3, {x, 0, 2}];
Show[p1, p2, p3, p4, Frame -> True];
Show[%, ImageSize -> 500, AspectRatio -> 3/4, 
TextStyle -> {FontFamily -> "Times", FontSize -> 15},
FrameTicks -> (FrameTicks /. AbsoluteOptions[%]) /. {{0.00625, 0.} -> {0.015, 0},
{0.00375, 0.} -> {0.009, 0}, 
x_?((FractionalPart[#] == 0.) &) -> IntegerPart[x]}];


Ramesh
  ----- Original Message ----- 
  From: Daohua Song 
To: mathgroup at smc.vnet.net
  To: mathgroup at smc.vnet.net 
  Sent: Monday, July 19, 2004 6:46 AM
  Subject: [mg49451] [mg49424] Why aboluteoptions doesn't work here?


  Dear Group,
        p1=Plot[x,{x,0,2}];
        p2=Plot[x+1,{x,0,2}];
        p3=Plot[x+2,{x,0,2}];
        p4=Plot[x+3,{x,0,2}];
        kk=Show[p1,p2,p3,p4,Frame?True];
        Show[kk,FrameTicks?(Ticks/.AbsoluteOptions[kk]),Frame?True];
        (*i wanna see ticks on all 4 axes*)

        You will get a graph without ticks! Why this happens after i use 
  "Show"?  How to fix it? (I have to use show to put complex graphs 
  together)
        Thanks
  Daohua


  • Prev by Date: nonparametric or robust regression code
  • Next by Date: Null??
  • Previous by thread: Why aboluteoptions doesn't work here?
  • Next by thread: RE: Why aboluteoptions doesn't work here?