You are not logged in.
Pages: 1
I have a little math talk at school and I need a tool to draw the graph of a function (in 2d). I'm a real newbie in plotting tools (and math xD).
It should embed easily in TeX-documents and be not too hard to learn., but that shouldn't be a difficulty because I really just need basic functionality.
I've looked a bit into matplotlib and it looks very promising, but there are a gazillion other tools/libraries out there to choose....
and I don't even know if I should prefer a language/library or a gui-app.
Do you have experience with plotting-tools? What would you recommend?
Sorry for my bad english
Offline
If you want to plot a function and get the result into LaTeX, you can't go wrong using R.
Just plot the function and then export the file as .eps will get a perfect result. Note though, R is not that straightforward, but if you use LaTeX, you won't be on unfamiliar ground, there are plenty of tutorials out there that will give you enough info to plot.
Offline
R looks pretty neat, I'll definitely look into that.
Python-based libraries would be good too, because I have a bit python experience, but i'll try R first.
Offline
you could also look into octave/gnuplot that's what I use. gnuplot exports to eps, so it's easy to include graphics in LaTeX docs. and there are several tutorials online that will show you how to do exactly what you need to do.
here's one that I like.
Hofstadter's Law:
It always takes longer than you expect, even when you take into account Hofstadter's Law.
Offline
forgot about octave as i use matlab... gnuplot I've never used try them all out though and use whatever suits you best
Offline
+1 for gnuplot
with epslatex terminal you even have all your text (labels, ticmarks,etc.) formatted in latex
Why use octave/R or whatever for making graphs, when you can use a tool which is specialized on the subject?
Last edited by cl10k (2010-03-18 21:21:41)
Offline
Heh, when reading the thread title I immediately assumed some sort of software for helping evil masterminds plan their overthrow of the world
Actually, maybe that's what all of that "graphing" software does, I've never actually checked…
Offline
R looks pretty neat, I'll definitely look into that.
Python-based libraries would be good too, because I have a bit python experience, but i'll try R first.
Gnuplot is good as a stand-alone plotter which can also be integrated into scripts and other applications.
If you want something that you can use within Python, take a look at python-matplotlib (available in [community]). If you need 3D down the line, there's also python-enthought-mayavi in the AUR.
*edit*
Heh, when reading the thread title I immediately assumed some sort of software for helping evil masterminds plan their overthrow of the world
Actually, maybe that's what all of that "graphing" software does, I've never actually checked…
You're thinking of iPlot.
Last edited by Xyne (2010-03-19 00:10:00)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Offline
Heh, when reading the thread title I immediately assumed some sort of software for helping evil masterminds plan their overthrow of the world
Now, that's a piece of software I could really use.
Offline
If you want to plot with python, use matplotlib. A nice setup is to use the python shell ipython with the pylab option activated ($ipython -pylab).
Otherwise, R is also a good option.
Offline
I chose matplotlib, because I don't have to learn a new syntax, and the idea appeals to me to do "everything" with python.
It's quite nice and outputs pretty graphs.
I hasn't got that nice integration in TeX like gnuplot or metapost (does that do graphs, too?) but It can output almost any file format...
Offline
If you are looking to plot equations instead of data sets, you may want to look at wxmaxima. (Plus it makes using Laplace transforms almost pleasant)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
gnumeric works well
Offline
I only use Matlab, so I can't really suggest anything else, but Matlab is fantastic and it's more than enough for your needs.
It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)
Offline
Matlab is indeed awesome, and it's where I spend a fair amount of time at work, however, it is heavyweight and probably overkill, something like gnuplot, R or matplotlib, in addition to being free, are also easier to integrate with LaTeX, I've never quite managed to get satisfactory results from Matlab in LaTeX, even when exporting as EPS.
Offline
Is the R-Project in AUR? I can't seem to find it...
Offline
just do
pacman -S r
it's in the main repos.
Offline
Hm, but the eps format is not supported by pdflatex directly.
There is a gnuplot-luaterm in AUR that suppotts tikz, and ther are python-pyx (community) and pyxplot (a gnuplot-like program using python-pyx as lib).
Offline
Hm, but the eps format is not supported by pdflatex directly.
Yeah, but most plotting tools (at least matplotlib) support saving as pdf. It's not as common for graphics like eps but it works just as fine.
Offline
If one must use eps for dataplots epstopdf will convert them to pdfs. It should be possible to automate this process.
Either way, if you really just want to plot functions (only) the easiest and most elegant way of doing it, IMO, is PGF/TikZ. You just write whatever function you need and add the markup you need, e.g. grids or text. No need for external processes. If you need something more sophisticated than TikZ can handle internally you can call gnuplot from TikZ/TeX.
A function can be plotted by e.g.:
\draw[color=blue] plot (\x,{sin(\x r)}) node[right] {$f(x) = \sin x$};
For plotting data etc. I use R through Sweave. Using Sweave one can embed R code in (La)TeX documents. I usually use the pgfSweave package to get high quality plots. Another possibility is pgfplots.
I don't use exported graphics (eps/pdf) since it will not use the same fonts as the rest of the document. Resizing also becomes a mess.
--Rasmus
Last edited by Pank (2010-03-24 22:36:47)
Arch x64 on Thinkpad X200s/W530
Offline
Pages: 1