Yogeshwarsing Calleecharan | 6 May 2010 18:46
Picon
Favicon

resolution of a metapost graphic

Hi, I'm using Gunplot to create a figure in the metapost format, after 
whichI'm converting to eps via the command:

mpost --sprologues=3 -soutputtemplate=\"%j-%c.eps\" myfigu.mp

to get myfigu-0.eps.

I would like to know the resolution of such an eps file. How do I 
proceed? Is the eps thus created has a fixed resolution?

Thanks

Best Regards,
Y.calleecharan

--
http://tug.org/metapost/

Karel | 6 May 2010 20:22
Picon

Re: resolution of a metapost graphic

Yogeshwarsing Calleecharan napsal(a):
> Hi, I'm using Gunplot to create a figure in the metapost format, after 
> whichI'm converting to eps via the command:
> 
> mpost --sprologues=3 -soutputtemplate=\"%j-%c.eps\" myfigu.mp
> 
> to get myfigu-0.eps.
> 
> I would like to know the resolution of such an eps file. How do I 
> proceed? Is the eps thus created has a fixed resolution?
> 

Graphics produced by metapost is vector graphics, 
it means scalable and resolution independent.

All the best,
Karel Horak
--
http://tug.org/metapost/

Yogeshwarsing Calleecharan | 6 May 2010 19:30
Picon
Favicon

Re: resolution of a metapost graphic

Thanks a lot. I used ImageMagick and type identify -verbose myfigu.eps 
and got the following:

Image: myfigu-0.eps
   Format: PS (PostScript)
   Class: DirectClass
   Geometry: 418x217+0+0
   Resolution: 72x72
   Print size: 5.80556x3.01389
   Units: Undefined
   Type: Bilevel
   Base type: Bilevel
   Endianess: Undefined
   Colorspace: RGB
   Depth: 16/8-bit
   Channel depth:
   gray: 1-bit
   alpha: 8-bit

It states Resolution on the 5th line as 72 x 72. So, this is wrong 
information then?

Thanks a lot.

Best Reagrds,
Y.Calleecharan

On 5/6/2010 8:22 PM, Karel wrote:
> Yogeshwarsing Calleecharan napsal(a):
>> Hi, I'm using Gunplot to create a figure in the metapost format, after
(Continue reading)

Troy Henderson | 6 May 2010 19:39
Picon

Re: resolution of a metapost graphic

As Karel said, the EPS is a vector graphic so in a sense it has no
native "resolution" per se.  The graphic has a natural print size, but
can be scaled to any size you want without losing quality.  The
"resolution" that you are seeing is the resolution that you get when
you convert it from vector EPS to a raster format (such as PNG, JPG,
etc.).  ImageMagick works with raster graphics, so in order for it to
process an EPS, it must first rasterize it and thus choose a
resolution to use.

If you do

convert foo.eps foo.png

it uses (by default) 72 pixels per inch to convert the vector EPS to
raster PNG.  If this is not sufficient, you can try something like

convert -density 300 foo.eps foo.png

This will use 300 pixels per inch (as opposed to the default 72) for
the conversion, and your resulting PNG will have a larger geometry, a
larger filesize, and better quality.

Troy Henderson
--
http://tug.org/metapost/

Yogeshwarsing Calleecharan | 6 May 2010 19:45
Picon
Favicon

Re: resolution of a metapost graphic

Thanks a lot both Troy and Karel. Very interesting to learn today that 
eps is resolution independent :). I have to submit pictures to a journal 
and it's asking 300 dpi pictures. I thought that this specification 
applied to eps files also.

best regards,
Y.Calleecharan

On 5/6/2010 7:39 PM, Troy Henderson wrote:
> As Karel said, the EPS is a vector graphic so in a sense it has no
> native "resolution" per se.  The graphic has a natural print size, but
> can be scaled to any size you want without losing quality.  The
> "resolution" that you are seeing is the resolution that you get when
> you convert it from vector EPS to a raster format (such as PNG, JPG,
> etc.).  ImageMagick works with raster graphics, so in order for it to
> process an EPS, it must first rasterize it and thus choose a
> resolution to use.
>
> If you do
>
> convert foo.eps foo.png
>
> it uses (by default) 72 pixels per inch to convert the vector EPS to
> raster PNG.  If this is not sufficient, you can try something like
>
> convert -density 300 foo.eps foo.png
>
> This will use 300 pixels per inch (as opposed to the default 72) for
> the conversion, and your resulting PNG will have a larger geometry, a
> larger filesize, and better quality.
(Continue reading)

