Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Combining Plots' topicStudent Support Forum > General > "Combining Plots"

Help | Reply To Topic
Author Comment/Response
Kevin Osborn
10/25/99 07:46am

I want to combine plots (layer them), without changing thier display options. Show rescales and will only plot with one set of FrameTicks(see g1 below). Displaying them with Rectangle,Graphics, and Show does not refer to the frames, and therefore the frames are not aligned(See g2 below).

p1=Plot[Sin[x],{x,0,2Pi},Frame->True,Axes->False,
FrameTicks\[Rule]{{0,2 Pi},{-1,0,1},None,None}]

p2=Plot[2Cos[x],{x,0,2 Pi},Frame->True,Axes->False,
FrameTicks\[Rule]{None,None,None,{-2,0,2}}]

g1=Show[p1,p2]
g2=Show[Graphics[{Rectangle[{0, 0}, {1, 1}, p1],
Rectangle[{0, 0}, {1, 1}, p2]} ]]

URL: ,
Help | Reply To Topic