Merge remote-tracking branch 'origin/master'

# Conflicts:
#	Install.ps1
This commit is contained in:
dfinke
2016-03-07 19:46:47 -05:00
2 changed files with 26 additions and 0 deletions

26
Examples/Charts/plot.ps1 Normal file
View File

@@ -0,0 +1,26 @@
function plot {
param(
$f,
$minx,
$maxx
)
$minx=[math]::Round($minx,1)
$maxx=[math]::Round($maxx,1)
$file = 'C:\temp\plot.xlsx'
rm $file -ErrorAction Ignore
$c = New-ExcelChart -XRange X -YRange Y -ChartType Line -NoLegend -Title Plot -Column 2 -ColumnOffSetPixels 35
$(for ($i = $minx; $i -lt $maxx-.1; $i+=.1) {
[pscustomobject]@{
X=$i.ToString("N1")
Y=(&$f $i)
}
}) | Export-Excel $file -Show -AutoNameRange -ExcelChartDefinition $c
}
function pi {[math]::pi}
plot {[math]::Tan($args[0])} (pi) (3*(pi)/2-.01)

BIN
images/plot.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 KiB