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 Joost Diepenmaat on April 28, 2008, 11:08 am
Please log in for more thread options

> Thanks a lot, Gunnar Hjalmarsson. But the doc and google search don't tell
> me how to use gdstyled and gdbrushed to draw a circle with a dashed/dotted
> line.

The following is copied directly from the getStyle section of the GD
docs at <http://search.cpan.org/~lds/GD-2.39/GD.pm>:

# Set a style consisting of 4 pixels of yellow,
# 4 pixels of blue, and a 2 pixel gap
$myImage->setStyle($yellow,$yellow,$yellow,$yellow,
$blue,$blue,$blue,$blue,
gdTransparent,gdTransparent);
$myImage->arc(50,50,25,25,0,360,gdStyled);

You could probably also use brushes instead. Anyway all the
information is really there in the docs. If you're unable to create a
working script from that, you may want to post at least what you've
got now and what you're having difficulty with *exactly*. Just
claiming GD doesn't do what you want when it clearly does and even
provide examples in the docs isn't helping.

Take some time to read the full manpage linked above, it's not that
big and you should be able to figure it out yourself.

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

Posted by Ela on April 28, 2008, 11:55 am
Please log in for more thread options
> You could probably also use brushes instead. Anyway all the
> information is really there in the docs. If you're unable to create a
> working script from that, you may want to post at least what you've
> got now and what you're having difficulty with *exactly*. Just
> claiming GD doesn't do what you want when it clearly does and even
> provide examples in the docs isn't helping.
>
> Take some time to read the full manpage linked above, it's not that
> big and you should be able to figure it out yourself.
>
I feel sorry for not understanding what "holes" refer to... Not
complimenting Matlab, but I am used to its elegant library to provide
intuitive and powerful functions... Certainly, GD provides a greater control
over how wide the holes can be...



Posted by zentara on April 29, 2008, 8:31 am
Please log in for more thread options

>> You could probably also use brushes instead. Anyway all the
>> information is really there in the docs. If you're unable to create a
>> working script from that, you may want to post at least what you've
>> got now and what you're having difficulty with *exactly*. Just
>> claiming GD doesn't do what you want when it clearly does and even
>> provide examples in the docs isn't helping.
>>
>> Take some time to read the full manpage linked above, it's not that
>> big and you should be able to figure it out yourself.
>>
>I feel sorry for not understanding what "holes" refer to... Not
>complimenting Matlab, but I am used to its elegant library to provide
>intuitive and powerful functions... Certainly, GD provides a greater control
>over how wide the holes can be...
>

If you need to do this without X, you might want to look at the Cairo
module
http://cairographics.org/samples/

You can save them to many file formats. Gtk2's graphics are based
on Cairo.

zentara

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

Posted by Ted Zlatanov on April 30, 2008, 2:17 pm
Please log in for more thread options

>>> You could probably also use brushes instead. Anyway all the
>>> information is really there in the docs. If you're unable to create a
>>> working script from that, you may want to post at least what you've
>>> got now and what you're having difficulty with *exactly*. Just
>>> claiming GD doesn't do what you want when it clearly does and even
>>> provide examples in the docs isn't helping.
>>>
>>> Take some time to read the full manpage linked above, it's not that
>>> big and you should be able to figure it out yourself.
>>>
>> I feel sorry for not understanding what "holes" refer to... Not
>> complimenting Matlab, but I am used to its elegant library to provide
>> intuitive and powerful functions... Certainly, GD provides a greater control
>> over how wide the holes can be...
>>

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

Posted by nolo contendere on April 30, 2008, 2:23 pm
Please log in for more thread options
>
>
> >>> You could probably also use brushes instead. Anyway all the
> >>> information is really there in the docs. If you're unable to create a
> >>> working script from that, you may want to post at least what you've
> >>> got now and what you're having difficulty with *exactly*. Just
> >>> claiming GD doesn't do what you want when it clearly does and even
> >>> provide examples in the docs isn't helping.
>
> >>> Take some time to read the full manpage linked above, it's not that
> >>> big and you should be able to figure it out yourself.
>
> >> I feel sorry for not understanding what "holes" refer to... Not
> >> complimenting Matlab, but I am used to its elegant library to provide
> >> intuitive and powerful functions... Certainly, GD provides a greater co=
ntrol
> >> over how wide the holes can be...
>
> 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.

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

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