That's right, if you want to use a JPEG image as your background, you can
supply the file pathname in the PHPlot constructor (4th argument,
$input_file), or you can apply it with SetBgImage() to be behind the entire
image, or with SetPlotAreaBgImage() if you want it to be behind the plot area
only (not the outside area with titles and labels).
Please note, if you use SetPlotAreaBgImage or SetBgImage with a JPEG file, you
should be using the PHPlot_truecolor constructor instead of the PHPlot
constructor, to avoid overflowing the color map. This is not an issue if you
supply the background in the constructor itself: $plot = new
PHPlot(0,0,NULL,'myfile.jpg') will create a truecolor image from myfile.jpg -
both constructors work the same here.
If you are trying to do something different, like overlay a JPEG image onto
part of the plot after drawing it, then no, PHPlot can't do that directly, but
you can implement that with a drawing callback (see "Using callbacks to
annotate plots" in the Callbacks section of the reference manual).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
Is it possible that i can select an picture (.jpg) from the server and include
it into my graph?
if yes, how can i made this?
Thanks for Answers.
Are the functions
(http://phplot.sourceforge.net/phplotdocs/SetBgImage.html) or
(http://phplot.sourceforge.net/phplotdocs/SetPlotAreaBgImage.html) of any help?
That's right, if you want to use a JPEG image as your background, you can
supply the file pathname in the PHPlot constructor (4th argument,
$input_file), or you can apply it with SetBgImage() to be behind the entire
image, or with SetPlotAreaBgImage() if you want it to be behind the plot area
only (not the outside area with titles and labels).
Please note, if you use SetPlotAreaBgImage or SetBgImage with a JPEG file, you
should be using the PHPlot_truecolor constructor instead of the PHPlot
constructor, to avoid overflowing the color map. This is not an issue if you
supply the background in the constructor itself: $plot = new
PHPlot(0,0,NULL,'myfile.jpg') will create a truecolor image from myfile.jpg -
both constructors work the same here.
If you are trying to do something different, like overlay a JPEG image onto
part of the plot after drawing it, then no, PHPlot can't do that directly, but
you can implement that with a drawing callback (see "Using callbacks to
annotate plots" in the Callbacks section of the reference manual).