WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
0
|
8017 Views
|
4 Replies
|
2 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Mathematica
Graphics and Visualization
How can we export a graphic without the border?
David Keith
David Keith
Posted
11 years ago
I have been using Mathematica to generate test images. The images are designed to have a specific dimension and resolution. What I want is for the graphic as designed to be exactly exported as a tiff or jpeg conmpletely filling the designed-for size. Unfortunately, Mathematica wants to add a border to everything, so when the image is exported at the intended size, it includes this unwanted border, and the dimensions in pixels of the internal components have been altered.
Does anyone know how to eliminate this border? Note that just chopping it off does not work because including it in the export already re-rasterized the image, so the internal components have changed in unspecified ways.
Regards,
David
POSTED BY:
David Keith
Reply
|
Flag
4 Replies
Sort By:
Replies
Likes
Recent
1
Diego Zviovich
Diego Zviovich
Posted
11 years ago
David, what format are you trying to export?
data = RandomVariate[NormalDistribution[4, 0.5], 1000];
Histogram[data, Automatic, "Probability",
PlotLabel -> "Just an Example"]
Export["example.png", %]
has no border on my machine running MMA 9
POSTED BY:
Diego Zviovich
Reply
|
Flag
1
C ormullion
C ormullion, I belong to no organization.
Posted
11 years ago
Try adding
PlotRangePAdding -> 0
to your code.
POSTED BY:
C ormullion
Reply
|
Flag
0
David Keith
David Keith
Posted
11 years ago
Hi Diego,
My graphic is built explicitly of primities. It might be for example a filled rectange of a certan size. Here is a screen clip from it's appearance in the notebook when the graphic is selected. The largest extent of the defined graphic is the dark background, but it's grown a border.
When this is exported as a TIFF and then imported into Photoshop we get this. The gray is the Photoshop window background. The white border was exported by Mathematica as part of the image. It was added gratuitously and is unwanted.
POSTED BY:
David Keith
Reply
|
Flag
0
David Keith
David Keith
Posted
11 years ago
Yes -- That worked. Thanks very much!
POSTED BY:
David Keith
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback