Click here to get back home

use perl to draw Venn Diagram

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
use perl to draw Venn Diagram Ela 04-27-2008
Get Chitika Premium
Posted by Ted Zlatanov on April 30, 2008, 3:56 pm
Please log in for more thread options
wrote:


>> Also the OP may want to consider Matlab's own scripting abilities which
>> are pretty decent.

nc> Really? I have only cursory experience with Matlab, which was used in
nc> a genomics course I took, but I wasn't very impressed. Guess I didn't
nc> look closely enough at it.

It's pretty decent for what it does. For example, you can easily loop
over N values and do a plot that depends on the current value, which is
what the OP wanted. There's nntp:comp.soft-sys.matlab too.

See:

http://www.math.ucdavis.edu/~sawilliams/MATLABguide.html
http://physics.gac.edu/~huber/envision/tutor2/mtlscrip.htm

... and many other M-file examples Google returned, plus Mathworks' own site ...

Note I use "scripts" when I mean functions as well in the Matlab
context.

Ted

Posted by zentara on May 1, 2008, 10:13 am
Please log in for more thread options
wrote:
>
>z> If you need to do this without X, you might want to look at the Cairo
>z> module
>z> http://cairographics.org/samples/
>
>z> You can save them to many file formats. Gtk2's graphics are based
>z> on Cairo.
>
>Also the OP may want to consider Matlab's own scripting abilities which
>are pretty decent.
>Ted

As well as just writing postscript, then converting them to jpg or
whatever.

Perl can be used to write postscript or pdf, and making circles
is as easy as drawing lines. Just google for "postscript circles"
For example:
http://www.physics.emory.edu/~weeks/graphics/howtops2.html


zentara

--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html

Posted by Joost Diepenmaat on April 28, 2008, 7:42 am
Please log in for more thread options

> In Matlab, I can specify parameters like: LineWidth, LineStyle and so. I'm
> not asking others to post their codes but would like to know whether such
> parameters exist or not. Because after reading
>
> Graphics_Programming_with_Perl by Martien_Verbruggen-Manning
>
> I did not find any clues.

GD can do that. Read its docs.

Personally, I prefer Cairo...

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

Posted by bugbear on April 28, 2008, 4:38 am
Please log in for more thread options
Ela wrote:
> Matlab can achieve that easily and is Perl really unable to do
> that?

Matlab is a rather impressive body of work;
I see no reason to assume that perl should be
a full match for all it's functionality.

BugBear

Posted by zentara on April 28, 2008, 9:24 am
Please log in for more thread options

>Perl has a GD library. But its circle, arc, line and alike seem to have
>limited applications.
>
>I just want to plot 2 circles, one with solid line and another with dotted
>line, overlapping with each other according to an input overlapping
>parameter (I guess this feature may be achieved by locating the 2 centers
>accordingly). Finally write some texts in the centers of the 2 circles. Any
>suggestions? Matlab can achieve that easily and is Perl really unable to do
>that?

Yeah, see my replies in http://perlmonks.org?node_id=502389 for ways to
do it with Tk, Gtk2, and Tk::Zinc.

Writing text is a simple addition. You can also save the Canvases if
desired to a pdf or jpg, etc, and you can add mouse-dragging if wanted.

zentara


--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html

Similar ThreadsPosted
How to draw a tree/graph of a web site? September 11, 2007, 2:59 pm
DRaw a blank on combinging two arrays June 18, 2008, 3:16 pm
PERL to mean what 'perldoc perl' says is wrong? (was: Re: perl should be improved and perl6) April 14, 2008, 11:37 pm
FAQ 3.0: What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? October 31, 2004, 12:03 pm
FAQ 3.0 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? February 2, 2005, 12:03 pm
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? March 28, 2005, 12:03 am
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? June 12, 2005, 11:03 am
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? August 29, 2005, 10:03 pm
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? October 28, 2005, 10:03 pm
FAQ 2.18 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? December 25, 2005, 5:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap