Re: White border in plots(2)
- To: mathgroup at smc.vnet.net
- Subject: [mg35453] Re: White border in plots(2)
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sat, 13 Jul 2002 03:48:27 -0400 (EDT)
- References: <agjjac$259$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I notice that my earlier suggestion using PlotRange, also posted by Paul Hinton, still shows a border at high magnifications (see Example1, I have set Background ->Hue[0], that is Red to show this up) . It seems that this can be avoided by additionaly using the option PlotRegion (see Example 2), which Harmut was trying. The use of PlotRange prevents plot range from expanding to fit in ticks. The use of PlotRegion clips the display so as to avoid showing the mysterious background border ( the same effect can be obtained using the cell option ImageRegion). Example1 . t= Table[Sin[(x + y)], {x, 0, 100}, {y, 0, 100}]; Export["test.tif", ListDensityPlot[t, Frame -> False, Mesh -> False, PlotRange -> {{0, 100}, {0, 100}, Automatic}, ImageSize -> {100, 100}, Background ->Hue[0] ] ]; Example2. t = Table[Sin[(x + y)], {x, 0, 100}, {y, 0, 100}]; Export["test.tif", ListDensityPlot[t, Frame -> False, Mesh -> False, PlotRange -> {{0, 100}, {0, 100}, Automatic}, ImageSize -> {100, 100}, Background -> Hue[0], PlotRegion->{{-0.001, 1.001}, {-0.001, 1.001}}] ] Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565 "Thomas Manz" <thomas.manz at physik.uni-regensburg.de> wrote in message news:agjjac$259$1 at smc.vnet.net... > Hello! > > I want to calculate some patterns but I always get artifacts. The reason > seems to be the white border around the plots. If I calculate 100 x 100 points > and plot or export them (see example below), the picture is really 100 x 100 > pixels but with a white border. So my calculations are 'squeezed' (some lines > and rows are missing!). > Does anyone have an idea how to get rid of this white border or will I > really have to export my tables to a textfile and use another software zu produce > a bitmap-file?? > > > Example: > t = Table[Sin[(x + y)], {x, 0, 100}, {y, 0, 100}]; > Export["test.tif", > ListDensityPlot[t, Frame -> False, Mesh -> False, ImageSize -> {100, > 100}]] > > Thanks a lot for your help! > > Best regards > Thomas Manz > > >