.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Graph::FAQ 3pm" .TH Graph::FAQ 3pm "2013-06-22" "perl v5.18.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" GD::Graph::FAQ \- Frequently asked questions .SH "IMPORTANT" .IX Header "IMPORTANT" Take a look at \*(L"\s-1DISTRIBUTION STATUS\*(R"\s0 in GD::Graph first. .SH "DESCRIPTION" .IX Header "DESCRIPTION" .ie n .SS "I get errors like ""Can't call method \s-1METHOD\s0 on an undefined value"". What gives?" .el .SS "I get errors like ``Can't call method \s-1METHOD\s0 on an undefined value''. What gives?" .IX Subsection "I get errors like Can't call method METHOD on an undefined value. What gives?" You probably had an error somewhere, most likely in the \fIplot()\fR method, and you didn't check for it. See the section on Error Handling in the documentation for GD::Graph to find out how to deal with this sort of thing, and how to get more information about what the error was. .SS "I am drawing a bar chart, and the chart area is a lot smaller than the image. What is going on?" .IX Subsection "I am drawing a bar chart, and the chart area is a lot smaller than the image. What is going on?" As of version 1.30, GD::Graph automatically corrects the width of the plotting area of a chart if it needs to draw bars (i.e. for bars and some mixed charts). This is necessary, because rounding errors cause irregular gaps between or overlaps of bars if the bar is not an exact integer number of pixels wide. .PP If you want the old behaviour back, set the correct_width attribute to a false value. .SS "I have my data in some format that doesn't look at all like the array that I am supposed to give to GD::Graph's plot method. Do I really need to mess around with array references?" .IX Subsection "I have my data in some format that doesn't look at all like the array that I am supposed to give to GD::Graph's plot method. Do I really need to mess around with array references?" Not necessarily. Check out the GD::Graph::Data class. .SS "How do I stop those pesky accents appearing around bars or inside area charts?" .IX Subsection "How do I stop those pesky accents appearing around bars or inside area charts?" You can set the \f(CW\*(C`accent_treshold\*(C'\fR option to a large enough value (larger than your chart). Alternatively, you may like it better to set the \f(CW\*(C`borderclrs\*(C'\fR attribute to be the same as the dclrs one. .PP I'll probably include an option in a future version that gives better control over this. .SS "Where is the ActiveState ppm of GD::Graph?" .IX Subsection "Where is the ActiveState ppm of GD::Graph?" Ask them. I have asked them, but didn't get an answer. I don't know what to do to get it included in their set of ppms, and I really do not have the time to keep asking them. .PP I believe that GD::graph has finally made it into ActiveState's ppm archive. However, I am going to leave this question here in case they get behind again. .SS "Do you have some example code for me?" .IX Subsection "Do you have some example code for me?" The distribution has a large set of examples in it. If you don't have the original distribution, please get it from \s-1CPAN \s0(http://www.cpan.org/ or some local mirror). .SS "Will you support X or Y?" .IX Subsection "Will you support X or Y?" If you send me a patch that (in a decent manner) adds the functionality to the latest version, I may very well add it for the next release. If you don't send me a patch, but just a question, you will have to be patient. (Please also see the section on bugs in the main body of GD::Graph.) .SS "Why does export_format give me a weird string, instead of just 'png' or 'gif'?" .IX Subsection "Why does export_format give me a weird string, instead of just 'png' or 'gif'?" As of version 1.31, export_format in a list context returns all formats that \s-1GD\s0 can export. If you are only interested in the answer 'gif' or \&'png', make sure that you call it in a scalar context. .PP .Vb 5 \& $export_format = GD::Graph\->export_format; \& $export_format = $graph\->export_format; \& print "Export format is ", scalar $graph\->export_format, "\en"; \& print "Export format is " . $graph\->export_format . "\en"; \& @export_formats = $graph\->export_format; .Ve .SS "TrueType fonts don't work when I use GD::Graph from a \s-1CGI\s0 program." .IX Subsection "TrueType fonts don't work when I use GD::Graph from a CGI program." When your programs run as \s-1CGI,\s0 they typically do not have the same environment as when you use them from the command line. The Perl \s-1FAQ,\s0 section 9, has some information on this. It is also not guaranteed that your script runs from the directory that it is in. It is probably better to include something like: .PP .Vb 2 \& use GD::Text; \& GD::Text\->font_path("/path/to/my/font_dir"); .Ve .PP See the GD::Text documentation for more information about font paths. .SS "I'm trying to use \s-1GD\s0's builtin fonts, but it's not working." .IX Subsection "I'm trying to use GD's builtin fonts, but it's not working." Most likely, you are using the font short name, like gdGiantFont or gdMediumBoldFont, and you have not put a \f(CW\*(C`use GD\*(C'\fR in your program. This is needed, because these short names need to be exported into your name space by the \s-1GD\s0 library: .PP .Vb 3 \& use GD; \& # ... \& $graph\->set_x_axis_font(gdMediumBoldFont); .Ve .PP If you don't want to include the \s-1GD\s0 library, you can use the longer alternative names (which is what I'd recommend anyway): .PP .Vb 1 \& $graph1\->set_x_axis_font(GD::Font\->MediumBold); .Ve .PP If you \f(CW\*(C`use strict\*(C'\fR then you will actually get an error message if you try to use the short names without including the \s-1GD\s0 module. .PP Also see the GD::Text documentation for this information. .SS "When I have many data sets, some end up having the same colour." .IX Subsection "When I have many data sets, some end up having the same colour." The default number of colours for data sets is seven, so if you use more than seven data sets, those colours will be re-used for the higher data sets. .PP This is described in the entry for the \f(CW\*(C`dclrs\*(C'\fR attribute in the GD::Graph documentation. .SS "Can you tell me how to do X?" .IX Subsection "Can you tell me how to do X?" Not necessarily (X might be kind of complicated, after all). Did you look in the samples for something similar? If not, you're probably best off seeing if you can get help from a group of people, rather than one or the other of the overworked individuals whose e\-mail addresses are shown below. .PP If you're more comfortable with asking a newsgroup for help, the canonical resource is ; if you prefer web forums, there is a good one at . .PP In either case, if you are not familiar with the forum and its denizens, you might wish to read the following helpful guide before posting your question: http://www.perlmonks.org/?node_id=172086 .SS "Can you fix this bug I've found?" .IX Subsection "Can you fix this bug I've found?" Well, I hope so. Please see the \*(L"\s-1BUGS\*(R"\s0 section in the main body of GD::Graph for the best way to report it. .SH "AUTHOR" .IX Header "AUTHOR" Martien Verbruggen .PP Current maintenance (including this release) by Benjamin Warfield .PP (c) Martien Verbruggen. .PP All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.