Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: White border in plots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35429] RE: [mg35404] White border in plots
  • From: "David Park" <djmp at earthlink.net>
  • Date: Fri, 12 Jul 2002 04:28:45 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Thomas,

How about this?

t = Table[Sin[(x + y)], {x, 0, 100}, {y, 0, 100}];

plot1 = First[
      Graphics[ListDensityPlot[t, Mesh -> False,
          DisplayFunction -> Identity]]];

plot2 =
    Show[Graphics[plot1],
      AspectRatio -> Automatic,
      PlotRange -> {{-0.25, 101}, {0.25, 101}},
      ImageSize -> 500];

Try exporting plot2. ListDensityPlot doesn't allow you to adjust the
PlotRange directly. At least, it didn't work for me. By converting from
DensityGraphics to Graphics we can adjust the PlotRange to just meet the
edges of the grid. (The values I used seem a little strange, but that is
what seemed to work best. I made the image size larger to more easily see
what is happening.)

This can be done more directly with the DrawGraphics package.

Needs["DrawGraphics`DrawingMaster`"]

Draw2D[
    {ListDensityDraw[t, Mesh -> False]},
    AspectRatio -> Automatic,
    PlotRange -> {{-0.25, 101}, {0.25, 101}},
    ImageSize -> 500];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


> From: Thomas Manz [mailto:thomas.manz at physik.uni-regensburg.de]
To: mathgroup 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
>
>
>



  • Prev by Date: RE: arguments of the function
  • Next by Date: RE: Re: ColorFunction TriangularSurfacePlot
  • Previous by thread: Re: White border in plots
  • Next by thread: RE: White border in plots