edit EPS

Hello,

I need your help! I have an image, saved in .eps (vector) format.

Now the image is just a couple of plots with a legend, saved in colour, but without special tick marks to differentiate the plots. What I need to do now is *add the tick marks*. A diamond to one plot, a little cross for another etc. The original data that produced the plots is gone, I only have the .eps to work with.

I tried editing the image with PIL, but as soon as I load the image it becomes rasterized (=a small matrix of pixels, unusably ugly).

Is there any way to edit the EPS in matplotlib? Or maybe some other, easier way to add the plot marks ex post? I am no expert on vector graphic formats.

I'm using py2.5 w/ matplotlib 1.0.0, but can install any other soft if necessary.

Many thanks!

I need your help! I have an image, saved in .eps (vector) format.

Now the image is just a couple of plots with a legend, saved in colour, but without special tick marks to differentiate the plots. What I need to do now is *add the tick marks*. A diamond to one plot, a little cross for another etc. The original data that produced the plots is gone, I only have the .eps to work with.

darn!

I tried editing the image with PIL, but as soon as I load the image it becomes rasterized (=a small matrix of pixels, unusably ugly).

right, PIL is a raster tool. There is some hope that you could have PIL rasterize it with much higher resolution for better quality, but it's really not what you are looking for.

Is there any way to edit the EPS in matplotlib?

no -- that is not at all what MPL is about.

Or maybe some other, easier way to add the plot marks ex post? I am no expert on vector graphic formats.

I'd use a vector graphics program. EPS is almost the same as Adobe Illustrator's format, for instance.

InkScape is a really nice cross platform open source vector graphics tool. It's native format is SVG. I'll bet you could find a way to convert the EPS to svg, or, if you're lucky, InkScape can read EPS.

The nice thing about SVG is that being XML, you may be able to manipulate it directly with a python script or something, if you have many similar plots to do, so you don't have to point and click on each one.

Inkscape can be used as a command line SVG renderer, too.

Good luck!

-Chris

···

On 12/28/10 4:14 PM, crwe crwe wrote:

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Thanks a lot Chris!

I converted the EPS to SVG with InkScape like you suggested. It looks like it might be possible to hack out the original data from the resulting text file. That means I wouldn't have to edit anything, but rather just re-plot (using matplotlib :-).

> Is there any way to edit the EPS in matplotlib?

no -- that is not at all what MPL is about.

Out of curiousity (I know nothing of how EPS works internally)---why is this a problem? I mean, MPL can output plots to EPS, but cannot add more plots to an existing EPS? Sounds strange.

Anyway, thanks again for the prompt reply, it helped a lot.

I would try to recover the data from the plot. I often use g3data but
there should other tools.

http://www.frantz.fi/software/g3data.php

IHTH,

-JJ

···

On Wed, Dec 29, 2010 at 9:14 AM, crwe crwe <crwe@...2525...> wrote:

Hello,

I need your help! I have an image, saved in .eps (vector) format.

Now the image is just a couple of plots with a legend, saved in colour, but without special tick marks to differentiate the plots. What I need to do now is *add the tick marks*. A diamond to one plot, a little cross for another etc. The original data that produced the plots is gone, I only have the .eps to work with.

I tried editing the image with PIL, but as soon as I load the image it becomes rasterized (=a small matrix of pixels, unusably ugly).

Is there any way to edit the EPS in matplotlib? Or maybe some other, easier way to add the plot marks ex post? I am no expert on vector graphic formats.

I'm using py2.5 w/ matplotlib 1.0.0, but can install any other soft if necessary.

Many thanks!

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Thanks Jae-Joon, but my case was so simple that a direct copy&paste from SVG worked as well.

The only trick was recovering the original scale (the SVG plot path is stored in different coordinates), but that was easy too, after reading off positions of the axis scaling ticks from the SVG.

In fact, it was so simple I feel embarrassed to have asked here... but we live and learn, I guess :slight_smile:

···

------------ Původní zpráva ------------
Od: Jae-Joon Lee <lee.j.joon@...287...>
Předmět: Re: [Matplotlib-users] edit EPS
Datum: 29.12.2010 03:41:39
----------------------------------------
I would try to recover the data from the plot. I often use g3data but
there should other tools.

http://www.frantz.fi/software/g3data.php

IHTH,

-JJ

On Wed, Dec 29, 2010 at 9:14 AM, crwe crwe <crwe@...2525...> wrote:
> Hello,
>
> I need your help! I have an image, saved in .eps (vector) format.
>
> Now the image is just a couple of plots with a legend, saved in colour, but
without special tick marks to differentiate the plots. What I need to do now is
*add the tick marks*. A diamond to one plot, a little cross for another etc. The
original data that produced the plots is gone, I only have the .eps to work
with.
>
> I tried editing the image with PIL, but as soon as I load the image it becomes
rasterized (=a small matrix of pixels, unusably ugly).
>
> Is there any way to edit the EPS in matplotlib? Or maybe some other, easier
way to add the plot marks ex post? I am no expert on vector graphic formats.
>
> I'm using py2.5 w/ matplotlib 1.0.0, but can install any other soft if
necessary.
>
> Many thanks!
>
>
>
------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> matplotlib-users List Signup and Options
>