Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Making pretty diagrams for LaTeX docs

  1. Oct 3, 2007 #1
    Hey guys,

    So I've Latex'd some papers and assignments in the past, but something that's always daunted me is how to make those snazzy custom figures that the TAs always make in their homework solution writeups. Is there some program that most people use to make their diagrams that they then convert into .eps format then stick it into their Latex docs?

  2. jcsd
  3. Oct 3, 2007 #2

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    gnuplot makes some very nice output you can include in your .tex files. You use the gnuplot set terminal command to make gnuplot send the output to a file rather than the screen. Some options:

    set terminal latex - good for fairly simple graphs
    set terminal pstricks - beautiful graphs, but a bit challenging to use in conjunction with pdflatex as opposed to vanilla latex/dvips.

    there are many other output "devices". Use help set term in gnuplot to see them all.
  4. Oct 3, 2007 #3
    Many graphics programs (Photoshop, etc.) allow you to save your work in an .eps file. There are also specialized programs that convert between different graphics formats.

  5. Oct 3, 2007 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    xfig is a drawing program that can output in LaTeX-graphics and .eps
    another is jpicedt

    gnuplot, asymptote, Maple, and Mathematica can output graphics in .eps

    generally, one should use vector graphics (rather than raster graphics like "jpg", "gif", "png")
    but use can import graphics of many types using includegraphics

    if you want pure-LaTeX, learn how to use the picture environment,
    possibly supplemented with eepic or pstricks.
  6. Oct 3, 2007 #5

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    The latex and pstricks output from gnuplot are "pure LaTeX". This is my preferred route for generating data plots in LaTeX. I play with the plots in gnuplot until they look nice on the screen, then set the terminal to pstricks.
  7. Oct 3, 2007 #6
    Thanks for all of the tips! I'm definitely going to spend some time this weekend playing around with some of the programs suggested.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook