NAME

Image::ExifTool::Plot - Plot tag values in SVG format

DESCRIPTION

Output plots in SVG format based on ExifTool tag information.

METHODS

new

Create a new Plot object.

$plot = Image::ExifTool::Plot->new;

Settings

Change plot settings.

Inputs:

0) Plot object reference

1) Comma-delimited string of options

Options:
"Type=Line" - plot type (Line, Scatter or Histogram)
"Style=Line" - data style (Line, Marker and/or Fill)
"NBins=20" - number of bins for histogram plot
"Size=800 600" - width,height of output image
"Margin=60 15 15 30" - left,top,right,bottom margins around plot area
"Legend=0 0" - x,y offset to shift plot legend
"TxtPad=10 10" - padding between text and x,y scale
"LineSpacing=20" - spacing between text lines
"Stroke=1" - plot stroke width and marker-size scaling factor
Title, XLabel, YLabel - plot title and x/y axis labels (no default)
XMin, XMax - x axis minimum/maximum (autoscaling if not set)
YMin, YMax - y axis minimum/maximum
Multi - flag to draw multiple plots, one for each dataset
Split - flag to split strings of numbers into lists
(> 1 to split into lists of N items)
"Grid=darkgray" - grid color
"Text=black" - color of text and plot border
"Bkg=" - background color (default is transparent)
"Cols=red green blue black orange gray fuchsia brown turquoise gold"
- colors for plot data
"Marks=circle square triangle diamond star plus pentagon left down right"
- marker-shape names for each dataset

AddPoints

Add points to be plotted.

Inputs:

0) Plot object reference

1) Tag information hash reference from ExifTool

2) List of tag keys to plot

Draw

Draw the SVG plot to the specified output file.

Inputs:

0) Plot object reference

1) Output file reference

Notes:

On return, the Plot Error and Warn members contain error or warning strings if there were any problems. If an Error is set, then the output SVG is invalid.

AUTHOR

Copyright 2003-2025, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

https://exiftool.org/plot.html