RE: graphics question
- To: mathgroup@smc.vnet.net
- Subject: [mg12656] RE: graphics question
- From: "Allan Hayes" <hay@haystack.demon.cc.uk>
- Date: Sat, 30 May 1998 17:36:46 -0400
Jrgen Tischer wrote > Hi Allan, > that's strange. On my PC there is no clipping with my version, but your > version has no ticks nor numbers. It just shows the axes (black) and > the grid lines (blue). Nevertheless when I compare FullOptions[gr] with > FullGraphics[gr][[1,2]], it's quite obvious that your solution is by > far superior and has the ticks all right in it, it just wouldn't show > on my PC. Any idea? Jurgen, Thanks, I should have noticed this - I was looking at an example with a frame. But it has uncovered an interesting interplay between frames and axes. I give what seems to be a solution, but there may be something else lurking. I tried this out. gr2 = Plot[2*x^2 - 4, {x, -5, 5}, GridLines -> Automatic, Frame->True] FullGraphics does clip the frame tick labels Show[Graphics[FullGraphics[gr2][[1,2]]]] FullOptions is fine in this regard Show[Graphics[{}, FullOptions[gr2]]] But as you noticed, with gr = Plot[2*x^2 - 4, {x, -5, 5}, GridLines -> Automatic] FullOptions does not show the axes or the ticks (which as you observe are in the code) Show[Graphics[{}, FullOptions[gr]]] Now for the solution. We have FullOptions[gr, Frame] {False,False,False,False} but Options[gr, Frame] {Frame->False} Forcing the second one to be used produces code that works for both gr and gr2. Show[Graphics[{}, FullOptions[gr]], Options[gr,Frame] ] Show[Graphics[{}, FullOptions[gr2]], Options[gr2,Frame]] This problem/feature is a general one Plot[x^2, {x,-1,1}, Frame -> {False, False, False, False}] has neither axes nor ticks. Plot[x^2, {x,-1,1}, Frame -> False] has axes and ticks It seems that we are being protected against messy combinations of axes and frames! -----Original Message----- From: Allan Hayes <hay@haystack.demon.cc.uk> To: mathgroup@smc.vnet.net To: mathgroup@smc.vnet.net Subject: [mg12656] [mg12532] Re: graphics question >Jrgen Tischer wrote in message <6jpk27$535$9@dragonfly.wolfram.com>... >>Hi Tom, >> >>In[1]:= gr = Plot[2*x^2 - 4, {x, -5, 5}, GridLines -> Automatic] In[2]:= >>Show[Graphics[FullGraphics[gr][[1,2]]]] >> >>Jrgen >> >>-----Original Message----- >>From: Tom <toad@planet.eon.net> To: mathgroup@smc.vnet.net >To: mathgroup@smc.vnet.net >>Subject: [mg12656] [mg12532] [mg12414] graphics question >....... >> > > >Jurgen's solution clips the bottom frame tick numbers (at least for me). >The following variant avoids this by keeping full value of the >PlotRange option. > >gr = Plot[2*x^2 - 4, {x, -5, 5}, GridLines -> Automatic] > >Show[Graphics[{},FullOptions[gr]]] > >-- >Allan Hayes >Training and Consulting >Leicester UK >http://www.haystack.demon.co.uk >hay@haystack.demon.co.uk >voice: +44 (0)116 271 4198 >fax: +44(0)116 271 8642