Drawing figures for LaTeX

For the discussion of the sciences. Physics problems, chemistry equations, biology weirdness, it all goes here.

Moderators: gmalivuk, Moderators General, Prelates

Drawing figures for LaTeX

Postby Stev » Sun Dec 04, 2011 10:50 pm UTC

Hi guys,

I'm using LaTeX and it happens that I need to draw some figures.
I've been unable to find a program that really suits me, so I would like to know which one(s) you use.

I'm actually using Ipe, and I find it's quite good but It seems a bit immature and it's missing a couple of handy features
like snapping an enpoint of an object, say a line, to another, so when you move the second the endpoint follows.
On the other side i like how you can snap things to almost everything (also angular snapping!) and the ability to insert latex code directly into the generated eps file.

I've also used tikz but I find unpratical to write code to generate a figure you could have done more easily and in less time with a graphical editor.

My first attempt was Dia but it's buggy and crash prone and embedding LaTeX expressions doesn't work well. A positive note is the large amount of symbols which I don't really need TBH.

This post doesn't come from a real need since I'm currently able to do what I need, also I know I could just code something I want into Ipe or write my own drawing program. I'm just looking to share opinions/suggestions :)
Stev
 
Posts: 27
Joined: Tue Jul 22, 2008 11:32 pm UTC

Re: Drawing figures for LaTeX

Postby thoughtfully » Mon Dec 05, 2011 12:10 am UTC

You might find this thread from the Coding forum helpful.
Image
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery
User avatar
thoughtfully
 
Posts: 1914
Joined: Thu Nov 01, 2007 12:25 am UTC
Location: Minneapolis, MN

Re: Drawing figures for LaTeX

Postby Proginoskes » Mon Dec 05, 2011 4:38 am UTC

PiCTeX is an old package which works great for line drawings, as well as putting TeX fonts into the images. It also prevents the problem that PDF(La)TeX has with images. The software is free (search for it at CTAN), but the manual isn't. The .tex code is commented enough to get you started; you can also pick up a copy of Alan Hoenig's TeX Unbound for further examples.

(TU also has other graphics and font solutions.)
User avatar
Proginoskes
 
Posts: 309
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

Re: Drawing figures for LaTeX

Postby SWGlassPit » Wed Dec 14, 2011 5:42 pm UTC

My program of choice is Xfig. It allows combinations of raster and vector graphics, and it allows LaTeX to render the text, so formulae can be used in figures.
Up in space is a laboratory the size of a football field zipping along at 7 km/s. It's my job to keep it safe.
Image
Erdös number: 5
User avatar
SWGlassPit
 
Posts: 312
Joined: Mon Feb 18, 2008 9:34 pm UTC
Location: Houston, TX

Re: Drawing figures for LaTeX

Postby Proginoskes » Thu Dec 15, 2011 6:54 am UTC

xfig is great if you have Unix/Linux. (It also has export to PiCTeX, if I recall correctly.) The OP might be a Windoze user, though.

P.S. Nice avatar ... Not! Gotcha, SWGlassPit!
User avatar
Proginoskes
 
Posts: 309
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

Re: Drawing figures for LaTeX

Postby Ulc » Thu Dec 15, 2011 1:29 pm UTC

I find that Inkscape (the newer version of xfig) is a lot more intuitive for drawing figures, and that it really works well.

Wonderful program really!
It is the mark of an educated mind to be able to entertain a thought without accepting it - Aristotle

A White Russian, shades and a bathrobe, what more can you want from life?
User avatar
Ulc
 
Posts: 1303
Joined: Sun Jun 21, 2009 8:05 pm UTC
Location: Copenhagen university

Re: Drawing figures for LaTeX

Postby ycc1988 » Sun Jun 24, 2012 3:35 pm UTC

I also use Inkscape. Making the "Render>LaTeX Formula" extension work in Windows was a bit of a hassle, but totally worth the effort. Specifically, I had to install Imagemagick and pstoedit and manually then copy the .dll files from the Imagemagick directory to the pstoedit one. Pretty easy once I actually managed to Google the damn instructions. I've also used xymatrix for simple drawings, however some academic journals will want you to submit all graphics as eps files, with all text+equations converted to paths.
ycc1988
 
Posts: 28
Joined: Fri Jun 22, 2012 5:13 am UTC

Re: Drawing figures for LaTeX

Postby eternauta3k » Mon Jun 25, 2012 7:08 pm UTC

Inkscape + TexText
VectorZero wrote:It takes a real man to impact his own radius

That's right, slash your emo-wrists and spill all your emo-globin
User avatar
eternauta3k
 
Posts: 423
Joined: Thu May 10, 2007 12:19 am UTC
Location: Buenos Aires, Argentina

Re: Drawing figures for LaTeX

Postby EvanED » Thu Jun 28, 2012 3:16 am UTC

I've used both Inkscape and PGF/Tikz. (I'm kind of surprised no one has mentioned that.) IMO, Tikz does a better job at most things but is... let's say not easy to use.
EvanED
 
Posts: 3766
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI

Re: Drawing figures for LaTeX

Postby MichiK » Fri Jul 06, 2012 12:14 am UTC

I like Inkscape, too. However, it has some nasty bugs and flaws, e.g. on my Debian machine, it crashes repreoducible whenever I use the "Color markers to match stroke" extension, what kind of sucks since I need that quite frequently. Anyway, converting the shape of the marker into a path and change the color of that path worked for me...

In addition to that, it (or mayve something else in the toolchain behind it) messes up things when dealing with raster graphics whose pixels are a lot larger than what would correspond to 90 dpi. They look fine in Inkscape and they look fine on paper when you embed them as EPS/PDF in a document and print that, but they are completely screwed up by interpolation when you view the PDF on the screen... very strange.

Until now I didn't know that it even speaks LaTeX (since I never needed formulae within a figure...) but I definitely have to try that out some time...
MichiK
 
Posts: 17
Joined: Thu Jan 17, 2008 9:34 pm UTC


Return to Science

Who is online

Users browsing this forum: doogly, FierceContinent, gmalivuk, HealCathePC and 9 guests