Importing eps/pdf created by matplotlib with tex text

Post questions on how to use or achieve an effect in Inkscape.
andankert
Posts: 2
Joined: Thu Mar 15, 2012 10:50 pm

Importing eps/pdf created by matplotlib with tex text

Postby andankert » Thu Mar 15, 2012 11:06 pm

Hi,

I created some figures with Matplotlib, where most text is edited with the latex backend. The finished files look exactly how they are supposed to look. But when I import either eps or pdf, inkscape screws up with the text. The preview is still okay, but no matter if I use closest font or not, the document font is wrong, and the worst: the character spacing is off, not to say like random. Most spacings are okay, but for example letters next to a 'V' seem to collide with the V.
It's completely screwed and now I'm stuck, because I cannot continue with my figures as I wanted.
Does anyone know a solution for this problem? As a workaround: Can I import the text aas path OR save it as path directly from matplotlib? Why can I only import text as text in the import field?

Thanks for any help!

André

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Importing eps/pdf created by matplotlib with tex text

Postby brynn » Fri Mar 16, 2012 1:20 pm

Image
Welcome Andre!

I'm not very familiar with EPS. I do see that importing a PDF only offers "text as text". I know when I've tried importing other image file formats, some of them offer the option to import text as paths. And that probably would solve your problem. But I don't have an EPS file to test with.

I think it probably would solve the problem if you can either import the text as paths, or have the text already as paths when you import. Also, I don't know if this would work, but Inkscape can open some PDF files. I don't know about EPS. But you could try File menu > Open on both of them. If they can't be opened, Inkscape will automatically import. But if they can be opened directly, I'm guessing the text will be ok.

Although.....if you did not originally create those files on the same computer you're using with Inkscape, and the computer you're using for Inkscape doesn't have that font, it probably will still substitute a font. You might try identifying that font, and if possible, install it on this computer.

Also you could search the forum. I have seen this same question asked....well, within the last couple of years. I'm sorry I can't say for sure, but I do remember it. Maybe text to paths, before import, will be the simplest solution?

andankert
Posts: 2
Joined: Thu Mar 15, 2012 10:50 pm

Re: Importing eps/pdf created by matplotlib with tex text

Postby andankert » Thu Mar 22, 2012 8:10 pm

Hi,

okay, I'm a little bit annoyed right now (not by you guys or inkscape, but in general):
-make the graphs with matplotlib, works great, looks excellent; export as pdf or eps no problem
-make my figures with inkscape, works great, looks brilliant, but my graph import screws up the text (axis and other stuff)
-import of graphs in libreoffice works as it should (!!!), nothing changes,
BUT:
-inkscape-svg-import in libre doesn't work, have to save as eps additionally
-and I can't edit anything, no figures, no graphs, not even small adjustments (this is so perfect in inkscape)

Murphy strikes again, heh? Why can't the import work, it would just be too easy. I can't find (and honestly, I don't want to) how to save the graphs incl. text as path; thats why I use eps/pdf, to have text as text! Didn't anyone used to have a similar problem?
I'm really desperate, I don't want to use 3 different programs and save figures in 2 different file types just to produce one final picture! Is this asked too much?

I'm very thankful for any help I get!!!
/André

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Importing eps/pdf created by matplotlib with tex text

Postby brynn » Fri Mar 23, 2012 6:02 am

I have seen other messages posted about both matplotlib and textext with Inkscape. I don't remember the various issues, but if you haven't already, you could search the forum, and maybe pick up a tip. Or hopefully someone more knowledgeable will reply.


Return to “Help with using Inkscape”