SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: crwe c. <cr...@po...> - 2010年12月29日 00:14:55
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!
From: Christopher B. <Chr...@no...> - 2010年12月29日 00:37:58
On 12/28/10 4:14 PM, crwe crwe wrote:
> 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
-- 
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
Chr...@no...
From: crwe c. <cr...@po...> - 2010年12月29日 02:32:25
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.
From: Jae-Joon L. <lee...@gm...> - 2010年12月29日 02:35:03
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 <cr...@po...> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: crwe c. <cr...@po...> - 2010年12月29日 03:46:58
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 :-)
> ------------ Původní zpráva ------------
> Od: Jae-Joon Lee <lee...@gm...>
> 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 <cr...@po...> 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
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> 
> 
> 
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /