view release on metacpan or search on metacpan
html/ExifTool.html view on Meta::CPAN
the password is determined by the value of the Charset option at processing time.</td>
<td align=center>Any string</td><td align=center>undef</td></tr>
<tr id="Plot"><td>Plot</td><td>Settings for SVG plot feature as a comma-delimited
string. Commas in the values must be escaped as "&#44;". Valid settings and their default values are:
<table class="clear top">
<tr><td>"Type=Line"</td><td>-</td><td>type of plot (Line, Scatter or Histogram)</td></tr>
<tr><td>"Style=Line"</td><td>-</td><td>data style (Line, Marker and/or Fill)</td></tr>
<tr><td>"NBins=20"</td><td>-</td><td>number of histogram bins</td></tr>
<tr><td>"Size=800 600"</td><td>-</td><td>width,height of output image</td></tr>
<tr><td>"Margin=60 15 15 30"</td><td>-</td><td>left,top,right,bottom margins around plot area</td></tr>
<tr><td>"Legend=0 0"</td><td>-</td><td>x,y offset to shift plot legend</td></tr>
<tr><td>"TxtPad=10 10"</td><td>-</td><td>padding between text and x,y scale</td></tr>
<tr><td>"LineSpacing=20"</td><td>-</td><td>spacing between text lines</td></tr>
<tr><td>"Stroke=1"</td><td>-</td><td>plot stroke width and marker-size scaling</td></tr>
<tr><td>Title, XLabel, YLabel</td><td>-</td><td>plot title and x/y axis labels (no default)</td></tr>
<tr><td>XMin, XMax</td><td>-</td><td>x axis minimum/maximum (auto scaling if not set)</td></tr>
<tr><td>YMin, YMax</td><td>-</td><td>y axis minimum/maximum</td></tr>
<tr><td>"Multi="</td><td>-</td><td>flag to draw multiple plots, one for each dataset</td></tr>
<tr><td>"Split="</td><td>-</td><td>flag to split strings of numbers into lists
(>1 to split into lists of N items)</td></tr>
<tr><td>"Grid=darkgray"</td><td>-</td><td>grid color</td></tr>
html/plot.html view on Meta::CPAN
<td align=center colspan=2><i>undef</i></td></tr>
<tr><td>Split</td><td>Split strings of numbers into separate datasets</td>
<td align=center colspan=2>Number of datasets, or 1 to split all <sup>7</sup></td>
<td align=center colspan=2><i>undef</i></td></tr>
<tr><td>Size</td><td>Width and height of output image</td>
<td align=center colspan=2>String of 2 numbers <sup>2</sup></td>
<td align=center colspan=2>'800 600'</td></tr>
<tr><td>Margin</td><td>Left, right, top, bottom margins around plotting area</td>
<td align=center colspan=2>String of 4 numbers <sup>2</sup></td>
<td align=center colspan=2>'60 15 15 30'</td></tr>
<tr><td>Legend</td><td>X and Y shift of legend from default location</td>
<td align=center colspan=2>String of 2 numbers <sup>2</sup></td>
<td align=center colspan=2>'0 0'</td></tr>
<tr><td>TxtPad</td><td>Padding between text and X/Y scales</td>
<td align=center colspan=2>String of 2 numbers <sup>2</sup></td>
<td align=center colspan=2>'10 10'</td></tr>
<tr><td>LineSpacing</td><td>Text line spacing</td>
<td align=center colspan=2>A number</td>
<td align=center colspan=2>'20'</td></tr>
<tr><td>Stroke</td><td>Scaling factor for plot stroke width and marker size</td>
<td align=center colspan=2>A number</td>
html/plot.html view on Meta::CPAN
<blockquote><img src="plot2.svg" alt="SVG-format plot" width=800 height=600></blockquote>
<a name="EX3"></a>
<h3>Example 3 - Scatter Plot</h3>
<p>This example uses the same data set as example 1, but using the <code>Scatter</code>
plot type to show the correlation betweent CameraTemperature and AmbientTemperature.
The first tag specified on the command line is the independent variable (plotted
along the X axis), and the rest are the dependent variables (Y axis). Note that
the legend doesn't appear in this plot because there is only one dependent
variable, so instead the Y-axis is labelled with its name.</p>
<p>The plot <code>Style</code>
has been changed to <code>Marker</code> to show markers for the data points
instead of connecting them with lines, and <code>Fill</code> has been added to
show filled markers instead of outlines. The fill is partially transparent with a
default opacity of 20%, but this has been changed to 10% via the <code>Marks</code>
setting so points which occur few times in the dataset will show a noticably lighter
color.</p>
html/plot.html view on Meta::CPAN
strings of numbers, the <code>Split</code> setting of the
<a href="ExifTool.html#Plot">API Plot option</a> must be used to split the values into
separate lines in the plot. Here is an example of the first Accelerometer value in the
file:</p>
<pre><span class='blk'>> </span>exiftool test.mp4 -ee -accelerometer -s2 --a
<span class='blk'>Accelerometer: +0.12 +0.96 -0.09</span></pre>
<p>And this command was used to generate the following plot:</p>
<pre>exiftool test.mp4 -w plot4.svg -ee -accelerometer -plot -api plot="split,legend=30 107" \
-api plot="title=Accelerometer Readings,ylabel=G Force,xlabel=Sample Number"
</pre>
<blockquote><img src="plot4.svg" alt="SVG-format plot" width=800 height=600></blockquote>
<a name="EX5"></a>
<h3>Example 5 - Multi Plots</h3>
<p>This example demonstrates the <code>Multi</code> setting to draw multiple
<code>Histogram</code> plots in 2 columns. The <a href="ExifTool.html#Filter">API Filter</a>
html/plot1.svg view on Meta::CPAN
<text x='50' y='102.6'>27</text>
<text x='50' y='73.4'>28</text>
<text x='50' y='44.2'>29</text>
<text x='50' y='15'>30</text>
<path stroke='darkgray' stroke-width='0.5' d='
M55 570 h730 M55 540.8 h730 M55 511.6 h730 M55 482.4 h730 M55 453.2 h730 M55 423.9 h730
M55 394.7 h730 M55 365.5 h730 M55 336.3 h730 M55 307.1 h730 M55 277.9 h730 M55 248.7 h730
M55 219.5 h730 M55 190.3 h730 M55 161.1 h730 M55 131.8 h730 M55 102.6 h730 M55 73.4 h730
M55 44.2 h730 M55 15 h730 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M60 15 l0 555 725 0 0 -555 z'/>
<path stroke-width='2' stroke='red' d='M610 40 m-7 -1 l-20 0'/>
<text x='610' y='40'>AmbientTemperature</text>
<path stroke-width='2' stroke='green' d='M610 60 m-7 -1 l-20 0'/>
<text x='610' y='60'>CameraTemperature</text>
</g>
<!-- Datasets -->
<g fill='none' clip-path='url(#plot-area)' stroke-linejoin='round' stroke-linecap='round' stroke-width='1.5'>
<!-- AmbientTemperature -->
html/plot2.svg view on Meta::CPAN
<text x='70' y='282.5'>25</text>
<text x='70' y='229'>30</text>
<text x='70' y='175.5'>35</text>
<text x='70' y='122'>40</text>
<text x='70' y='68.5'>45</text>
<text x='70' y='15'>50</text>
<path stroke='darkgray' stroke-width='0.5' d='
M75 550 h710 M75 496.5 h710 M75 443 h710 M75 389.5 h710 M75 336 h710 M75 282.5 h710
M75 229 h710 M75 175.5 h710 M75 122 h710 M75 68.5 h710 M75 15 h710 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M80 15 l0 535 705 0 0 -535 z'/>
</g>
<!-- Datasets -->
<g fill='none' clip-path='url(#plot-area)' stroke-linejoin='round' stroke-linecap='round' stroke-width='1.5'>
<!-- FocalLength35efl -->
<path fill='blue' style='fill-opacity: 20%' stroke='blue' d='M
80 -2777.6 h19.58 L 99.6 357.4 h19.58 L 119.2 475.1 h19.58 L 138.8 303.9 h19.58 L 158.3 421.6 h19.58 L
177.9 378.8 h19.58 L 197.5 539.3 h19.58 L 217.1 432.3 h19.58 L 236.7 432.3 h19.58 L 256.3 432.3 h19.58 L
275.8 507.2 h19.58 L 295.4 464.4 h19.58 L 315 485.8 h19.58 L 334.6 485.8 h19.58 L 354.2 539.3 h19.58 L
html/plot3.svg view on Meta::CPAN
<text x='70' y='171.3'>26</text>
<text x='70' y='139.7'>27</text>
<text x='70' y='108.1'>28</text>
<text x='70' y='76.6'>29</text>
<text x='70' y='45'>30</text>
<path stroke='darkgray' stroke-width='0.5' d='
M75 550 h710 M75 518.4 h710 M75 486.9 h710 M75 455.3 h710 M75 423.8 h710 M75 392.2 h710
M75 360.6 h710 M75 329.1 h710 M75 297.5 h710 M75 265.9 h710 M75 234.4 h710 M75 202.8 h710
M75 171.3 h710 M75 139.7 h710 M75 108.1 h710 M75 76.6 h710 M75 45 h710 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M80 45 l0 505 705 0 0 -505 z'/>
</g>
<!-- Datasets -->
<g fill='none' clip-path='url(#plot-area)' stroke-linejoin='round' stroke-linecap='round' stroke-width='2.25'>
<!-- CameraTemperature -->
<path class='mark0' stroke='red' d=' M
536.2 202.8 M 121.5 486.9 M 536.2 202.8 M 536.2 202.8 M 121.5 518.4 M 121.5 518.4 M 536.2 202.8 M 536.2 202.8 M 536.2 202.8 M 536.2 202.8 M
536.2 202.8 M 577.6 171.3 M 536.2 202.8 M 536.2 202.8 M 494.7 234.4 M 619.1 139.7 M 702.1 76.6 M 162.9 486.9 M 328.8 360.6 M 660.6 108.1 M
660.6 108.1 M 328.8 360.6 M 204.4 455.3 M 702.1 76.6 M 619.1 139.7 M 494.7 234.4 M 453.2 265.9 M 536.2 202.8 M 453.2 265.9 M 743.5 76.6 M
html/plot4.svg view on Meta::CPAN
<text x='70' y='134.1'>0.9</text>
<text x='70' y='104.4'>1</text>
<text x='70' y='74.7'>1.1</text>
<text x='70' y='45'>1.2</text>
<path stroke='black' d='M80 401.470588235294 h705'/>
<path stroke='darkgray' stroke-width='0.5' d='
M75 550 h710 M75 520.3 h710 M75 490.6 h710 M75 460.9 h710 M75 431.2 h710 M75 401.5 h710
M75 371.8 h710 M75 342.1 h710 M75 312.4 h710 M75 282.6 h710 M75 252.9 h710 M75 223.2 h710
M75 193.5 h710 M75 163.8 h710 M75 134.1 h710 M75 104.4 h710 M75 74.7 h710 M75 45 h710 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M80 45 l0 505 705 0 0 -505 z'/>
<path stroke-width='2' stroke='red' d='M630 177 m-7 -1 l-20 0'/>
<text x='630' y='177'>Accelerometer[0]</text>
<path stroke-width='2' stroke='green' d='M630 197 m-7 -1 l-20 0'/>
<text x='630' y='197'>Accelerometer[1]</text>
<path stroke-width='2' stroke='blue' d='M630 217 m-7 -1 l-20 0'/>
<text x='630' y='217'>Accelerometer[2]</text>
</g>
<!-- Datasets -->
html/plot5.svg view on Meta::CPAN
<text x='50' y='161.9'>15</text>
<text x='50' y='132.5'>20</text>
<text x='50' y='103.1'>25</text>
<text x='50' y='73.8'>30</text>
<text x='50' y='44.4'>35</text>
<text x='50' y='15'>40</text>
<path stroke='darkgray' stroke-width='0.5' d='
M55 250 h330 M55 220.6 h330 M55 191.3 h330 M55 161.9 h330 M55 132.5 h330 M55 103.1 h330
M55 73.8 h330 M55 44.4 h330 M55 15 h330 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M60 15 l0 235 325 0 0 -235 z'/>
</g>
<!-- Datasets -->
<g fill='none' clip-path='url(#plot-area)' stroke-linejoin='round' stroke-linecap='round' stroke-width='1.5'>
<!-- FNumber -->
<path fill='green' style='fill-opacity: 50%' stroke='none' d=' M
60 85.5 h17.11 L 77.1 232.4 h17.11 L 94.2 79.6 h17.11 L 111.3 226.5 h17.11 L 128.4 220.6 h17.11 L
145.5 38.5 h17.11 L 162.6 214.8 h17.11 L 179.7 232.4 h17.11 L 196.8 238.3 h17.11 L 213.9 203 h17.11 L
231.1 250 h17.11 L 248.2 220.6 h17.11 L 265.3 250 h17.11 L 282.4 244.1 h17.11 L 299.5 250 h17.11 L
html/plot5.svg view on Meta::CPAN
<text x='50' y='132.5'>50</text>
<text x='50' y='109'>60</text>
<text x='50' y='85.5'>70</text>
<text x='50' y='62'>80</text>
<text x='50' y='38.5'>90</text>
<text x='50' y='15'>100</text>
<path stroke='darkgray' stroke-width='0.5' d='
M55 250 h330 M55 226.5 h330 M55 203 h330 M55 179.5 h330 M55 156 h330 M55 132.5 h330
M55 109 h330 M55 85.5 h330 M55 62 h330 M55 38.5 h330 M55 15 h330 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M60 15 l0 235 325 0 0 -235 z'/>
</g>
<!-- Datasets -->
<g fill='none' clip-path='url(#plot-area)' stroke-linejoin='round' stroke-linecap='round' stroke-width='1.5'>
<!-- FocalLength35efl -->
<path fill='green' style='fill-opacity: 50%' stroke='none' d=' M
60 245.3 h17.11 L 77.1 26.8 h17.11 L 94.2 231.2 h17.11 L 111.3 240.6 h17.11 L 128.4 240.6 h17.11 L
145.5 240.6 h17.11 L 162.6 247.7 h17.11 L 179.7 243 h17.11 L 196.8 243 h17.11 L 213.9 247.7 h17.11 L
231.1 247.7 h17.11 L 248.2 247.7 h17.11 L 265.3 250 h17.11 L 282.4 247.7 h17.11 L 299.5 250 h17.11 L
html/plot5.svg view on Meta::CPAN
<text x='50' y='182.9'>10</text>
<text x='50' y='149.3'>15</text>
<text x='50' y='115.7'>20</text>
<text x='50' y='82.1'>25</text>
<text x='50' y='48.6'>30</text>
<text x='50' y='15'>35</text>
<path stroke='darkgray' stroke-width='0.5' d='
M55 250 h330 M55 216.4 h330 M55 182.9 h330 M55 149.3 h330 M55 115.7 h330 M55 82.1 h330
M55 48.6 h330 M55 15 h330 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M60 15 l0 235 325 0 0 -235 z'/>
</g>
<!-- Datasets -->
<g fill='none' clip-path='url(#plot-area)' stroke-linejoin='round' stroke-linecap='round' stroke-width='1.5'>
<!-- ShutterSpeed -->
<path fill='green' style='fill-opacity: 50%' stroke='none' d=' M
60 41.9 h10.16 L 70.2 75.4 h10.16 L 80.3 95.6 h10.16 L 90.5 203 h10.16 L 100.6 209.7 h10.16 L
110.8 209.7 h10.16 L 120.9 223.1 h10.16 L 131.1 236.6 h10.16 L 141.3 216.4 h10.16 L 151.4 229.9 h10.16 L
161.6 176.1 h10.16 L 171.7 243.3 h10.16 L 181.9 236.6 h10.16 L 192 243.3 h10.16 L 202.2 250 h10.16 L
html/plot5.svg view on Meta::CPAN
<text x='50' y='145.6'>40</text>
<text x='50' y='119.4'>50</text>
<text x='50' y='93.3'>60</text>
<text x='50' y='67.2'>70</text>
<text x='50' y='41.1'>80</text>
<text x='50' y='15'>90</text>
<path stroke='darkgray' stroke-width='0.5' d='
M55 250 h330 M55 223.9 h330 M55 197.8 h330 M55 171.7 h330 M55 145.6 h330 M55 119.4 h330
M55 93.3 h330 M55 67.2 h330 M55 41.1 h330 M55 15 h330 '/>
</g>
<!-- Plot box and legend -->
<g dominant-baseline='middle' text-anchor='start'>
<path stroke='black' fill='none' d='M60 15 l0 235 325 0 0 -235 z'/>
</g>
<!-- Datasets -->
<g fill='none' clip-path='url(#plot-area)' stroke-linejoin='round' stroke-linecap='round' stroke-width='1.5'>
<!-- ISO -->
<path fill='green' style='fill-opacity: 50%' stroke='none' d=' M
60 184.7 h13 L 73 17.6 h13 L 86 236.9 h13 L 99 244.8 h13 L 112 247.4 h13 L
125 247.4 h13 L 138 244.8 h13 L 151 250 h13 L 164 250 h13 L 177 250 h13 L
190 242.2 h13 L 203 250 h13 L 216 250 h13 L 229 250 h13 L 242 250 h13 L
lib/Image/ExifTool.pod view on Meta::CPAN
delimited string of settings, or undef to revert to default settings.
Settings are accumulated if this option is set multiple times. Commas in
the settings must be escaped as ",". Valid settings and their default
values are:
"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
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
lib/Image/ExifTool/Plot.pm view on Meta::CPAN
use strict;
use vars qw($VERSION);
$VERSION = '1.02';
# default plot settings (lower-case settings may be overridden by the user)
my %defaults = (
size => [ 800, 600 ], # width,height of output image
margin => [ 60, 15, 15, 30 ], # left,top,right,bottom margins around plot area
legend => [ 0, 0 ], # top,right offset for legend
txtpad => [ 10, 10 ], # padding between text and x,y scale
linespacing => 20, # text line spacing
# colours for plot lines
cols => [ qw(red green blue black orange gray fuchsia brown turquoise gold
lime violet maroon aqua navy pink olive indigo silver teal) ],
marks => [ qw(circle square triangle diamond star plus pentagon left down right) ],
stroke => 1, # stroke width and marker scaling
grid => 'darkgray', # grid colour
text => 'black', # text and plot frame colour
type => 'line', # plot type, 'line' or 'scatter'
lib/Image/ExifTool/Plot.pm view on Meta::CPAN
printf $fp "\n<text x='${px}' y='${py}'>%g</text>", $y;
$y < $dy/2 and $y > -$dy/2 and $xAxis = 1; # redraw x axis later
length($grid) - $lastLen > 80 and $grid .= "\n", $lastLen = length($grid);
$grid .= "M$gx $py h$gw ";
}
if ($xAxis and $min!=0) {
$py = $margin[1] + $height + $min * $yscl;
print $fp "\n<path stroke='$$self{text}' d='M$margin[0] $py h$width'/>";
}
print $fp "\n<path stroke='$$self{grid}' stroke-width='0.5' d='\n${grid}'/>";
print $fp "\n</g>\n<!-- Plot box and legend -->\n<g dominant-baseline='middle' text-anchor='start'>";
print $fp "\n<path stroke='$$self{text}' fill='none' d='M$margin[0] $margin[1] l0 $height $width 0 0 -$height z'/>";
for ($i=0; $i<@name and not $noLegend; ++$i) {
$x = $size[0] - $margin[2] - 175 + $$self{legend}[0];
$y = $margin[1] + $$self{legend}[1] + 15 + $$self{linespacing} * ($i + 0.5);
my $col = $$cols[$i];
my $mark = $markID{$i} ? " marker-end='url(#$markID{$i})' fill='none'" : '';
my $line = ($style =~ /\bl/) ? ' l-20 0' : sprintf(' m%.4g 0', -5 * $wid);
my $sw = ($style =~ /\bm/ ? 1.5 : 2) * $wid; # (wider for line-only style so colour is more visible)
print $fp "\n<path$mark stroke-width='${sw}' stroke='${col}' d='M$x $y m-7 -1${line}'/>";
print $fp "\n<text x='${x}' y='${y}'>$name[$i]</text>";
}
# print the data
foreach (0..$#name) {
$col{$name[$_]} = $$cols[$_];
lib/Image/ExifTool/Plot.pm view on Meta::CPAN
1) Comma-delimited string of options
=item 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