Skip to main content
added 167 characters in body
Source Link
Szabolcs
  • 238.9k
  • 32
  • 653
  • 1.3k

##Exporting graphics with consistent font sizesA more detailed guide on this topic is included in the MaTeX documentation, in the "Preparing Figures to Size" tutorial.

Exporting graphics with consistent font sizes

##Exporting graphics with consistent font sizes

A more detailed guide on this topic is included in the MaTeX documentation, in the "Preparing Figures to Size" tutorial.

Exporting graphics with consistent font sizes

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

(Unfortunately Mathematica has trouble with scaling tick marks when rasterizing, so you may want to use an explicit tick specification if this is important.)

(Unfortunately Mathematica has trouble with scaling tick marks when rasterizing, so you may want to use an explicit tick specification if this is important.)

added 559 characters in body
Source Link
Szabolcs
  • 238.9k
  • 32
  • 653
  • 1.3k

I prefer to use consistent font sizes in figures. This means that I need to export PDF figures at the appropriatefinal print size and avoid scaling them within LaTeX. (Note that PDF files contain information about the physical print size of the document.)

 
g = ContourPlot3D[ x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) == 3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None, ContourStyle -> Directive[Orange, Opacity[0.8], Specularity[White, 30]], PlotPoints -> 30, MaxRecursion -> 5, BaseStyle -> {FontSize -> 10}] (* <-- specify text size in pointpoints here *) 

I increased the PlotPoints and MaxRecursion options, otherwise the raggedness of the surface will look a bit ragged when renderedbe noticeable at the high resolutionresolutions we will be using here.

I prefer to work in centimetres (and not printer's point, the default unit of Mathematica):

TurnLet's turn on the ruler (Window -> Show Ruler) and verify that the following is really 10 cm wide (you may also need to go to Edit -> Preferences and set the ruler units to centimetres):

Mathematica graphics

The same principles can be applied to 2D graphics that export well as vector data:

I prefer to use consistent font sizes in figures. This means that I need to export PDF figures at the appropriate size and avoid scaling them within LaTeX.

g = ContourPlot3D[ x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) == 3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None, ContourStyle -> Directive[Orange, Opacity[0.8], Specularity[White, 30]], PlotPoints -> 30, MaxRecursion -> 5, BaseStyle -> {FontSize -> 10}] (* <-- specify text size in point here *) 

I increased the PlotPoints and MaxRecursion options, otherwise the surface will look a bit ragged when rendered at high resolution.

I prefer to work in centimetres:

Turn on the ruler (Window -> Show Ruler) and verify that the following is really 10 cm wide (you may also need to go to Edit -> Preferences and set the ruler units to centimetres):

The same principles can be applied to 2D graphics that export well as vector:

I prefer to use consistent font sizes in figures. This means that I need to export PDF figures at the final print size and avoid scaling them within LaTeX. (Note that PDF files contain information about the physical print size of the document.)

 
g = ContourPlot3D[ x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) == 3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None, ContourStyle -> Directive[Orange, Opacity[0.8], Specularity[White, 30]], PlotPoints -> 30, MaxRecursion -> 5, BaseStyle -> {FontSize -> 10}] (* <-- specify text size in points here *) 

I increased the PlotPoints and MaxRecursion options, otherwise the raggedness of the surface will be noticeable at the high resolutions we will be using here.

I prefer to work in centimetres (and not printer's point, the default unit of Mathematica):

Let's turn on the ruler (Window -> Show Ruler) and verify that the following is really 10 cm wide (you may also need to go to Edit -> Preferences and set the ruler units to centimetres):

Mathematica graphics

The same principles can be applied to 2D graphics that export well as vector data:

added 60 characters in body
Source Link
Szabolcs
  • 238.9k
  • 32
  • 653
  • 1.3k
Loading
added 364 characters in body
Source Link
Szabolcs
  • 238.9k
  • 32
  • 653
  • 1.3k
Loading
Source Link
Szabolcs
  • 238.9k
  • 32
  • 653
  • 1.3k
Loading