I have not been able to display the secondary X axis to my scatter plot. I wanted to place the second series on X2 with a log-10 based scale. I can do this with Y2, but not X2.
I have included my code. Any suggestions would be appreciated.
regards,
Todd
foreach my $DataSet (keys %group) {
$row=0;
foreach my $line ( @{ $group{ $DataSet } }) {
$worksheet->write_row( $row++, $col, $line );
print "$row,$col,$line\n";
}
my $chart = $workbook->add_chart( type => 'scatter', embedded => 0, subtype => 'straight_with_markers');
$col = $col + 4;
# TLP I and V
$chart->add_series(
name => xl_range_formula('TLP', 8, 8, $C2, $C2 ),
categories => ['TLP', 21, 199, $C2, $C2 ],
values => ['TLP', 21, 199, $C1, $C1 ],
line => { color => 'blue' },
);
# TLP I leak
$chart->add_series(
name =>xl_range_formula ('TLP', 9, 9, $C2, $C2 ),
categories =>['TLP', 21, 199, $C3, $C3 ],
values =>['TLP', 21, 199, $C1, $C1 ],
x2_axis => 1,
line => { color => 'red' },
);
# Add a chart title.
$chart->set_title( name => "$DataSet",name_font => {
name => 'Calibri',
size => 16 } );
$chart->set_x2_axis( name => 'current', log_base => 10, visible => 1, min =>1E-12 ,max => 1E-5,);