Martin Schröder | 6 May 2010 21:41
Picon

Re: resolution of a metapost graphic

2010/5/6 Yogeshwarsing Calleecharan <yogeshwarsing.calleecharan <at> ltu.se>:
> Thanks a lot both Troy and Karel. Very interesting to learn today that eps
> is resolution independent :). I have to submit pictures to a journal and

eps _can_ be resolution independent; the ones produced by MP are.

http://en.wikipedia.org/wiki/Encapsulated_PostScript
http://en.wikipedia.org/wiki/PostScript

Best
   Martin
--
http://tug.org/metapost/

Yogeshwarsing Calleecharan | 6 May 2010 23:21
Picon
Favicon

Re: resolution of a metapost graphic

Sorry for this slip of mine...yes it's gnuplot! What tweaking can I do 
in addition with gnuplot?

Thanks

Best Regards,
Y.Calleecharan

On 5/6/2010 10:10 PM, Hans Hagen wrote:
> On 6-5-2010 6:46, Yogeshwarsing Calleecharan wrote:
>> Hi, I'm using Gunplot to create a figure in the metapost format, after
>> whichI'm converting to eps via the command:
>
> i don't know gunplot but if you mean gnuplot, then keep in mind that
> although eps (mp) is vector based, gnuplot is producing rather dumnb
> output i.e. points connected by straight lines so you might want to
> tweak the output quality of gnuplot
>
> Hans
>
> -----------------------------------------------------------------
>                                             Hans Hagen | PRAGMA ADE
>                 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                                | www.pragma-pod.nl
> -----------------------------------------------------------------

--
http://tug.org/metapost/

(Continue reading)

Yogeshwarsing Calleecharan | 6 May 2010 23:26
Picon
Favicon

problems with memory in metapost

Hi, I'm using gnuplot to plot a graph to mp and then I'm converting it 
to eps via the command:

mpost --sprologues=3 -soutputtemplate=\"%j-%c.eps\" myfigu.mp

But I don't get the eps output; instead I get this message:

This is MetaPost, version 1.208 (kpathsea version 3.5.7dev) (mem=mpost 
2009.12.12)  6 MAY 2010 23:16
**myfigu.mp
(./myfigu.mp
! MetaPost capacity exceeded, sorry [main memory size=3000000].
_wc->withpen
             .currentpen.withcolor.currentcolor
gpdraw->...ptpath[(EXPR0)]_sms((EXPR1),(EXPR2))_wc

.else:_ac.contour.ptpath[(...
l.48052 gpdraw(0,517.1a,166.4b)
                                ;
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

How do I tweak in order to get more memory. The file from which I'm 
plotting has two columns of 189,200 values each. These values are of 
type long double (output from a C program). The text file containing 
these two column values is about 6 MB.

Thank you in anticipation.

Best Regards,
(Continue reading)

Reinhard Kotucha | 7 May 2010 00:17
Picon

Re: resolution of a metapost graphic

On 6 May 2010 Martin Schröder wrote:

 > 2010/5/6 Yogeshwarsing Calleecharan <yogeshwarsing.calleecharan <at> ltu.se>:
 > > Thanks a lot both Troy and Karel. Very interesting to learn today
 > > that eps is resolution independent :). I have to submit pictures
 > > to a journal and
 > 
 > eps _can_ be resolution independent; the ones produced by MP are.

EPS *is* resolution independent.  The PostScript standard allows the
inclusion of several bitmap formats.  But this is another story.

Regards,
  Reinhard

--

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha <at> web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------

--
http://tug.org/metapost/

Hans Hagen | 6 May 2010 22:10
Picon

Re: resolution of a metapost graphic

On 6-5-2010 6:46, Yogeshwarsing Calleecharan wrote:
> Hi, I'm using Gunplot to create a figure in the metapost format, after
> whichI'm converting to eps via the command:

i don't know gunplot but if you mean gnuplot, then keep in mind that 
although eps (mp) is vector based, gnuplot is producing rather dumnb 
output i.e. points connected by straight lines so you might want to 
tweak the output quality of gnuplot

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
--
http://tug.org/metapost/


Gmane