Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,812
1,100
The Land of Hope and Glory
This is probably the wrong forum but the people who read this one are the ones who are most likely to know the answer to this question.

I'm doing a little maths report for my own enjoyment and would like to include a few graphs. Now I have read some tutorials for including graphs using LaTeX but they seem to just be including an EPS file. Are there any pieces of software that you could recommend that can produce nice looking graphs that can save in EPS format so that I can include them in maths report?
 

Kendall015

macrumors regular
Sep 12, 2006
115
1
I don't have a specific answer to your question, but I personally have found LaTeX to be more trouble than it's worth. As a student, I usually have strict requirements in terms of formatting, and it has been a pain to make LaTeX documents that follow these requirements. If you're writing a thesis then it may make sense to use LaTeX, or if you include a lot of mathematical equations, but for use as an alternative for writing papers I don't think it's worth the trouble, especially with so many quality WYSIWYG alternatives like Pages, Word '08 (which is actually much improved), Mellel, and NeoOffice (which is decent).
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
I know Graphviz outputs to Postscript, but the output from the LaTex packages (like tkz-berge.sty) look better, in my opinion.

What LaTex graph package are you using now? In my thesis, I used LaTeX to draw the (complicated, 3D) commutative diagrams from homological algebra. That was 11 years ago. Apart from some trial and error it wasn't too difficult IIRC, and the situation has almost surely improved immeasurably since then.

If you haven't done so already, check out the LaTeX Graphics Companion.
 

Berlepsch

macrumors 6502
Oct 22, 2007
303
48
Crom,

you should have a look at pdflatex, which, I believe, is part of any standard latex installation nowadays. It creates PDF files directly from *.tex, and included graphics can be in PDF format, which is of course very handy on the Mac. Just have a look at the documentation, in combination with the pdftex package it's quite a powerful tool.
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
Crom,

you should have a look at pdflatex, which, I believe, is part of any standard latex installation nowadays. It creates PDF files directly from *.tex, and included graphics can be in PDF format, which is of course very handy on the Mac. Just have a look at the documentation, in combination with the pdftex package it's quite a powerful tool.

I believe he's looking for something to visually construct the graphs in (rather marking them up in LaTeX) and then import that into his LaTex files.
 

chem

macrumors regular
Jun 9, 2007
184
0
I'm doing a little maths report for my own enjoyment and would like to include a few graphs. Now I have read some tutorials for including graphs using LaTeX but they seem to just be including an EPS file. Are there any pieces of software that you could recommend that can produce nice looking graphs that can save in EPS format so that I can include them in maths report?

Yes. The exact program you want is called xmgrace. It's a 2D graphing program for X11/GNU Linux that runs fine under OS X. I link to it and discuss its installation under macports at this blog entry: http://yocto.wordpress.com/2008/02/27/personal-installation-of-os-x-1052/

I also discuss installation of TeXLive and PyX, another graphing program that uses LaTeX markup.
 

telecomm

macrumors 65816
Nov 30, 2003
1,387
28
Rome
Hmmm... is there any reason you can't use, say, Pages or Excel to produce your graph? Why not use one of these programs (or whatever you like), then save an image of the graph, say, a jpg.

use the graphicx package (part of the usual default installation), and then use something like...
\begin{figure}[h]\begin{center}
\includegraphics[scale=0.[COLOR="red"]whatever[/COLOR]]{filename.ext}
\end{center}\end{figure}

Edit: The easiest thing to do might be to create your graph in whichever program you like, then save it as a PDF (one of the file types you could then use with the \includegraphics command).
 

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,812
1,100
The Land of Hope and Glory
Thanks for the help guys, some good information. I'll take a look at the suggestions. I'm not sure I need the power that some of these packages offer though, graphviz looks very good but it does seem to be a bit overkill for making graphs modelling population growth.
 

phjo

macrumors regular
Jan 8, 2008
149
1
The tricky part about graph inclusion in latex is that there are two tex/latex engines in a standard distribution. The first one does

.tex->.dvi and additional tools transform the .dvi into .ps or .pdf (with Texshop : this is the TeX+Ghostscript route,

or directly

.tex->.pdf with pdfTeX.

It is quite simple to include graphs with either of them BUT :
- with the first engine : you will only be able to include postscript files
- with the second : you can include .png, .jpg, .pdf (and maybe others) but not postscript...

all this with the same commands such as

\includegraphics[width=8cm]{myGraph.(png,jpg,pdf)}

Now, for simple things, you might want to use the tex/latex engine to draw itself a graph instead of importing one, but you probably don't want to do it by hand (you could get the better output doing that, such as mixing graph and formulas or variable with the same fonts than the rest, but again, for simple things) : the packages epic, eepic from latex allows one to do that.

I suggest to have a look at jPicEdt for that (java multiplatform)

Of course, the venerable xfig, running over x11 could be of some use as well. I remember outputing graphs with Maple as postscript without legends, and adding those with xfig using some mixed eps+tex(epic) mode...

As for graphs of curves and whatever, why not Apple's Grapher ? It can do pdf and eps...

phjo
 

yeroen

macrumors 6502a
Mar 8, 2007
944
2
Cambridge, MA
Do you mean graphs as in 'the graph of a function y=f(x)' or are you talking about graphs in the sense of discrete mathematics?
 

telecomm

macrumors 65816
Nov 30, 2003
1,387
28
Rome
Do you mean graphs as in 'the graph of a function y=f(x)' or are you talking about graphs in the sense of discrete mathematics?

If it's the former, I'd also suggest Grapher (in the Utilities folder), though it'd be nice if they worked some of the bugs out...
 

pooky

macrumors 6502
Jun 2, 2003
356
1
R is mostly a statistical program, but also produces pretty decent graphics. Not sure if it does .eps natively, but there is probably an extension somewhere. It will natively output to pdf and postscript.
 

Monkaaay

macrumors 6502
Jun 19, 2006
258
0
Richmond, VA
I'm not sure about the eps format, but recently I've been using the open source library from Google to make graphs. I would suggest giving it a look to see if it would work in your situation.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
Hmmm... is there any reason you can't use, say, Pages or Excel to produce your graph? Why not use one of these programs (or whatever you like), then save an image of the graph, say, a jpg.

use the graphicx package (part of the usual default installation), and then use something like...
\begin{figure}[h]\begin{center}
\includegraphics[scale=0.[COLOR="red"]whatever[/COLOR]]{filename.ext}
\end{center}\end{figure}

Edit: The easiest thing to do might be to create your graph in whichever program you like, then save it as a PDF (one of the file types you could then use with the \includegraphics command).

That sounds like the most sensible thing to do. You can use \caption for a caption too.
 

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,812
1,100
The Land of Hope and Glory
That sounds like the most sensible thing to do. You can use \caption for a caption too.

That solution is a good one except for a few reasons:
  • I don't have Excel
  • Numbers or Pages do not have the required graphing capabilities
  • Images do not scale where as postscript files do

Good to know that I can include images so easily though.
 

eharley

macrumors newbie
Dec 27, 2007
20
16
...only if by 'graph' the OP meant 'flowchart' :D

No, I mean any sort of graph. OmniGraffle makes it super easy to draw vertices, connect them with edges (directed or undirected), and manipulate the layout of the vertices while still maintaining connectivity (ie. you don't have to go back in and redraw the edges).

It exports fantastic PDFs which are dead simple to import into LaTeX documents using pdftex the graphicsx package.

Graphviz is great but it's a pain in the butt to manipulate the location of your vertices. OmniGraffle includes the automatic layout routines that Graphviz includes, plus OmniGraffle can import DOT files.
 

eharley

macrumors newbie
Dec 27, 2007
20
16
Oh, did the OP want graphs in the sense of "graph theory"? I always do these using the xy package.

He said
Discrete maths.

But he also said
Thanks for the help guys, some good information. I'll take a look at the suggestions. I'm not sure I need the power that some of these packages offer though, graphviz looks very good but it does seem to be a bit overkill for making graphs modelling population growth.

So who knows.
 

MisterMe

macrumors G4
Jul 17, 2002
10,709
69
USA
...

I'm doing a little maths report for my own enjoyment and would like to include a few graphs. Now I have read some tutorials for including graphs using LaTeX but they seem to just be including an EPS file. Are there any pieces of software that you could recommend that can produce nice looking graphs that can save in EPS format so that I can include them in maths report?
I am not sure that you want to do this on a lark. To do everything with expected level of quality, you will have to spend some money. First, you will need a quality charting application. I love KaleidaGraph. I can also recommend DeltaGraph. It is actually difficult to make a graph in Igor Pro that is less than textbook quality. Grapher can save to PDF and EPSF. However, the graph and not the graphics format is the thing. By this standard, Grapher is not only not in the same league, it does not play the same game.

Print directly to PDF from any of your graphing applications. Or print to PostScript and use Adobe Distiller to generate your PDF. Alternatively, you can convert your PostScript file to EPSF. PDF seems to have largely eclipsed EPSF as the preferred high-quality vector graphics format on the Mac. I believe that Adobe Illustrator is the last commercial graphics editor to support EPSF.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.