$ref_lists } => unique elements of between and $ref_lists } => unique elements of between and $ref_lists } => intersection elements between and Case : 3 lists my $gd_venn = $venn_chart->plot( ) $venn_chart->get_list_regions() Case : 2 lists my $gd_venn = $venn_chart->plot( ) Get a list of array reference which contains data for each intersection or unique region between the 2 or 3 lists.
For example: open my $fh_image, '>', 'venn.png' or die("Error : $!") Ĭlose $fh_image or die('Unable to close file') get_list_regions $venn_chart->plot( array reference list ) my $gd = create your image, do whatever your current version of GD allows you to do to save the file. Plots the chart, and returns the GD::Image object. $venn_chart->set_legends('Diagram1', 'Diagram2', 'Diagram3') plot $venn_chart->set_legends( legend1, legend2, legend3 ) # Set title and a legend for our chart This method set a legend which represents the title of each 2 or 3 diagrams (circles). The alphaBlending function changes the way this alpha channel affects the resulting image. The alpha value may range from 0 (opaque) to 127 (transparent).
This allocates a color with the specified red, green, and blue components, plus the specified alpha channel for each circle. Specifies the RGBA colors of the 2 or 3 lists. title => 'Venn diagram', -colors => array reference $venn_chart->set_options( -attrib => value. Set the image title and colors of the diagrams. It has been replaced by set_options method. The default width and height size are 500 pixels. It creates a new blank image of the specified width and height. The new() method is the main constructor for the Venn::Chart module. $venn_chart = Venn::Chart->new($width, $height) This constructor allows you to create a new Venn::Chart object. It is possible to create an histogram chart with the different data regions of Venn diagram using GD::Graph module. A title and a legend can be added in the chart. Venn::Chart create a Venn diagram image using GD module with 2 or 3 data lists. Print "List $list_number : $ref_region }\n" # Get data list for each intersection or unique region between the 3 lists Open my $fh_histo, '>', 'VennHistogram.png' or die("Unable to create png file\n") Ĭlose $fh_histo or die('Unable to close file') My $gd_histogram = $venn_chart->plot_histogram # Create an histogram image of Venn diagram (png, gif and jpeg format)
Open my $fh_venn, '>', 'VennChart.png' or die("Unable to create png file\n") Ĭlose $fh_venn or die('Unable to close file') # Create a Venn diagram image in png, gif and jpeg format My = qw/gerald jake kevin lucia john edward/ My = qw/edward isabel antonio delta albert kevin jake/ My = qw/abel edward momo albert jack julien chris/ $venn_chart->set_legends( 'Team 1', 'Team 2', 'Team 3' ) $venn_chart->set_options( -title => 'Venn diagram' ) Venn::Chart - Create a Venn diagram using GD.