Graphics, Figures & TablesThe best way to include pictures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gates
Posts: 3
Joined: Wed Dec 03, 2008 11:22 pm

The best way to include pictures

Post by gates »

Hello

I was wondering if anyone can just suggest the best and most spreaded way to include pictures.

Right now i'm using pic2e pacage and in body section i'm using usual picture environment commands. But its quite pain to draw in it, and it does not allow to convert those pictures to pdf (dvipdfm) (is there any simple solution?).

So, any suggestions? What is out there?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

The best way to include pictures

Post by phi »

There are some vector graphics packages like PSTricks and PGF/TikZ that provide powerful drawing commands embedded in LaTeX documents. Furthermore, there are a lot of good external vector graphics programs like MetaPost and Asymptote, which consist of a separate programming language and a compiler to build PDF, PNG or EPS files. There is never "the best" way, you have to choose which solution addresses your requirements. Asymptote is by far the most powerful of these programs, but for simple drawings that don't require extensive calculations, TikZ is a bit easier and much better documented. Here are some galleries that show the possibilities:
http://asymptote.sourceforge.net/gallery/
http://tug.org/PSTricks/main.cgi?file=examples
http://www.texample.net/tikz/examples/
Here is a comparison:
http://www.tug.org/pracjourn/2007-1/beccari/beccari.pdf
PGScooter
Posts: 31
Joined: Mon Jul 14, 2008 2:47 pm

Re: pictures

Post by PGScooter »

What is the advantage of using a package such as PSTricks over making the graphs in, say Illustrator and importing them as an eps? Is there reduced size or do you simply have more control over everything?

thanks
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

The best way to include pictures

Post by localghost »

PGScooter wrote:What is the advantage of using a package such as PSTricks over making the graphs in, say Illustrator and importing them as an eps? Is there reduced size or do you simply have more control over everything? [...]
For me it is the consistency in the look of the document. I'm not a purist, but it is very easy to see whether graphics are done with external or internal means. This concerns especially text. With pgf/tikZ or pstricks you insert text with exactly the same typeface into your figures. And in my opinion there is much better control over the graphics elements. I don't need to open an external program to do corrections.


Best regards
Thorsten¹
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: pictures

Post by phi »

The fonts, line widths etc. match those of the document. This is quite important, and is often neglected. Furthermore, programs like Metapost and Asymptote offer complete programming language, which provides great flexibility. This is sometimes needed, especially for technical drawings.
PGScooter
Posts: 31
Joined: Mon Jul 14, 2008 2:47 pm

Re: pictures

Post by PGScooter »

sorry for the late reply, I just remembered about this post.

Thank you, localghost and phi for the explanations.

I now understand why it is important. I hadn't realized the consistency aspect of it.

thanks
Post Reply