Tips/Figures

Version 5 (modified by mwr, 5 years ago)

Clarifying epstopdf procedure for AutoCAD

Back to Tips Index

What Graphics Formats Can I Use? Which Are Recommended?

There are two main categories of graphics formats:  vector formats and  raster formats. Examples of vector formats include  DXF,  EPS, and  PDF. Examples of raster formats include  BMP,  GIF,  JPG,  PNG,  TIFF, and sometimes  EPS. Raster formats are further divided by the type of compression they use:

  • No compression: BMP, TIFF
  • Lossless compression: GIF, PNG, TIFF
  • Lossy compression: JPG

For data-driven charts and other mathematically-generated graphs, vector formats are preferred. For other computer-generated figures such as screenshots, lossless compressed raster formats are preferred. For digital photos, lossy compressed raster formats are acceptable, but if the image has to be edited several times, it's best to save in a lossless format until the final version.

The LaTeX 2e style used here is designed for direct PDF output via pdflatex. pdflatex reads graphics in JPG, PNG, and PDF formats. Notably absent from the list of formats is EPS, but EPS graphics can be easily converted to PDF on any system with pdflatex available.

How Do I Export a Graph from AutoCAD?

CADTutor has  a tutorial for exporting EPS graphics from AutoCAD 2000 and later. Once you've exported the EPS file, you can convert it to a PDF on any system with LaTeX installed by pulling up a command prompt (Start / Programs / Accessories / Command Prompt) typing:

epstopdf "x:\path to directory\filename.eps"

where "x:\path to directory\filename.eps" is the full path to the EPS file you exported. The resulting PDF will be stored in "x:\path to directory\filename.pdf".

How Do I Export a Graph from Kaleidagraph?

TBD

How Do I Export a Graph from MATLAB?

For normal figure windows, MATLAB's PDF export is a bit lacking. It exports a PDF, but places the figure onto a full-size sheet with a large empty border surrounding it. Its EPS export is more directly usable, and lacks the empty border. But since the current thesis style doesn't support EPS, we need to create more usable PDF files. One way to create those is with Mike Renfro's pdfprint.m, which should work on any Windows or Unix system with MATLAB and LaTeX installed. Normal usage to print the contents of Figure 1 is of two types:

figure(1)
pdfprint % prints to Figure1.pdf

or

figure(1)
pdfprint stress-strain.pdf % prints to stress-strain.pdf

Attachments