You are not logged in.

#1 2010-03-18 16:43:17

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Plotting tools?

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 hmm

Offline

#2 2010-03-18 16:50:32

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Plotting tools?

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

#3 2010-03-18 17:03:06

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Re: Plotting tools?

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

#4 2010-03-18 17:20:31

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: Plotting tools?

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

#5 2010-03-18 18:38:10

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Plotting tools?

forgot about octave as i use matlab... gnuplot I've never used try them all out though and use whatever suits you best smile

Offline

#6 2010-03-18 21:19:59

cl10k
Member
From: Germany
Registered: 2008-12-24
Posts: 92

Re: Plotting tools?

+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

#7 2010-03-18 23:30:52

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Plotting tools?

Heh, when reading the thread title I immediately assumed some sort of software for helping evil masterminds plan their overthrow of the world tongue

Actually, maybe that's what all of that "graphing" software does, I've never actually checked…

Offline

#8 2010-03-19 00:08:43

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Plotting tools?

x0rg wrote:

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*

Barrucadu wrote:

Heh, when reading the thread title I immediately assumed some sort of software for helping evil masterminds plan their overthrow of the world tongue

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 StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#9 2010-03-19 01:09:50

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Plotting tools?

I have used gnuplot quite a bit and like it. This semester I am also using R which can also do plots. R can do a lot more than just plot. If you need to do any data manipulation pre plotting then R may be the way to go.

Offline

#10 2010-03-20 00:44:43

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Plotting tools?

Barrucadu wrote:

Heh, when reading the thread title I immediately assumed some sort of software for helping evil masterminds plan their overthrow of the world tongue

Now, that's a piece of software I could really use.

Offline

#11 2010-03-22 18:44:18

AlexS
Member
From: Munich, Germany
Registered: 2009-05-16
Posts: 114

Re: Plotting tools?

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

#12 2010-03-23 11:51:23

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Re: Plotting tools?

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

#13 2010-03-23 15:31:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: Plotting tools?

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

#14 2010-03-23 17:08:28

jstadler
Member
From: Canada
Registered: 2010-01-04
Posts: 47

Re: Plotting tools?

gnumeric works well

Offline

#15 2010-03-23 17:08:47

dcc24
Member
Registered: 2009-10-31
Posts: 732

Re: Plotting tools?

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)

My AUR packages

Offline

#16 2010-03-23 21:27:56

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Plotting tools?

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

#17 2010-03-24 09:05:16

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Plotting tools?

Is the R-Project in AUR? I can't seem to find it...

Offline

#18 2010-03-24 09:42:16

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Plotting tools?

just do

pacman -S r

it's in the main repos.

Offline

#19 2010-03-24 13:17:07

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Plotting tools?

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

#20 2010-03-24 17:01:17

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Re: Plotting tools?

Stefan Husmann wrote:

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

#21 2010-03-24 22:35:04

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: Plotting tools?

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

Board footer

Powered by FluxBB