RE: Something strange with Show.
- To: mathgroup at smc.vnet.net
- Subject: [mg40971] RE: [mg40952] Something strange with Show.
- From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
- Date: Sat, 26 Apr 2003 03:25:04 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
>-----Original Message----- >From: Stepan Yakovenko [mailto:yakovenko at ngs.ru] To: mathgroup at smc.vnet.net >Sent: Friday, April 25, 2003 2:05 PM >To: mathgroup at smc.vnet.net >Subject: [mg40971] [mg40952] Something strange with Show. > > >HI! > > I want to get two graphics objects combined. DensityPlot and a > Circle. > >\!\(dp = DensityPlot[ > Exp[\(-x\^2\) - y\^2], {x, \(-10\), 10}, {y, \(-10\), 10}, > Mesh \[Rule] False, PlotPoints \[Rule] 180, PlotRange >\[Rule] {0, 1}]\) > > it works. > > But this doesn't work as expected, evalute to take a look: > > Show[dp, Graphics[{Circle[{0, 0}, {1, 1}], RGBColor[1, 1, 1]}]] > > Why is it so prolated ? > > >-- >Best regards, > Stepan mailto:yakovenko at ngs.ru > > Stepan, this will do it: In[126]:= Show[dp, Graphics[{RGBColor[1, 0, 0], Circle[{0, 0}, {1, 1}]}], PlotRange -> All] What had happend? If you combine in Show a SurfaceGraphics with other Graphics elements, the SurfaceGraphics will be converted to Graphics first. Now what happens with the options? In[125]:= Options[Graphics[dp]] Out[125]= {PlotRange -> {0, 1}, AspectRatio -> 1, DisplayFunction -> (Display[$Display, #1] &), ColorOutput -> Automatic, Axes -> False, AxesOrigin -> Automatic, PlotLabel -> None, AxesLabel -> None, Ticks -> Automatic, Prolog -> {}, Epilog -> {}, AxesStyle -> Automatic, Background -> Automatic, DefaultColor -> Automatic, DefaultFont -> {"Courier", 10.}, RotateLabel -> True, Frame -> True, FrameStyle -> Automatic, FrameTicks -> Automatic, FrameLabel -> None, PlotRegion -> Automatic, ImageSize -> Automatic, TextStyle -> {}, FormatType -> StandardForm} As you see PlotRange has been transferred too. But at SurfaceGraphics it had meant to be the Range of "z-values", here the SurfaceGraphics is converted to Raster and PlotRange -> {0, 1} now is interpreted as to restrict the display of the first component of the array in Raster (which turns out to be the "y-coordinate". Hence... As you see, I also corrected the color specification (it must appear before the Graphics primitives). -- Hartmut Wolf