Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Combining Plot and primitives: axes disappears' topicStudent Support Forum > General > "Combining Plot and primitives: axes disappears"

Next Comment >Help | Reply To Topic
Author Comment/Response
Dmitry
07/23/12 08:15am

Let
p = Plot[# x & /@ Range[5], {x, 0, 1},Frame -> True];
g = Graphics[
Text[Style[#,Red,Bold], {1.02, #}] & /@ Range[5]
];

Assume that I want to combine p and g using function Show. At that, I want the the text (represented by Graphics g) to be outside the frame of Plot p.

The result of Show[p, g, PlotRange -> All] is seen on the attached image: red text is inside the frame.
The result of Show[g, p, PlotRange -> All] is even worse: the plot's frame is not displayed at all.

Can anyone explain:
(1) why in the second case the frame disappears?
(2) how to combine Plot and graphics primitives such that the primitives are displayed outside the frame (GraphicsRow is not a solution because it does not allow to control mutual coordinates of primitives in different graphics)

Attachment: Untitled.png, URL: ,

Subject (listing for 'Combining Plot and primitives: axes disappears')
Author Date Posted
Combining Plot and primitives: axes disappears Dmitry 07/23/12 08:15am
Re: Combining Plot and primitives: axes disappe... yehuda ben-s... 07/23/12 1:25pm
Re: Re: Combining Plot and primitives: axes dis... Dmitry 07/24/12 02:26am
Re: Re: Re: Combining Plot and primitives: axes... Michael 07/24/12 2:06pm
Next Comment >Help | Reply To Topic