Update latest

gh-pages
Matti Pastell 2016-12-12 21:44:59 +02:00
commit 593d608d24
119 changed files with 14691 additions and 0 deletions

18
doc/build/assets/Documenter.css vendored Normal file
View File

@ -0,0 +1,18 @@
div.wy-menu-vertical ul.current li.toctree-l3 a {
font-weight: bold;
}
a.documenter-source {
float: right;
}
.documenter-methodtable pre {
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding: 0px;
}
.documenter-methodtable pre.documenter-inline {
display: inline;
}

25
doc/build/assets/mathjaxhelper.js vendored Normal file
View File

@ -0,0 +1,25 @@
MathJax.Hub.Config({
"tex2jax": {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: [
"input/TeX",
"output/HTML-CSS",
"output/NativeMML"
],
extensions: [
"MathMenu.js",
"MathZoom.js",
"TeX/AMSmath.js",
"TeX/AMSsymbols.js",
"TeX/autobold.js",
"TeX/autoload-all.js"
]
});
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});

82
doc/build/chunk_options.md vendored Normal file
View File

@ -0,0 +1,82 @@
<a id='Chunk-options-1'></a>
# Chunk options
I've mostly followed [Knitr](http://yihui.name/knitr/options)'s naming for chunk options, but not all options are implemented.
Options are separated using ";" and need to be valid Julia expressions. Example: A code chunk that saves and displays a 12 cm wide image and hides the source code:
```julia
<<fig_width=5; echo=false >>=
using Gadfly
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
@
```
Weave currently supports the following chunk options with the following defaults:
<a id='Options-for-code-1'></a>
## Options for code
* `echo = true`. Echo the code in the output document. If `false` the source code will be hidden.
* `results = "markup"`. The output format of the printed results. "markup" for literal block, "hidden" for hidden results or anything else for raw output (I tend to use tex for Latex and rst for rest. Raw output is useful if you want to e.g. create tables from code chunks.
* `eval = true`. Evaluate the code chunk. If false the chunk wont be executed.
* `term=false`. If true the output emulates a REPL session. Otherwise only stdout and figures will be included in output.
* `label`. Chunk label, will be used for figure labels in Latex as fig:label
* `wrap = true`. Wrap long lines from output.
* `line_width = 75`. Line width for wrapped lines.
* `cache = false`. Cache results, depends on `cache` parameter on `weave` function.
* `hold = false`. Hold all results until the end of the chunk.
* `tangle = true`. Set tangle to false to exclude chunk from tangled code.
<a id='Options-for-figures-1'></a>
## Options for figures
* `fig_width`. Figure width defined in markup, default depends on the output format.
* `out_width`. Width of saved figure.
* `out_height`. Height of saved figure.
* `dpi`=96. Resolution of saved figures.
* `fig_cap`. Figure caption.
* `label`. Chunk label, will be used for figure labels in Latex as fig:label
* `fig_ext`. File extension (format) of saved figures.
* `fig_pos="htpb"`. Figure position in Latex.
* `fig_env="figure"`. Figure environment in Latex.
<a id='Set-default-chunk-options-1'></a>
## Set default chunk options
You can set or alter the default chunk options for a document either before running weave or inside the weaved document. You can e.g. use a hidden chunk in the beginning of the source document to set the options:
```julia
<<echo = false>>=
import Weave
Weave.set_chunk_defaults(Dict{Symbol, Any}(
:out_width => "\\0.5linewidth",
:results => "tex"
))
@
```
```
set_chunk_defaults(opts)
get_chunk_defaults()
restore_chunk_defaults()
```

12
doc/build/function_index.md vendored Normal file
View File

@ -0,0 +1,12 @@
<a id='Function-index-1'></a>
# Function index
- [`Weave.convert_doc`](notebooks.md#Weave.convert_doc-Tuple{String,String})
- [`Weave.get_chunk_defaults`](chunk_options.md#Weave.get_chunk_defaults-Tuple{})
- [`Weave.list_out_formats`](usage.md#Weave.list_out_formats-Tuple{})
- [`Weave.restore_chunk_defaults`](chunk_options.md#Weave.restore_chunk_defaults-Tuple{})
- [`Weave.tangle`](usage.md#Weave.tangle-Tuple{Any})
- [`Weave.weave`](usage.md#Weave.weave-Tuple{Any})

36
doc/build/getting_started.md vendored Normal file
View File

@ -0,0 +1,36 @@
<a id='Getting-started-1'></a>
# Getting started
The best way to get started using Weave.jl is to look at the example input and output documents. Examples for different formats are included in the packages `examples` directory.
First have a look at source document using markdown code chunks and Gadfly for figures: [gadfly_md_sample.jmd](examples/gadfly_md_sample.jmd) and then see the output in different formats:
* Pandoc markdown: [gadfly_md_sample.md](examples/gadfly_md_sample.txt)
* HTML: [gadfly_md_sample.html](examples/gadfly_md_sample.html)
* pdf: [gadfly_md_sample.pdf](examples/gadfly_md_sample.pdf)
*Producing HTML and pdf output requires that you have Pandoc and XeLatex (for pdf) installed.*
You can Weave the files to your working directory using:
```julia
using Weave
#Markdown
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), out_path = :pwd,
doctype = "pandoc")
#HTML
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), out_path = :pwd,
doctype = "md2html")
#pdf
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), out_path = :pwd,
doctype = "md2pdf")
```

48
doc/build/index.md vendored Normal file
View File

@ -0,0 +1,48 @@
<a id='Intro-1'></a>
# Intro
This is the documentation of [Weave.jl](http://github.com/mpastell/weave.jl). Weave is a scientific report generator/literate programming tool for Julia. It resembles [Pweave](http://mpastell.com/pweave), Knitr, rmarkdown and Sweave.
**Current features**
* Noweb, markdown or script syntax for input documents.
* Execute code as terminal or "script" chunks.
* Capture Plots, Gadfly, PyPlot and Winston figures.
* Supports LaTex, Pandoc, Github markdown, MultiMarkdown, Asciidoc and reStructuredText output
* Publish markdown directly to html and pdf using Pandoc.
* Simple caching of results
* Convert to and from IJulia notebooks
![Weave code and output](http://mpastell.com/images/weave_demo.png)
<a id='Contents-1'></a>
## Contents
- [Getting started](getting_started.md#Getting-started-1)
- [Using Weave](usage.md#Using-Weave-1)
- [Weave](usage.md#Weave-1)
- [Weave from shell](usage.md#Weave-from-shell-1)
- [Tangle](usage.md#Tangle-1)
- [Supported formats](usage.md#Supported-formats-1)
- [Document syntax](usage.md#Document-syntax-1)
- [Noweb](usage.md#Noweb-1)
- [Markdown](usage.md#Markdown-1)
- [Publishing scripts](publish.md#Publishing-scripts-1)
- [Other mark ups with scripts](publish.md#Other-mark-ups-with-scripts-1)
- [Chunk options](chunk_options.md#Chunk-options-1)
- [Options for code](chunk_options.md#Options-for-code-1)
- [Options for figures](chunk_options.md#Options-for-figures-1)
- [Set default chunk options](chunk_options.md#Set-default-chunk-options-1)
- [Working with Jupyter notebooks](notebooks.md#Working-with-Jupyter-notebooks-1)
- [Weaving](notebooks.md#Weaving-1)
- [Converting between formats](notebooks.md#Converting-between-formats-1)
- [Function index](function_index.md#Function-index-1)

58
doc/build/notebooks.md vendored Normal file
View File

@ -0,0 +1,58 @@
<a id='Working-with-Jupyter-notebooks-1'></a>
# Working with Jupyter notebooks
<a id='Weaving-1'></a>
## Weaving
Weave supports using Jupyter notebooks as input format, this means you can weave notebooks to any supported formats. You can't use chunk options with notebooks.
```julia
weave("notebook.ipynb")
```
In order to output notebooks from other formats you need to convert the document to a notebook and run the code using IJulia.
<a id='Converting-between-formats-1'></a>
## Converting between formats
You can convert between all supported input formats using the `convert_doc` function.
To convert from script to notebook:
```julia
convert_doc("examples/FIR_design.jl", "FIR_design.ipynb")
```
and from notebooks to markdown use:
```julia
convert_doc("FIR_design.ipynb", "FIR_design.jmd")
```
<a id='Weave.convert_doc-Tuple{String,String}' href='#Weave.convert_doc-Tuple{String,String}'>#</a>
**`Weave.convert_doc`** &mdash; *Method*.
`convert_doc(infile::AbstractString, outfile::AbstractString; format = nothing)`
Convert Weave documents between different formats
* `infile` = Name of the input document
* `outfile` = Name of the output document
* `format` = Output format (optional). Detected from outfile extension, but can be set to `"script"`, `"markdown"`, `"notebook"` or `"noweb"`.

39
doc/build/publish.md vendored Normal file
View File

@ -0,0 +1,39 @@
<a id='Publishing-scripts-1'></a>
# Publishing scripts
You can also also publish html and pdf documents from Julia scripts with a specific format. Producing HTML and pdf output requires that you have Pandoc and XeLatex (for pdf) installed and in your path.
These scripts can be executed normally using Julia or published with Weave. Documentation is written in markdown in lines starting with `#'`, `#%%` or `# %%`, and code is executed and results are included in the published document.
The format is identical to [Pweave](http://mpastell.com/pweave/pypublish.html) and the concept is similar to publishing documents with MATLAB or using Knitr's [spin](http://yihui.name/knitr/demo/stitch/). Weave will remove the first empty space from each line of documentation.
All lines that are not documentation are treated as code. You can set chunk options using lines starting with `#+` just before code e.g. `#+ term=true`. See the example below for the markup.
[FIR_design.jl](examples/FIR_design.jl), [FIR_design.html](examples/FIR_design.html) , [FIR_design.pdf](examples/FIR_design.pdf).
```julia
weave("FIR_design.jl")
weave("FIR_design.jl", docformat = "md2pdf")
```
<a id='Other-mark-ups-with-scripts-1'></a>
## Other mark ups with scripts
You can also use any Weave supported format in the comments and set the output format as you would for noweb and markdown inputs. e.g for LaTeX you can use:
```julia
weave("latex_doc.jl", docformat = "texminted")
```

182
doc/build/usage.md vendored Normal file
View File

@ -0,0 +1,182 @@
<a id='Using-Weave-1'></a>
# Using Weave
You can write your documentation and code in input document using Noweb or Markdown syntax and use `weave` function to execute to document to capture results and figures.
<a id='Weave-1'></a>
## Weave
Weave document with markup and julia code using Gadfly for plots, `out_path = :pwd` makes the results appear in the current working directory.
```julia
using Weave
weave(Pkg.dir("Weave","examples","gadfly_sample.mdw"), out_path = :pwd)
```
Using PyPlot:
```julia
weave(Pkg.dir("Weave","examples","julia_sample.mdw"), plotlib="PyPlot", out_path = :pwd)
```
<a id='Weave.weave-Tuple{Any}' href='#Weave.weave-Tuple{Any}'>#</a>
**`Weave.weave`** &mdash; *Method*.
`function weave(source ; doctype = :auto, plotlib="Gadfly", informat=:auto, out_path=:doc, fig_path = "figures", fig_ext = nothing, cache_path = "cache", cache=:off)`
Weave an input document to output file.
* `doctype`: :auto = set based on file extension or specify one of the supported formats. See `list_out_formats()`
* `plotlib`: `"PyPlot"`, `"Gadfly"` or `nothing`
* `informat`: :auto = set based on file extension or set to `"noweb"`, `"markdown"` or `script`
* `out_path`: Path where the output is generated. Can be: `:doc`: Path of the source document, `:pwd`: Julia working directory, `"somepath"`: output directory as a String e.g `"/home/mpastell/weaveout"` or filename as string e.g. ~/outpath/outfile.tex.
* `fig_path`: where figures will be generated, relative to out_path
* `fig_ext`: Extension for saved figures e.g. `".pdf"`, `".png"`. Default setting depends on `doctype`.
* `cache_path`: where of cached output will be saved.
* `cache`: controls caching of code: `:off` = no caching, `:all` = cache everything, `:user` = cache based on chunk options, `:refresh`, run all code chunks and save new cache.
**Note:** Run Weave from terminal and not using IJulia, Juno or ESS, they tend to mess with capturing output.
<a id='Weave-from-shell-1'></a>
## Weave from shell
You can also use the `weave.jl` script under bin directory to weave documents from the shell:
```
$ ./weave.jl
usage: weave.jl [--doctype DOCTYPE] [--plotlib PLOTLIB]
[--informat INFORMAT] [--out_path OUT_PATH]
[--fig_path FIG_PATH] [--fig_ext FIG_EXT] source...
```
<a id='Tangle-1'></a>
## Tangle
Tangling extracts the code from document:
<a id='Weave.tangle-Tuple{Any}' href='#Weave.tangle-Tuple{Any}'>#</a>
**`Weave.tangle`** &mdash; *Method*.
`tangle(source ; out_path=:doc, informat="noweb")`
Tangle source code from input document to .jl file.
* `informat`: `"noweb"` of `"markdown"`
* `out_path`: Path where the output is generated. Can be: `:doc`: Path of the source document, `:pwd`: Julia working directory, `"somepath"`, directory name as a string e.g `"/home/mpastell/weaveout"`
or filename as string e.g. ~/outpath/outfile.jl.
<a id='Supported-formats-1'></a>
## Supported formats
Weave sets the output format based on the file extension, but you can also set it using `doctype` option. The rules for detecting the format are:
```julia
ext == ".jl" && return "md2html"
contains(ext, ".md") && return "md2html"
contains(ext, ".rst") && return "rst"
contains(ext, ".tex") && return "texminted"
contains(ext, ".txt") && return "asciidoc"
return "pandoc"
```
You can get a list of supported output formats:
```julia
julia> list_out_formats()
pandoc: Pandoc markdown
rst: reStructuredText and Sphinx
texminted: Latex using minted for highlighting
github: Github markdown
md2html: Markdown to HTML (requires Pandoc)
md2pdf: Markdown to pdf (requires Pandoc and xelatex)
asciidoc: AsciiDoc
tex: Latex with custom code environments
```
<a id='Weave.list_out_formats-Tuple{}' href='#Weave.list_out_formats-Tuple{}'>#</a>
**`Weave.list_out_formats`** &mdash; *Method*.
`list_out_formats()`
List supported output formats
<a id='Document-syntax-1'></a>
## Document syntax
Weave uses noweb, markdown or script syntax for defining the code chunks and documentation chunks. You can also weave Jupyter notebooks. The format is detected based on the file extension, but you can also set it manually using the `informat` parameter.
The rules for autodetection are:
```julia
ext == ".jl" && return "script"
ext == ".jmd" && return "markdown"
ext == ".ipynb" && return "notebook"
return "noweb"
```
<a id='Noweb-1'></a>
## Noweb
<a id='Code-chunks-1'></a>
### Code chunks
start with a line marked with `<<>>=` or `<<options>>=` and end with line marked with `@`. The code between the start and end markers is executed and the output is captured to the output document. See for options below.
<a id='Documentation-chunks-1'></a>
### Documentation chunks
Are the rest of the document (between `@` and `<<>>=` lines and the first chunk be default) and can be written with several different markup languages.
[Sample document]( https://github.com/mpastell/Weave.jl/blob/master/examples/julia_sample.mdw)
<a id='Markdown-1'></a>
## Markdown
Markdown code chunks are defined using fenced code blocks. [See sample document:](https://github.com/mpastell/Weave.jl/blob/master/examples/gadfly_md_sample.jmd)

View File

@ -0,0 +1,18 @@
div.wy-menu-vertical ul.current li.toctree-l3 a {
font-weight: bold;
}
a.documenter-source {
float: right;
}
.documenter-methodtable pre {
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding: 0px;
}
.documenter-methodtable pre.documenter-inline {
display: inline;
}

BIN
doc/site/assets/fonts/icon.eot Executable file

Binary file not shown.

22
doc/site/assets/fonts/icon.svg Executable file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe600;" glyph-name="search" d="M661.333 341.334h-33.92l-11.733 11.733c41.813 48.427 66.987 111.36 66.987 180.267 0 153.173-124.16 277.333-277.333 277.333s-277.333-124.16-277.333-277.333 124.16-277.333 277.333-277.333c68.907 0 131.84 25.173 180.267 66.773l11.733-11.733v-33.707l213.333-212.907 63.573 63.573-212.907 213.333zM405.333 341.334c-106.027 0-192 85.973-192 192s85.973 192 192 192 192-85.973 192-192-85.973-192-192-192z" />
<glyph unicode="&#xe601;" glyph-name="arrow-back" d="M853.333 469.334h-519.253l238.293 238.293-60.373 60.373-341.333-341.333 341.333-341.333 60.373 60.373-238.293 238.293h519.253v85.333z" />
<glyph unicode="&#xe602;" glyph-name="chevron-right" d="M426.667 682.667l-60.373-60.373 195.627-195.627-195.627-195.627 60.373-60.373 256 256z" />
<glyph unicode="&#xe603;" glyph-name="close" d="M810.667 664.96l-60.373 60.373-238.293-238.293-238.293 238.293-60.373-60.373 238.293-238.293-238.293-238.293 60.373-60.373 238.293 238.293 238.293-238.293 60.373 60.373-238.293 238.293z" />
<glyph unicode="&#xe604;" glyph-name="menu" d="M128 170.667h768v85.333h-768v-85.333zM128 384h768v85.333h-768v-85.333zM128 682.667v-85.333h768v85.333h-768z" />
<glyph unicode="&#xe605;" glyph-name="arrow-forward" d="M512 768l-60.373-60.373 238.293-238.293h-519.253v-85.333h519.253l-238.293-238.293 60.373-60.373 341.333 341.333z" />
<glyph unicode="&#xe606;" glyph-name="twitter" d="M1024 744.249c-37.676-16.708-78.164-28.002-120.66-33.080 43.372 26 76.686 67.17 92.372 116.23-40.596-24.078-85.556-41.56-133.41-50.98-38.32 40.83-92.922 66.34-153.346 66.34-116.022 0-210.088-94.058-210.088-210.078 0-16.466 1.858-32.5 5.44-47.878-174.6 8.764-329.402 92.4-433.018 219.506-18.084-31.028-28.446-67.116-28.446-105.618 0-72.888 37.088-137.192 93.46-174.866-34.438 1.092-66.832 10.542-95.154 26.278-0.020-0.876-0.020-1.756-0.020-2.642 0-101.788 72.418-186.696 168.522-206-17.626-4.8-36.188-7.372-55.348-7.372-13.538 0-26.698 1.32-39.528 3.772 26.736-83.46 104.32-144.206 196.252-145.896-71.9-56.35-162.486-89.934-260.916-89.934-16.958 0-33.68 0.994-50.116 2.94 92.972-59.61 203.402-94.394 322.042-94.394 386.422 0 597.736 320.124 597.736 597.744 0 9.108-0.206 18.168-0.61 27.18 41.056 29.62 76.672 66.62 104.836 108.748z" />
<glyph unicode="&#xe607;" glyph-name="github" d="M512.008 926.025c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />
<glyph unicode="&#xe608;" glyph-name="download" d="M810.667 554.667h-170.667v256h-256v-256h-170.667l298.667-298.667 298.667 298.667zM213.333 170.667v-85.333h597.333v85.333h-597.333z" />
<glyph unicode="&#xe609;" glyph-name="star" d="M512 201.814l263.68-159.147-69.973 299.947 232.96 201.813-306.773 26.027-119.893 282.88-119.893-282.88-306.773-26.027 232.96-201.813-69.973-299.947z" />
<glyph unicode="&#xe610;" glyph-name="warning" d="M554 340.667v172h-84v-172h84zM554 170.667v86h-84v-86h84zM42 42.667l470 810 470-810h-940z" />
<glyph unicode="&#xe611;" glyph-name="hint" d="M614 682.667h240v-426h-300l-16 84h-240v-298h-84v726h384z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
doc/site/assets/fonts/icon.ttf Executable file

Binary file not shown.

BIN
doc/site/assets/fonts/icon.woff Executable file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,25 @@
MathJax.Hub.Config({
"tex2jax": {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: [
"input/TeX",
"output/HTML-CSS",
"output/NativeMML"
],
extensions: [
"MathMenu.js",
"MathZoom.js",
"TeX/AMSmath.js",
"TeX/AMSsymbols.js",
"TeX/autobold.js",
"TeX/autoload-all.js"
]
});
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,401 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<title>Chunk options - Weave.jl - Scientific Reports Using Julia</title>
<meta name="author" content="Matti Pastell">
<meta property="og:url" content="None">
<meta property="og:title" content="Weave.jl - Scientific Reports Using Julia">
<meta property="og:image" content="None/../">
<meta name="apple-mobile-web-app-title" content="Weave.jl - Scientific Reports Using Julia">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<link rel="icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<style>
@font-face {
font-family: 'Icon';
src: url('../assets/fonts/icon.eot?52m981');
src: url('../assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('../assets/fonts/icon.woff?52m981')
format('woff'),
url('../assets/fonts/icon.ttf?52m981')
format('truetype'),
url('../assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="../assets/stylesheets/application-a422ff04cc.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono">
<style>
body, input {
font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace;
}
</style>
<link rel="stylesheet" href="../assets/Documenter.css">
<script src="../assets/javascripts/modernizr-4ab42b99fd.js"></script>
</head>
<body class=" ">
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<span class="path">
</span>
Chunk options
</div>
</div>
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
</header>
<main class="main">
<div class="drawer">
<nav aria-label="Navigation">
<a href="https://github.com/mpastell/Weave.jl" class="project">
<div class="banner">
<div class="name">
<strong>
Weave.jl - Scientific Reports Using Julia
<span class="version">
</span>
</strong>
<br>
mpastell/Weave.jl
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
<ul class="repo">
<li class="repo-download">
<a href="https://github.com/mpastell/Weave.jl/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="https://github.com/mpastell/Weave.jl/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
<div class="toc">
<ul>
<li>
<a class="" title="Home" href="..">
Home
</a>
</li>
<li>
<a class="" title="Getting started" href="../getting_started/">
Getting started
</a>
</li>
<li>
<a class="" title="Using Weave" href="../usage/">
Using Weave
</a>
</li>
<li>
<a class="" title="Publishing scripts" href="../publish/">
Publishing scripts
</a>
</li>
<li>
<a class="current" title="Chunk options" href="./">
Chunk options
</a>
<ul>
<li class="anchor">
<a title="Options for code" href="#options-for-code">
Options for code
</a>
</li>
<li class="anchor">
<a title="Options for figures" href="#options-for-figures">
Options for figures
</a>
</li>
<li class="anchor">
<a title="Set default chunk options" href="#set-default-chunk-options">
Set default chunk options
</a>
</li>
</ul>
</li>
<li>
<a class="" title="Working with Jupyter notebooks" href="../notebooks/">
Working with Jupyter notebooks
</a>
</li>
<li>
<a class="" title="Function index" href="../function_index/">
Function index
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</div>
<article class="article">
<div class="wrapper">
<p><a id='Chunk-options-1'></a></p>
<h1 id="chunk-options">Chunk options</h1>
<p>I've mostly followed <a href="http://yihui.name/knitr/options">Knitr</a>'s naming for chunk options, but not all options are implemented.</p>
<p>Options are separated using ";" and need to be valid Julia expressions. Example: A code chunk that saves and displays a 12 cm wide image and hides the source code:</p>
<div class="code"><pre><span></span><span class="o">&lt;&lt;</span><span class="n">fig_width</span><span class="o">=</span><span class="mi">5</span><span class="p">;</span> <span class="n">echo</span><span class="o">=</span><span class="n">false</span> <span class="o">&gt;&gt;=</span>
<span class="k">using</span> <span class="n">Gadfly</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">linspace</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="n">π</span><span class="p">,</span> <span class="mi">200</span><span class="p">)</span>
<span class="n">plot</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">sin</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="n">Geom</span><span class="o">.</span><span class="n">line</span><span class="p">)</span>
<span class="p">@</span>
</pre></div>
<p>Weave currently supports the following chunk options with the following defaults:</p>
<p><a id='Options-for-code-1'></a></p>
<h2 id="options-for-code">Options for code</h2>
<ul>
<li><code>echo = true</code>. Echo the code in the output document. If <code>false</code> the source code will be hidden.</li>
<li><code>results = "markup"</code>. The output format of the printed results. "markup" for literal block, "hidden" for hidden results or anything else for raw output (I tend to use tex for Latex and rst for rest. Raw output is useful if you want to e.g. create tables from code chunks.</li>
<li><code>eval = true</code>. Evaluate the code chunk. If false the chunk wont be executed.</li>
<li><code>term=false</code>. If true the output emulates a REPL session. Otherwise only stdout and figures will be included in output.</li>
<li><code>label</code>. Chunk label, will be used for figure labels in Latex as fig:label</li>
<li><code>wrap = true</code>. Wrap long lines from output.</li>
<li><code>line_width = 75</code>. Line width for wrapped lines.</li>
<li><code>cache = false</code>. Cache results, depends on <code>cache</code> parameter on <code>weave</code> function.</li>
<li><code>hold = false</code>. Hold all results until the end of the chunk.</li>
<li><code>tangle = true</code>. Set tangle to false to exclude chunk from tangled code.</li>
</ul>
<p><a id='Options-for-figures-1'></a></p>
<h2 id="options-for-figures">Options for figures</h2>
<ul>
<li><code>fig_width</code>. Figure width defined in markup, default depends on the output format.</li>
<li><code>out_width</code>. Width of saved figure.</li>
<li><code>out_height</code>. Height of saved figure.</li>
<li><code>dpi</code>=96. Resolution of saved figures.</li>
<li><code>fig_cap</code>. Figure caption.</li>
<li><code>label</code>. Chunk label, will be used for figure labels in Latex as fig:label</li>
<li><code>fig_ext</code>. File extension (format) of saved figures.</li>
<li><code>fig_pos="htpb"</code>. Figure position in Latex.</li>
<li><code>fig_env="figure"</code>. Figure environment in Latex.</li>
</ul>
<p><a id='Set-default-chunk-options-1'></a></p>
<h2 id="set-default-chunk-options">Set default chunk options</h2>
<p>You can set or alter the default chunk options for a document either before running weave or inside the weaved document. You can e.g. use a hidden chunk in the beginning of the source document to set the options:</p>
<div class="code"><pre><span></span><span class="o">&lt;&lt;</span><span class="n">echo</span> <span class="o">=</span> <span class="n">false</span><span class="o">&gt;&gt;=</span>
<span class="k">import</span> <span class="n">Weave</span>
<span class="n">Weave</span><span class="o">.</span><span class="n">set_chunk_defaults</span><span class="p">(</span><span class="n">Dict</span><span class="p">{</span><span class="n">Symbol</span><span class="p">,</span> <span class="kt">Any</span><span class="p">}(</span>
<span class="p">:</span><span class="n">out_width</span> <span class="o">=&gt;</span> <span class="s">&quot;</span><span class="se">\\</span><span class="s">0.5linewidth&quot;</span><span class="p">,</span>
<span class="p">:</span><span class="n">results</span> <span class="o">=&gt;</span> <span class="s">&quot;tex&quot;</span>
<span class="p">))</span>
<span class="p">@</span>
</pre></div>
<div class="code"><pre><span></span>set_chunk_defaults(opts)
get_chunk_defaults()
restore_chunk_defaults()
</pre></div>
<aside class="copyright" role="note">
Matti Pastell 2016 &ndash;
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
<footer class="footer">
<nav class="pagination" aria-label="Footer">
<div class="previous">
<a href="../publish/" title="Publishing scripts">
<span class="direction">
Previous
</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
Publishing scripts
</div>
</div>
</div>
</a>
</div>
<div class="next">
<a href="../notebooks/" title="Working with Jupyter notebooks">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
Working with Jupyter notebooks
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
</div>
</nav>
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
<script>
var base_url = '..';
var repo_id = 'mpastell/Weave.jl';
</script>
<script src="../assets/javascripts/application-997097ee0c.js"></script>
<script src="../assets/mathjaxhelper.js"></script>
</body>
</html>

View File

@ -0,0 +1,316 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<title>Function index - Weave.jl - Scientific Reports Using Julia</title>
<meta name="author" content="Matti Pastell">
<meta property="og:url" content="None">
<meta property="og:title" content="Weave.jl - Scientific Reports Using Julia">
<meta property="og:image" content="None/../">
<meta name="apple-mobile-web-app-title" content="Weave.jl - Scientific Reports Using Julia">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<link rel="icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<style>
@font-face {
font-family: 'Icon';
src: url('../assets/fonts/icon.eot?52m981');
src: url('../assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('../assets/fonts/icon.woff?52m981')
format('woff'),
url('../assets/fonts/icon.ttf?52m981')
format('truetype'),
url('../assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="../assets/stylesheets/application-a422ff04cc.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono">
<style>
body, input {
font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace;
}
</style>
<link rel="stylesheet" href="../assets/Documenter.css">
<script src="../assets/javascripts/modernizr-4ab42b99fd.js"></script>
</head>
<body class=" ">
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<span class="path">
</span>
Function index
</div>
</div>
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
</header>
<main class="main">
<div class="drawer">
<nav aria-label="Navigation">
<a href="https://github.com/mpastell/Weave.jl" class="project">
<div class="banner">
<div class="name">
<strong>
Weave.jl - Scientific Reports Using Julia
<span class="version">
</span>
</strong>
<br>
mpastell/Weave.jl
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
<ul class="repo">
<li class="repo-download">
<a href="https://github.com/mpastell/Weave.jl/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="https://github.com/mpastell/Weave.jl/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
<div class="toc">
<ul>
<li>
<a class="" title="Home" href="..">
Home
</a>
</li>
<li>
<a class="" title="Getting started" href="../getting_started/">
Getting started
</a>
</li>
<li>
<a class="" title="Using Weave" href="../usage/">
Using Weave
</a>
</li>
<li>
<a class="" title="Publishing scripts" href="../publish/">
Publishing scripts
</a>
</li>
<li>
<a class="" title="Chunk options" href="../chunk_options/">
Chunk options
</a>
</li>
<li>
<a class="" title="Working with Jupyter notebooks" href="../notebooks/">
Working with Jupyter notebooks
</a>
</li>
<li>
<a class="current" title="Function index" href="./">
Function index
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</div>
<article class="article">
<div class="wrapper">
<p><a id='Function-index-1'></a></p>
<h1 id="function-index">Function index</h1>
<ul>
<li><a href="../notebooks/#Weave.convert_doc-Tuple{String,String}"><code>Weave.convert_doc</code></a></li>
<li><a href="../chunk_options/#Weave.get_chunk_defaults-Tuple{}"><code>Weave.get_chunk_defaults</code></a></li>
<li><a href="../usage/#Weave.list_out_formats-Tuple{}"><code>Weave.list_out_formats</code></a></li>
<li><a href="../chunk_options/#Weave.restore_chunk_defaults-Tuple{}"><code>Weave.restore_chunk_defaults</code></a></li>
<li><a href="../usage/#Weave.tangle-Tuple{Any}"><code>Weave.tangle</code></a></li>
<li><a href="../usage/#Weave.weave-Tuple{Any}"><code>Weave.weave</code></a></li>
</ul>
<aside class="copyright" role="note">
Matti Pastell 2016 &ndash;
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
<footer class="footer">
<nav class="pagination" aria-label="Footer">
<div class="previous">
<a href="../notebooks/" title="Working with Jupyter notebooks">
<span class="direction">
Previous
</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
Working with Jupyter notebooks
</div>
</div>
</div>
</a>
</div>
<div class="next">
</div>
</nav>
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
<script>
var base_url = '..';
var repo_id = 'mpastell/Weave.jl';
</script>
<script src="../assets/javascripts/application-997097ee0c.js"></script>
<script src="../assets/mathjaxhelper.js"></script>
</body>
</html>

View File

@ -0,0 +1,344 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<title>Getting started - Weave.jl - Scientific Reports Using Julia</title>
<meta name="author" content="Matti Pastell">
<meta property="og:url" content="None">
<meta property="og:title" content="Weave.jl - Scientific Reports Using Julia">
<meta property="og:image" content="None/../">
<meta name="apple-mobile-web-app-title" content="Weave.jl - Scientific Reports Using Julia">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<link rel="icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<style>
@font-face {
font-family: 'Icon';
src: url('../assets/fonts/icon.eot?52m981');
src: url('../assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('../assets/fonts/icon.woff?52m981')
format('woff'),
url('../assets/fonts/icon.ttf?52m981')
format('truetype'),
url('../assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="../assets/stylesheets/application-a422ff04cc.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono">
<style>
body, input {
font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace;
}
</style>
<link rel="stylesheet" href="../assets/Documenter.css">
<script src="../assets/javascripts/modernizr-4ab42b99fd.js"></script>
</head>
<body class=" ">
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<span class="path">
</span>
Getting started
</div>
</div>
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
</header>
<main class="main">
<div class="drawer">
<nav aria-label="Navigation">
<a href="https://github.com/mpastell/Weave.jl" class="project">
<div class="banner">
<div class="name">
<strong>
Weave.jl - Scientific Reports Using Julia
<span class="version">
</span>
</strong>
<br>
mpastell/Weave.jl
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
<ul class="repo">
<li class="repo-download">
<a href="https://github.com/mpastell/Weave.jl/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="https://github.com/mpastell/Weave.jl/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
<div class="toc">
<ul>
<li>
<a class="" title="Home" href="..">
Home
</a>
</li>
<li>
<a class="current" title="Getting started" href="./">
Getting started
</a>
</li>
<li>
<a class="" title="Using Weave" href="../usage/">
Using Weave
</a>
</li>
<li>
<a class="" title="Publishing scripts" href="../publish/">
Publishing scripts
</a>
</li>
<li>
<a class="" title="Chunk options" href="../chunk_options/">
Chunk options
</a>
</li>
<li>
<a class="" title="Working with Jupyter notebooks" href="../notebooks/">
Working with Jupyter notebooks
</a>
</li>
<li>
<a class="" title="Function index" href="../function_index/">
Function index
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</div>
<article class="article">
<div class="wrapper">
<p><a id='Getting-started-1'></a></p>
<h1 id="getting-started">Getting started</h1>
<p>The best way to get started using Weave.jl is to look at the example input and output documents. Examples for different formats are included in the packages <code>examples</code> directory.</p>
<p>First have a look at source document using markdown code chunks and Gadfly for figures: <a href="../examples/gadfly_md_sample.jmd">gadfly_md_sample.jmd</a> and then see the output in different formats:</p>
<ul>
<li>Pandoc markdown: <a href="../examples/gadfly_md_sample.txt">gadfly_md_sample.md</a></li>
<li>HTML: <a href="../examples/gadfly_md_sample.html">gadfly_md_sample.html</a></li>
<li>pdf: <a href="../examples/gadfly_md_sample.pdf">gadfly_md_sample.pdf</a></li>
</ul>
<p><em>Producing HTML and pdf output requires that you have Pandoc and XeLatex (for pdf) installed.</em></p>
<p>You can Weave the files to your working directory using:</p>
<div class="code"><pre><span></span><span class="k">using</span> <span class="n">Weave</span>
<span class="c">#Markdown</span>
<span class="n">weave</span><span class="p">(</span><span class="n">Pkg</span><span class="o">.</span><span class="n">dir</span><span class="p">(</span><span class="s">&quot;Weave&quot;</span><span class="p">,</span><span class="s">&quot;examples&quot;</span><span class="p">,</span><span class="s">&quot;gadfly_md_sample.jmd&quot;</span><span class="p">),</span> <span class="n">out_path</span> <span class="o">=</span> <span class="p">:</span><span class="n">pwd</span><span class="p">,</span>
<span class="n">doctype</span> <span class="o">=</span> <span class="s">&quot;pandoc&quot;</span><span class="p">)</span>
<span class="c">#HTML</span>
<span class="n">weave</span><span class="p">(</span><span class="n">Pkg</span><span class="o">.</span><span class="n">dir</span><span class="p">(</span><span class="s">&quot;Weave&quot;</span><span class="p">,</span><span class="s">&quot;examples&quot;</span><span class="p">,</span><span class="s">&quot;gadfly_md_sample.jmd&quot;</span><span class="p">),</span> <span class="n">out_path</span> <span class="o">=</span> <span class="p">:</span><span class="n">pwd</span><span class="p">,</span>
<span class="n">doctype</span> <span class="o">=</span> <span class="s">&quot;md2html&quot;</span><span class="p">)</span>
<span class="c">#pdf</span>
<span class="n">weave</span><span class="p">(</span><span class="n">Pkg</span><span class="o">.</span><span class="n">dir</span><span class="p">(</span><span class="s">&quot;Weave&quot;</span><span class="p">,</span><span class="s">&quot;examples&quot;</span><span class="p">,</span><span class="s">&quot;gadfly_md_sample.jmd&quot;</span><span class="p">),</span> <span class="n">out_path</span> <span class="o">=</span> <span class="p">:</span><span class="n">pwd</span><span class="p">,</span>
<span class="n">doctype</span> <span class="o">=</span> <span class="s">&quot;md2pdf&quot;</span><span class="p">)</span>
</pre></div>
<aside class="copyright" role="note">
Matti Pastell 2016 &ndash;
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
<footer class="footer">
<nav class="pagination" aria-label="Footer">
<div class="previous">
<a href=".." title="Home">
<span class="direction">
Previous
</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
Home
</div>
</div>
</div>
</a>
</div>
<div class="next">
<a href="../usage/" title="Using Weave">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
Using Weave
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
</div>
</nav>
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
<script>
var base_url = '..';
var repo_id = 'mpastell/Weave.jl';
</script>
<script src="../assets/javascripts/application-997097ee0c.js"></script>
<script src="../assets/mathjaxhelper.js"></script>
</body>
</html>

361
doc/site/index.html Normal file
View File

@ -0,0 +1,361 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<title>Weave.jl - Scientific Reports Using Julia</title>
<meta name="author" content="Matti Pastell">
<meta property="og:url" content="None">
<meta property="og:title" content="Weave.jl - Scientific Reports Using Julia">
<meta property="og:image" content="None/./">
<meta name="apple-mobile-web-app-title" content="Weave.jl - Scientific Reports Using Julia">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="./assets/images/favicon-e565ddfa3b.ico">
<link rel="icon" type="image/x-icon" href="./assets/images/favicon-e565ddfa3b.ico">
<style>
@font-face {
font-family: 'Icon';
src: url('./assets/fonts/icon.eot?52m981');
src: url('./assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('./assets/fonts/icon.woff?52m981')
format('woff'),
url('./assets/fonts/icon.ttf?52m981')
format('truetype'),
url('./assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="./assets/stylesheets/application-a422ff04cc.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono">
<style>
body, input {
font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace;
}
</style>
<link rel="stylesheet" href="./assets/Documenter.css">
<script src="./assets/javascripts/modernizr-4ab42b99fd.js"></script>
</head>
<body class=" ">
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<span class="path">
</span>
Weave.jl - Scientific Reports Using Julia
</div>
</div>
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
</header>
<main class="main">
<div class="drawer">
<nav aria-label="Navigation">
<a href="https://github.com/mpastell/Weave.jl" class="project">
<div class="banner">
<div class="name">
<strong>
Weave.jl - Scientific Reports Using Julia
<span class="version">
</span>
</strong>
<br>
mpastell/Weave.jl
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
<ul class="repo">
<li class="repo-download">
<a href="https://github.com/mpastell/Weave.jl/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="https://github.com/mpastell/Weave.jl/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
<div class="toc">
<ul>
<li>
<a class="current" title="Home" href=".">
Home
</a>
<ul>
<li class="anchor">
<a title="Contents" href="#contents">
Contents
</a>
</li>
</ul>
</li>
<li>
<a class="" title="Getting started" href="getting_started/">
Getting started
</a>
</li>
<li>
<a class="" title="Using Weave" href="usage/">
Using Weave
</a>
</li>
<li>
<a class="" title="Publishing scripts" href="publish/">
Publishing scripts
</a>
</li>
<li>
<a class="" title="Chunk options" href="chunk_options/">
Chunk options
</a>
</li>
<li>
<a class="" title="Working with Jupyter notebooks" href="notebooks/">
Working with Jupyter notebooks
</a>
</li>
<li>
<a class="" title="Function index" href="function_index/">
Function index
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</div>
<article class="article">
<div class="wrapper">
<p><a id='Intro-1'></a></p>
<h1 id="intro">Intro</h1>
<p>This is the documentation of <a href="http://github.com/mpastell/weave.jl">Weave.jl</a>. Weave is a scientific report generator/literate programming tool for Julia. It resembles <a href="http://mpastell.com/pweave">Pweave</a>, Knitr, rmarkdown and Sweave.</p>
<p><strong>Current features</strong></p>
<ul>
<li>Noweb, markdown or script syntax for input documents.</li>
<li>Execute code as terminal or "script" chunks.</li>
<li>Capture Plots, Gadfly, PyPlot and Winston figures.</li>
<li>Supports LaTex, Pandoc, Github markdown, MultiMarkdown, Asciidoc and reStructuredText output</li>
<li>Publish markdown directly to html and pdf using Pandoc.</li>
<li>Simple caching of results</li>
<li>Convert to and from IJulia notebooks</li>
</ul>
<p><img alt="Weave code and output" src="http://mpastell.com/images/weave_demo.png" /></p>
<p><a id='Contents-1'></a></p>
<h2 id="contents">Contents</h2>
<ul>
<li><a href="getting_started/#Getting-started-1">Getting started</a></li>
<li><a href="usage/#Using-Weave-1">Using Weave</a><ul>
<li><a href="usage/#Weave-1">Weave</a></li>
<li><a href="usage/#Weave-from-shell-1">Weave from shell</a></li>
<li><a href="usage/#Tangle-1">Tangle</a></li>
<li><a href="usage/#Supported-formats-1">Supported formats</a></li>
<li><a href="usage/#Document-syntax-1">Document syntax</a></li>
<li><a href="usage/#Noweb-1">Noweb</a></li>
<li><a href="usage/#Markdown-1">Markdown</a></li>
</ul>
</li>
<li><a href="publish/#Publishing-scripts-1">Publishing scripts</a><ul>
<li><a href="publish/#Other-mark-ups-with-scripts-1">Other mark ups with scripts</a></li>
</ul>
</li>
<li><a href="chunk_options/#Chunk-options-1">Chunk options</a><ul>
<li><a href="chunk_options/#Options-for-code-1">Options for code</a></li>
<li><a href="chunk_options/#Options-for-figures-1">Options for figures</a></li>
<li><a href="chunk_options/#Set-default-chunk-options-1">Set default chunk options</a></li>
</ul>
</li>
<li><a href="notebooks/#Working-with-Jupyter-notebooks-1">Working with Jupyter notebooks</a><ul>
<li><a href="notebooks/#Weaving-1">Weaving</a></li>
<li><a href="notebooks/#Converting-between-formats-1">Converting between formats</a></li>
</ul>
</li>
<li><a href="function_index/#Function-index-1">Function index</a></li>
</ul>
<aside class="copyright" role="note">
Matti Pastell 2016 &ndash;
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
<footer class="footer">
<nav class="pagination" aria-label="Footer">
<div class="previous">
</div>
<div class="next">
<a href="getting_started/" title="Getting started">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
Getting started
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
</div>
</nav>
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
<script>
var base_url = '.';
var repo_id = 'mpastell/Weave.jl';
</script>
<script src="./assets/javascripts/application-997097ee0c.js"></script>
<script src="./assets/mathjaxhelper.js"></script>
</body>
</html>

7
doc/site/mkdocs/js/lunr.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
doc/site/mkdocs/js/mustache.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,36 @@
/*
RequireJS 2.1.16 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function T(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function t(b,c){return fa.call(b,c)}function m(b,c){return t(b,c)&&b[c]}function B(b,c){for(var d in b)if(t(b,d)&&c(b[d],d))break}function U(b,c,d,e){c&&B(c,function(c,g){if(d||!t(b,g))e&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
RegExp)?(b[g]||(b[g]={}),U(b[g],c,d,e)):b[g]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function ca(b){throw b;}function da(b){if(!b)return b;var c=ba;v(b.split("."),function(b){c=c[b]});return c}function C(b,c,d,e){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=e;d&&(c.originalError=d);return c}function ga(b){function c(a,k,b){var f,l,c,d,e,g,i,p,k=k&&k.split("/"),h=j.map,n=h&&h["*"];if(a){a=a.split("/");l=a.length-1;j.nodeIdCompat&&
Q.test(a[l])&&(a[l]=a[l].replace(Q,""));"."===a[0].charAt(0)&&k&&(l=k.slice(0,k.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)if(d=l[c],"."===d)l.splice(c,1),c-=1;else if(".."===d&&!(0===c||1==c&&".."===l[2]||".."===l[c-1])&&0<c)l.splice(c-1,2),c-=2;a=a.join("/")}if(b&&h&&(k||n)){l=a.split("/");c=l.length;a:for(;0<c;c-=1){e=l.slice(0,c).join("/");if(k)for(d=k.length;0<d;d-=1)if(b=m(h,k.slice(0,d).join("/")))if(b=m(b,e)){f=b;g=c;break a}!i&&(n&&m(n,e))&&(i=m(n,e),p=c)}!f&&i&&(f=i,g=p);f&&(l.splice(0,
g,f),a=l.join("/"))}return(f=m(j.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(k){if(k.getAttribute("data-requiremodule")===a&&k.getAttribute("data-requirecontext")===i.contextName)return k.parentNode.removeChild(k),!0})}function e(a){var k=m(j.paths,a);if(k&&H(k)&&1<k.length)return k.shift(),i.require.undef(a),i.makeRequire(null,{skipMap:!0})([a]),!0}function n(a){var k,c=a?a.indexOf("!"):-1;-1<c&&(k=a.substring(0,c),a=a.substring(c+1,a.length));return[k,a]}function p(a,
k,b,f){var l,d,e=null,g=k?k.name:null,j=a,p=!0,h="";a||(p=!1,a="_@r"+(K+=1));a=n(a);e=a[0];a=a[1];e&&(e=c(e,g,f),d=m(r,e));a&&(e?h=d&&d.normalize?d.normalize(a,function(a){return c(a,g,f)}):-1===a.indexOf("!")?c(a,g,f):a:(h=c(a,g,f),a=n(h),e=a[0],h=a[1],b=!0,l=i.nameToUrl(h)));b=e&&!d&&!b?"_unnormalized"+(O+=1):"";return{prefix:e,name:h,parentMap:k,unnormalized:!!b,url:l,originalName:j,isDefine:p,id:(e?e+"!"+h:h)+b}}function s(a){var k=a.id,b=m(h,k);b||(b=h[k]=new i.Module(a));return b}function q(a,
k,b){var f=a.id,c=m(h,f);if(t(r,f)&&(!c||c.defineEmitComplete))"defined"===k&&b(r[f]);else if(c=s(a),c.error&&"error"===k)b(c.error);else c.on(k,b)}function w(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(v(c,function(b){if(b=m(h,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)g.onError(a)}function x(){R.length&&(ha.apply(A,[A.length,0].concat(R)),R=[])}function y(a){delete h[a];delete V[a]}function F(a,b,c){var f=a.map.id;a.error?a.emit("error",a.error):(b[f]=!0,v(a.depMaps,function(f,
d){var e=f.id,g=m(h,e);g&&(!a.depMatched[d]&&!c[e])&&(m(b,e)?(a.defineDep(d,r[e]),a.check()):F(g,b,c))}),c[f]=!0)}function D(){var a,b,c=(a=1E3*j.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],l=[],g=!1,h=!0;if(!W){W=!0;B(V,function(a){var i=a.map,j=i.id;if(a.enabled&&(i.isDefine||l.push(a),!a.error))if(!a.inited&&c)e(j)?g=b=!0:(f.push(j),d(j));else if(!a.inited&&(a.fetched&&i.isDefine)&&(g=!0,!i.prefix))return h=!1});if(c&&f.length)return a=C("timeout","Load timeout for modules: "+f,null,
f),a.contextName=i.contextName,w(a);h&&v(l,function(a){F(a,{},{})});if((!c||b)&&g)if((z||ea)&&!X)X=setTimeout(function(){X=0;D()},50);W=!1}}function E(a){t(r,a[0])||s(p(a[0],null,!0)).init(a[1],a[2])}function I(a){var a=a.currentTarget||a.srcElement,b=i.onScriptLoad;a.detachEvent&&!Y?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=i.onScriptError;(!a.detachEvent||Y)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function J(){var a;
for(x();A.length;){a=A.shift();if(null===a[0])return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}}var W,Z,i,L,X,j={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},h={},V={},$={},A=[],r={},S={},aa={},K=1,O=1;L={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?r[a.map.id]=a.exports:a.exports=r[a.map.id]={}},module:function(a){return a.module?
a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m(j.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};Z=function(a){this.events=m($,a.id)||{};this.map=a;this.shim=m(j.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Z.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=
c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
this.map.url;S[a]||(S[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&&
(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=
this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f);
if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval",
"fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b,
a);this.check()}));this.errback?q(a,"error",u(this,this.errback)):this.events.error&&q(a,"error",u(this,function(a){this.emit("error",a)}))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,
registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);
b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,
q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,
e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==e&&(!("."===k||".."===k)||1<e))d=b.substring(e,b.length),b=b.substring(0,e);return i.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return t(r,p(b,a,!1,!0).id)},specified:function(b){b=p(b,a,!1,!0).id;return t(r,b)||t(h,b)}});a||(j.undef=function(b){x();var c=p(b,a,!0),e=m(h,b);d(b);delete r[b];delete S[c.url];delete $[b];T(A,function(a,c){a[0]===b&&A.splice(c,1)});e&&(e.events.defined&&($[b]=e.events),y(b))});return j},enable:function(a){m(h,a.id)&&
s(a).enable()},completeLoad:function(a){var b,c,d=m(j.shim,a)||{},g=d.exports;for(x();A.length;){c=A.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=m(h,a);if(!b&&!t(r,a)&&c&&!c.inited){if(j.enforceDefine&&(!g||!da(g)))return e(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));E([a,d.deps||[],d.exportsFn])}D()},nameToUrl:function(a,b,c){var d,e,h;(d=m(j.pkgs,a))&&(a=d);if(d=m(aa,a))return i.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=a+(b||"");else{d=j.paths;
a=a.split("/");for(e=a.length;0<e;e-=1)if(h=a.slice(0,e).join("/"),h=m(d,h)){H(h)&&(h=h[0]);a.splice(0,e,h);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":j.baseUrl)+d}return j.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+j.urlArgs):d},load:function(a,b){g.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ja.test((a.currentTarget||a.srcElement).readyState))N=null,a=I(a),i.completeLoad(a.id)},
onScriptError:function(a){var b=I(a);if(!e(b.id))return w(C("scripterror","Script error for: "+b.id,a,[b.id]))}};i.require=i.makeRequire();return i}var g,x,y,D,I,E,N,J,s,O,ka=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,la=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ia=/^\.\//;x=Object.prototype;var K=x.toString,fa=x.hasOwnProperty,ha=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),ea=!z&&"undefined"!==typeof importScripts,ja=
z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Y="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},q={},R=[],M=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(q=require,require=void 0);g=requirejs=function(b,c,d,e){var n,p="_";!H(b)&&"string"!==typeof b&&(n=b,H(c)?(b=c,c=d,d=e):b=[]);n&&n.context&&(p=n.context);(e=m(F,p))||(e=F[p]=g.s.newContext(p));
n&&e.configure(n);return e.require(b,c,d)};g.config=function(b){return g(b)};g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.1.16";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=z;x=g.s={contexts:F,newContext:ga};g({});v(["toUrl","undef","defined","specified"],function(b){g[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))y=
x.head=D.parentNode;g.onError=ca;g.createNode=function(b){var c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var e=b&&b.config||{};if(z)return e=g.createNode(e,c,d),e.setAttribute("data-requirecontext",b.contextName),e.setAttribute("data-requiremodule",c),e.attachEvent&&!(e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code"))&&
!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),
s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===
b.readyState)return N=b}),e=N;e&&(b||(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this);

View File

@ -0,0 +1,4 @@
<article>
<h3><a href="{{location}}">{{title}}</a></h3>
<p>{{summary}}</p>
</article>

View File

@ -0,0 +1,88 @@
require([
base_url + '/mkdocs/js/mustache.min.js',
base_url + '/mkdocs/js/lunr.min.js',
'text!search-results-template.mustache',
'text!../search_index.json',
], function (Mustache, lunr, results_template, data) {
"use strict";
function getSearchTerm()
{
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
{
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == 'q')
{
return decodeURIComponent(sParameterName[1].replace(/\+/g, '%20'));
}
}
}
var index = lunr(function () {
this.field('title', {boost: 10});
this.field('text');
this.ref('location');
});
data = JSON.parse(data);
var documents = {};
for (var i=0; i < data.docs.length; i++){
var doc = data.docs[i];
doc.location = base_url + doc.location;
index.add(doc);
documents[doc.location] = doc;
}
var search = function(){
var query = document.getElementById('mkdocs-search-query').value;
var search_results = document.getElementById("mkdocs-search-results");
while (search_results.firstChild) {
search_results.removeChild(search_results.firstChild);
}
if(query === ''){
return;
}
var results = index.search(query);
if (results.length > 0){
for (var i=0; i < results.length; i++){
var result = results[i];
doc = documents[result.ref];
doc.base_url = base_url;
doc.summary = doc.text.substring(0, 200);
var html = Mustache.to_html(results_template, doc);
search_results.insertAdjacentHTML('beforeend', html);
}
} else {
search_results.insertAdjacentHTML('beforeend', "<p>No results found</p>");
}
if(jQuery){
/*
* We currently only automatically hide bootstrap models. This
* requires jQuery to work.
*/
jQuery('#mkdocs_search_modal a').click(function(){
jQuery('#mkdocs_search_modal').modal('hide');
});
}
};
var search_input = document.getElementById('mkdocs-search-query');
var term = getSearchTerm();
if (term){
search_input.value = term;
search();
}
search_input.addEventListener("keyup", search);
});

390
doc/site/mkdocs/js/text.js Normal file
View File

@ -0,0 +1,390 @@
/**
* @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
/*jslint regexp: true */
/*global require, XMLHttpRequest, ActiveXObject,
define, window, process, Packages,
java, location, Components, FileUtils */
define(['module'], function (module) {
'use strict';
var text, fs, Cc, Ci, xpcIsWindows,
progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
bodyRegExp = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,
hasLocation = typeof location !== 'undefined' && location.href,
defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\:/, ''),
defaultHostName = hasLocation && location.hostname,
defaultPort = hasLocation && (location.port || undefined),
buildMap = {},
masterConfig = (module.config && module.config()) || {};
text = {
version: '2.0.12',
strip: function (content) {
//Strips <?xml ...?> declarations so that external SVG and XML
//documents can be added to a document without worry. Also, if the string
//is an HTML document, only the part inside the body tag is returned.
if (content) {
content = content.replace(xmlRegExp, "");
var matches = content.match(bodyRegExp);
if (matches) {
content = matches[1];
}
} else {
content = "";
}
return content;
},
jsEscape: function (content) {
return content.replace(/(['\\])/g, '\\$1')
.replace(/[\f]/g, "\\f")
.replace(/[\b]/g, "\\b")
.replace(/[\n]/g, "\\n")
.replace(/[\t]/g, "\\t")
.replace(/[\r]/g, "\\r")
.replace(/[\u2028]/g, "\\u2028")
.replace(/[\u2029]/g, "\\u2029");
},
createXhr: masterConfig.createXhr || function () {
//Would love to dump the ActiveX crap in here. Need IE 6 to die first.
var xhr, i, progId;
if (typeof XMLHttpRequest !== "undefined") {
return new XMLHttpRequest();
} else if (typeof ActiveXObject !== "undefined") {
for (i = 0; i < 3; i += 1) {
progId = progIds[i];
try {
xhr = new ActiveXObject(progId);
} catch (e) {}
if (xhr) {
progIds = [progId]; // so faster next time
break;
}
}
}
return xhr;
},
/**
* Parses a resource name into its component parts. Resource names
* look like: module/name.ext!strip, where the !strip part is
* optional.
* @param {String} name the resource name
* @returns {Object} with properties "moduleName", "ext" and "strip"
* where strip is a boolean.
*/
parseName: function (name) {
var modName, ext, temp,
strip = false,
index = name.indexOf("."),
isRelative = name.indexOf('./') === 0 ||
name.indexOf('../') === 0;
if (index !== -1 && (!isRelative || index > 1)) {
modName = name.substring(0, index);
ext = name.substring(index + 1, name.length);
} else {
modName = name;
}
temp = ext || modName;
index = temp.indexOf("!");
if (index !== -1) {
//Pull off the strip arg.
strip = temp.substring(index + 1) === "strip";
temp = temp.substring(0, index);
if (ext) {
ext = temp;
} else {
modName = temp;
}
}
return {
moduleName: modName,
ext: ext,
strip: strip
};
},
xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
/**
* Is an URL on another domain. Only works for browser use, returns
* false in non-browser environments. Only used to know if an
* optimized .js version of a text resource should be loaded
* instead.
* @param {String} url
* @returns Boolean
*/
useXhr: function (url, protocol, hostname, port) {
var uProtocol, uHostName, uPort,
match = text.xdRegExp.exec(url);
if (!match) {
return true;
}
uProtocol = match[2];
uHostName = match[3];
uHostName = uHostName.split(':');
uPort = uHostName[1];
uHostName = uHostName[0];
return (!uProtocol || uProtocol === protocol) &&
(!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
((!uPort && !uHostName) || uPort === port);
},
finishLoad: function (name, strip, content, onLoad) {
content = strip ? text.strip(content) : content;
if (masterConfig.isBuild) {
buildMap[name] = content;
}
onLoad(content);
},
load: function (name, req, onLoad, config) {
//Name has format: some.module.filext!strip
//The strip part is optional.
//if strip is present, then that means only get the string contents
//inside a body tag in an HTML string. For XML/SVG content it means
//removing the <?xml ...?> declarations so the content can be inserted
//into the current doc without problems.
// Do not bother with the work if a build and text will
// not be inlined.
if (config && config.isBuild && !config.inlineText) {
onLoad();
return;
}
masterConfig.isBuild = config && config.isBuild;
var parsed = text.parseName(name),
nonStripName = parsed.moduleName +
(parsed.ext ? '.' + parsed.ext : ''),
url = req.toUrl(nonStripName),
useXhr = (masterConfig.useXhr) ||
text.useXhr;
// Do not load if it is an empty: url
if (url.indexOf('empty:') === 0) {
onLoad();
return;
}
//Load the text. Use XHR if possible and in a browser.
if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {
text.get(url, function (content) {
text.finishLoad(name, parsed.strip, content, onLoad);
}, function (err) {
if (onLoad.error) {
onLoad.error(err);
}
});
} else {
//Need to fetch the resource across domains. Assume
//the resource has been optimized into a JS module. Fetch
//by the module name + extension, but do not include the
//!strip part to avoid file system issues.
req([nonStripName], function (content) {
text.finishLoad(parsed.moduleName + '.' + parsed.ext,
parsed.strip, content, onLoad);
});
}
},
write: function (pluginName, moduleName, write, config) {
if (buildMap.hasOwnProperty(moduleName)) {
var content = text.jsEscape(buildMap[moduleName]);
write.asModule(pluginName + "!" + moduleName,
"define(function () { return '" +
content +
"';});\n");
}
},
writeFile: function (pluginName, moduleName, req, write, config) {
var parsed = text.parseName(moduleName),
extPart = parsed.ext ? '.' + parsed.ext : '',
nonStripName = parsed.moduleName + extPart,
//Use a '.js' file name so that it indicates it is a
//script that can be loaded across domains.
fileName = req.toUrl(parsed.moduleName + extPart) + '.js';
//Leverage own load() method to load plugin value, but only
//write out values that do not have the strip argument,
//to avoid any potential issues with ! in file names.
text.load(nonStripName, req, function (value) {
//Use own write() method to construct full module value.
//But need to create shell that translates writeFile's
//write() to the right interface.
var textWrite = function (contents) {
return write(fileName, contents);
};
textWrite.asModule = function (moduleName, contents) {
return write.asModule(moduleName, fileName, contents);
};
text.write(pluginName, nonStripName, textWrite, config);
}, config);
}
};
if (masterConfig.env === 'node' || (!masterConfig.env &&
typeof process !== "undefined" &&
process.versions &&
!!process.versions.node &&
!process.versions['node-webkit'])) {
//Using special require.nodeRequire, something added by r.js.
fs = require.nodeRequire('fs');
text.get = function (url, callback, errback) {
try {
var file = fs.readFileSync(url, 'utf8');
//Remove BOM (Byte Mark Order) from utf8 files if it is there.
if (file.indexOf('\uFEFF') === 0) {
file = file.substring(1);
}
callback(file);
} catch (e) {
if (errback) {
errback(e);
}
}
};
} else if (masterConfig.env === 'xhr' || (!masterConfig.env &&
text.createXhr())) {
text.get = function (url, callback, errback, headers) {
var xhr = text.createXhr(), header;
xhr.open('GET', url, true);
//Allow plugins direct access to xhr headers
if (headers) {
for (header in headers) {
if (headers.hasOwnProperty(header)) {
xhr.setRequestHeader(header.toLowerCase(), headers[header]);
}
}
}
//Allow overrides specified in config
if (masterConfig.onXhr) {
masterConfig.onXhr(xhr, url);
}
xhr.onreadystatechange = function (evt) {
var status, err;
//Do not explicitly handle errors, those should be
//visible via console output in the browser.
if (xhr.readyState === 4) {
status = xhr.status || 0;
if (status > 399 && status < 600) {
//An http 4xx or 5xx error. Signal an error.
err = new Error(url + ' HTTP status: ' + status);
err.xhr = xhr;
if (errback) {
errback(err);
}
} else {
callback(xhr.responseText);
}
if (masterConfig.onXhrComplete) {
masterConfig.onXhrComplete(xhr, url);
}
}
};
xhr.send(null);
};
} else if (masterConfig.env === 'rhino' || (!masterConfig.env &&
typeof Packages !== 'undefined' && typeof java !== 'undefined')) {
//Why Java, why is this so awkward?
text.get = function (url, callback) {
var stringBuffer, line,
encoding = "utf-8",
file = new java.io.File(url),
lineSeparator = java.lang.System.getProperty("line.separator"),
input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),
content = '';
try {
stringBuffer = new java.lang.StringBuffer();
line = input.readLine();
// Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
// http://www.unicode.org/faq/utf_bom.html
// Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK:
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
if (line && line.length() && line.charAt(0) === 0xfeff) {
// Eat the BOM, since we've already found the encoding on this file,
// and we plan to concatenating this buffer with others; the BOM should
// only appear at the top of a file.
line = line.substring(1);
}
if (line !== null) {
stringBuffer.append(line);
}
while ((line = input.readLine()) !== null) {
stringBuffer.append(lineSeparator);
stringBuffer.append(line);
}
//Make sure we return a JavaScript string and not a Java string.
content = String(stringBuffer.toString()); //String
} finally {
input.close();
}
callback(content);
};
} else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
typeof Components !== 'undefined' && Components.classes &&
Components.interfaces)) {
//Avert your gaze!
Cc = Components.classes;
Ci = Components.interfaces;
Components.utils['import']('resource://gre/modules/FileUtils.jsm');
xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);
text.get = function (url, callback) {
var inStream, convertStream, fileObj,
readData = {};
if (xpcIsWindows) {
url = url.replace(/\//g, '\\');
}
fileObj = new FileUtils.File(url);
//XPCOM, you so crazy
try {
inStream = Cc['@mozilla.org/network/file-input-stream;1']
.createInstance(Ci.nsIFileInputStream);
inStream.init(fileObj, 1, 0, false);
convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
.createInstance(Ci.nsIConverterInputStream);
convertStream.init(inStream, "utf-8", inStream.available(),
Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
convertStream.readString(inStream.available(), readData);
convertStream.close();
inStream.close();
callback(readData.value);
} catch (e) {
throw new Error((fileObj && fileObj.path || '') + ': ' + e);
}
};
}
return text;
});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,370 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<title>Working with Jupyter notebooks - Weave.jl - Scientific Reports Using Julia</title>
<meta name="author" content="Matti Pastell">
<meta property="og:url" content="None">
<meta property="og:title" content="Weave.jl - Scientific Reports Using Julia">
<meta property="og:image" content="None/../">
<meta name="apple-mobile-web-app-title" content="Weave.jl - Scientific Reports Using Julia">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<link rel="icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<style>
@font-face {
font-family: 'Icon';
src: url('../assets/fonts/icon.eot?52m981');
src: url('../assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('../assets/fonts/icon.woff?52m981')
format('woff'),
url('../assets/fonts/icon.ttf?52m981')
format('truetype'),
url('../assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="../assets/stylesheets/application-a422ff04cc.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono">
<style>
body, input {
font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace;
}
</style>
<link rel="stylesheet" href="../assets/Documenter.css">
<script src="../assets/javascripts/modernizr-4ab42b99fd.js"></script>
</head>
<body class=" ">
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<span class="path">
</span>
Working with Jupyter notebooks
</div>
</div>
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
</header>
<main class="main">
<div class="drawer">
<nav aria-label="Navigation">
<a href="https://github.com/mpastell/Weave.jl" class="project">
<div class="banner">
<div class="name">
<strong>
Weave.jl - Scientific Reports Using Julia
<span class="version">
</span>
</strong>
<br>
mpastell/Weave.jl
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
<ul class="repo">
<li class="repo-download">
<a href="https://github.com/mpastell/Weave.jl/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="https://github.com/mpastell/Weave.jl/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
<div class="toc">
<ul>
<li>
<a class="" title="Home" href="..">
Home
</a>
</li>
<li>
<a class="" title="Getting started" href="../getting_started/">
Getting started
</a>
</li>
<li>
<a class="" title="Using Weave" href="../usage/">
Using Weave
</a>
</li>
<li>
<a class="" title="Publishing scripts" href="../publish/">
Publishing scripts
</a>
</li>
<li>
<a class="" title="Chunk options" href="../chunk_options/">
Chunk options
</a>
</li>
<li>
<a class="current" title="Working with Jupyter notebooks" href="./">
Working with Jupyter notebooks
</a>
<ul>
<li class="anchor">
<a title="Weaving" href="#weaving">
Weaving
</a>
</li>
<li class="anchor">
<a title="Converting between formats" href="#converting-between-formats">
Converting between formats
</a>
</li>
</ul>
</li>
<li>
<a class="" title="Function index" href="../function_index/">
Function index
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</div>
<article class="article">
<div class="wrapper">
<p><a id='Working-with-Jupyter-notebooks-1'></a></p>
<h1 id="working-with-jupyter-notebooks">Working with Jupyter notebooks</h1>
<p><a id='Weaving-1'></a></p>
<h2 id="weaving">Weaving</h2>
<p>Weave supports using Jupyter notebooks as input format, this means you can weave notebooks to any supported formats. You can't use chunk options with notebooks.</p>
<div class="code"><pre><span></span><span class="n">weave</span><span class="p">(</span><span class="s">&quot;notebook.ipynb&quot;</span><span class="p">)</span>
</pre></div>
<p>In order to output notebooks from other formats you need to convert the document to a notebook and run the code using IJulia.</p>
<p><a id='Converting-between-formats-1'></a></p>
<h2 id="converting-between-formats">Converting between formats</h2>
<p>You can convert between all supported input formats using the <code>convert_doc</code> function.</p>
<p>To convert from script to notebook:</p>
<div class="code"><pre><span></span><span class="n">convert_doc</span><span class="p">(</span><span class="s">&quot;examples/FIR_design.jl&quot;</span><span class="p">,</span> <span class="s">&quot;FIR_design.ipynb&quot;</span><span class="p">)</span>
</pre></div>
<p>and from notebooks to markdown use:</p>
<div class="code"><pre><span></span><span class="n">convert_doc</span><span class="p">(</span><span class="s">&quot;FIR_design.ipynb&quot;</span><span class="p">,</span> <span class="s">&quot;FIR_design.jmd&quot;</span><span class="p">)</span>
</pre></div>
<p><a id='Weave.convert_doc-Tuple{String,String}' href='#Weave.convert_doc-Tuple{String,String}'>#</a>
<strong><code>Weave.convert_doc</code></strong> &mdash; <em>Method</em>.</p>
<p><code>convert_doc(infile::AbstractString, outfile::AbstractString; format = nothing)</code></p>
<p>Convert Weave documents between different formats</p>
<ul>
<li><code>infile</code> = Name of the input document</li>
<li><code>outfile</code> = Name of the output document</li>
<li><code>format</code> = Output format (optional). Detected from outfile extension, but can be set to <code>"script"</code>, <code>"markdown"</code>, <code>"notebook"</code> or <code>"noweb"</code>.</li>
</ul>
<aside class="copyright" role="note">
Matti Pastell 2016 &ndash;
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
<footer class="footer">
<nav class="pagination" aria-label="Footer">
<div class="previous">
<a href="../chunk_options/" title="Chunk options">
<span class="direction">
Previous
</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
Chunk options
</div>
</div>
</div>
</a>
</div>
<div class="next">
<a href="../function_index/" title="Function index">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
Function index
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
</div>
</nav>
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
<script>
var base_url = '..';
var repo_id = 'mpastell/Weave.jl';
</script>
<script src="../assets/javascripts/application-997097ee0c.js"></script>
<script src="../assets/mathjaxhelper.js"></script>
</body>
</html>

349
doc/site/publish/index.html Normal file
View File

@ -0,0 +1,349 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<title>Publishing scripts - Weave.jl - Scientific Reports Using Julia</title>
<meta name="author" content="Matti Pastell">
<meta property="og:url" content="None">
<meta property="og:title" content="Weave.jl - Scientific Reports Using Julia">
<meta property="og:image" content="None/../">
<meta name="apple-mobile-web-app-title" content="Weave.jl - Scientific Reports Using Julia">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<link rel="icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<style>
@font-face {
font-family: 'Icon';
src: url('../assets/fonts/icon.eot?52m981');
src: url('../assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('../assets/fonts/icon.woff?52m981')
format('woff'),
url('../assets/fonts/icon.ttf?52m981')
format('truetype'),
url('../assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="../assets/stylesheets/application-a422ff04cc.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono">
<style>
body, input {
font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace;
}
</style>
<link rel="stylesheet" href="../assets/Documenter.css">
<script src="../assets/javascripts/modernizr-4ab42b99fd.js"></script>
</head>
<body class=" ">
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<span class="path">
</span>
Publishing scripts
</div>
</div>
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
</header>
<main class="main">
<div class="drawer">
<nav aria-label="Navigation">
<a href="https://github.com/mpastell/Weave.jl" class="project">
<div class="banner">
<div class="name">
<strong>
Weave.jl - Scientific Reports Using Julia
<span class="version">
</span>
</strong>
<br>
mpastell/Weave.jl
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
<ul class="repo">
<li class="repo-download">
<a href="https://github.com/mpastell/Weave.jl/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="https://github.com/mpastell/Weave.jl/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
<div class="toc">
<ul>
<li>
<a class="" title="Home" href="..">
Home
</a>
</li>
<li>
<a class="" title="Getting started" href="../getting_started/">
Getting started
</a>
</li>
<li>
<a class="" title="Using Weave" href="../usage/">
Using Weave
</a>
</li>
<li>
<a class="current" title="Publishing scripts" href="./">
Publishing scripts
</a>
<ul>
<li class="anchor">
<a title="Other mark ups with scripts" href="#other-mark-ups-with-scripts">
Other mark ups with scripts
</a>
</li>
</ul>
</li>
<li>
<a class="" title="Chunk options" href="../chunk_options/">
Chunk options
</a>
</li>
<li>
<a class="" title="Working with Jupyter notebooks" href="../notebooks/">
Working with Jupyter notebooks
</a>
</li>
<li>
<a class="" title="Function index" href="../function_index/">
Function index
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</div>
<article class="article">
<div class="wrapper">
<p><a id='Publishing-scripts-1'></a></p>
<h1 id="publishing-scripts">Publishing scripts</h1>
<p>You can also also publish html and pdf documents from Julia scripts with a specific format. Producing HTML and pdf output requires that you have Pandoc and XeLatex (for pdf) installed and in your path.</p>
<p>These scripts can be executed normally using Julia or published with Weave. Documentation is written in markdown in lines starting with <code>#'</code>, <code>#%%</code> or <code># %%</code>, and code is executed and results are included in the published document.</p>
<p>The format is identical to <a href="http://mpastell.com/pweave/pypublish.html">Pweave</a> and the concept is similar to publishing documents with MATLAB or using Knitr's <a href="http://yihui.name/knitr/demo/stitch/">spin</a>. Weave will remove the first empty space from each line of documentation.</p>
<p>All lines that are not documentation are treated as code. You can set chunk options using lines starting with <code>#+</code> just before code e.g. <code>#+ term=true</code>. See the example below for the markup.</p>
<p><a href="../examples/FIR_design.jl">FIR_design.jl</a>, <a href="../examples/FIR_design.html">FIR_design.html</a> , <a href="../examples/FIR_design.pdf">FIR_design.pdf</a>.</p>
<div class="code"><pre><span></span><span class="n">weave</span><span class="p">(</span><span class="s">&quot;FIR_design.jl&quot;</span><span class="p">)</span>
<span class="n">weave</span><span class="p">(</span><span class="s">&quot;FIR_design.jl&quot;</span><span class="p">,</span> <span class="n">docformat</span> <span class="o">=</span> <span class="s">&quot;md2pdf&quot;</span><span class="p">)</span>
</pre></div>
<p><a id='Other-mark-ups-with-scripts-1'></a></p>
<h2 id="other-mark-ups-with-scripts">Other mark ups with scripts</h2>
<p>You can also use any Weave supported format in the comments and set the output format as you would for noweb and markdown inputs. e.g for LaTeX you can use:</p>
<div class="code"><pre><span></span><span class="n">weave</span><span class="p">(</span><span class="s">&quot;latex_doc.jl&quot;</span><span class="p">,</span> <span class="n">docformat</span> <span class="o">=</span> <span class="s">&quot;texminted&quot;</span><span class="p">)</span>
</pre></div>
<aside class="copyright" role="note">
Matti Pastell 2016 &ndash;
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
<footer class="footer">
<nav class="pagination" aria-label="Footer">
<div class="previous">
<a href="../usage/" title="Using Weave">
<span class="direction">
Previous
</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
Using Weave
</div>
</div>
</div>
</a>
</div>
<div class="next">
<a href="../chunk_options/" title="Chunk options">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
Chunk options
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
</div>
</nav>
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
<script>
var base_url = '..';
var repo_id = 'mpastell/Weave.jl';
</script>
<script src="../assets/javascripts/application-997097ee0c.js"></script>
<script src="../assets/mathjaxhelper.js"></script>
</body>
</html>

60
doc/site/sitemap.xml Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>/</loc>
<lastmod>2016-12-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/getting_started/</loc>
<lastmod>2016-12-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/usage/</loc>
<lastmod>2016-12-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/publish/</loc>
<lastmod>2016-12-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/chunk_options/</loc>
<lastmod>2016-12-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/notebooks/</loc>
<lastmod>2016-12-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>/function_index/</loc>
<lastmod>2016-12-12</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

473
doc/site/usage/index.html Normal file
View File

@ -0,0 +1,473 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
<title>Using Weave - Weave.jl - Scientific Reports Using Julia</title>
<meta name="author" content="Matti Pastell">
<meta property="og:url" content="None">
<meta property="og:title" content="Weave.jl - Scientific Reports Using Julia">
<meta property="og:image" content="None/../">
<meta name="apple-mobile-web-app-title" content="Weave.jl - Scientific Reports Using Julia">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<link rel="icon" type="image/x-icon" href="../assets/images/favicon-e565ddfa3b.ico">
<style>
@font-face {
font-family: 'Icon';
src: url('../assets/fonts/icon.eot?52m981');
src: url('../assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('../assets/fonts/icon.woff?52m981')
format('woff'),
url('../assets/fonts/icon.ttf?52m981')
format('truetype'),
url('../assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="../assets/stylesheets/application-a422ff04cc.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono">
<style>
body, input {
font-family: 'Ubuntu', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace;
}
</style>
<link rel="stylesheet" href="../assets/Documenter.css">
<script src="../assets/javascripts/modernizr-4ab42b99fd.js"></script>
</head>
<body class=" ">
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
<span class="path">
</span>
Using Weave
</div>
</div>
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
</header>
<main class="main">
<div class="drawer">
<nav aria-label="Navigation">
<a href="https://github.com/mpastell/Weave.jl" class="project">
<div class="banner">
<div class="name">
<strong>
Weave.jl - Scientific Reports Using Julia
<span class="version">
</span>
</strong>
<br>
mpastell/Weave.jl
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
<ul class="repo">
<li class="repo-download">
<a href="https://github.com/mpastell/Weave.jl/archive/master.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="https://github.com/mpastell/Weave.jl/stargazers" target="_blank" title="Stargazers" data-action="star">
<i class="icon icon-star"></i> Stars
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
<div class="toc">
<ul>
<li>
<a class="" title="Home" href="..">
Home
</a>
</li>
<li>
<a class="" title="Getting started" href="../getting_started/">
Getting started
</a>
</li>
<li>
<a class="current" title="Using Weave" href="./">
Using Weave
</a>
<ul>
<li class="anchor">
<a title="Weave" href="#weave">
Weave
</a>
</li>
<li class="anchor">
<a title="Weave from shell" href="#weave-from-shell">
Weave from shell
</a>
</li>
<li class="anchor">
<a title="Tangle" href="#tangle">
Tangle
</a>
</li>
<li class="anchor">
<a title="Supported formats" href="#supported-formats">
Supported formats
</a>
</li>
<li class="anchor">
<a title="Document syntax" href="#document-syntax">
Document syntax
</a>
</li>
<li class="anchor">
<a title="Noweb" href="#noweb">
Noweb
</a>
</li>
<li class="anchor">
<a title="Markdown" href="#markdown">
Markdown
</a>
</li>
</ul>
</li>
<li>
<a class="" title="Publishing scripts" href="../publish/">
Publishing scripts
</a>
</li>
<li>
<a class="" title="Chunk options" href="../chunk_options/">
Chunk options
</a>
</li>
<li>
<a class="" title="Working with Jupyter notebooks" href="../notebooks/">
Working with Jupyter notebooks
</a>
</li>
<li>
<a class="" title="Function index" href="../function_index/">
Function index
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</div>
<article class="article">
<div class="wrapper">
<p><a id='Using-Weave-1'></a></p>
<h1 id="using-weave">Using Weave</h1>
<p>You can write your documentation and code in input document using Noweb or Markdown syntax and use <code>weave</code> function to execute to document to capture results and figures.</p>
<p><a id='Weave-1'></a></p>
<h2 id="weave">Weave</h2>
<p>Weave document with markup and julia code using Gadfly for plots, <code>out_path = :pwd</code> makes the results appear in the current working directory.</p>
<div class="code"><pre><span></span><span class="k">using</span> <span class="n">Weave</span>
<span class="n">weave</span><span class="p">(</span><span class="n">Pkg</span><span class="o">.</span><span class="n">dir</span><span class="p">(</span><span class="s">&quot;Weave&quot;</span><span class="p">,</span><span class="s">&quot;examples&quot;</span><span class="p">,</span><span class="s">&quot;gadfly_sample.mdw&quot;</span><span class="p">),</span> <span class="n">out_path</span> <span class="o">=</span> <span class="p">:</span><span class="n">pwd</span><span class="p">)</span>
</pre></div>
<p>Using PyPlot:</p>
<div class="code"><pre><span></span><span class="n">weave</span><span class="p">(</span><span class="n">Pkg</span><span class="o">.</span><span class="n">dir</span><span class="p">(</span><span class="s">&quot;Weave&quot;</span><span class="p">,</span><span class="s">&quot;examples&quot;</span><span class="p">,</span><span class="s">&quot;julia_sample.mdw&quot;</span><span class="p">),</span> <span class="n">plotlib</span><span class="o">=</span><span class="s">&quot;PyPlot&quot;</span><span class="p">,</span> <span class="n">out_path</span> <span class="o">=</span> <span class="p">:</span><span class="n">pwd</span><span class="p">)</span>
</pre></div>
<p><a id='Weave.weave-Tuple{Any}' href='#Weave.weave-Tuple{Any}'>#</a>
<strong><code>Weave.weave</code></strong> &mdash; <em>Method</em>.</p>
<p><code>function weave(source ; doctype = :auto, plotlib="Gadfly", informat=:auto, out_path=:doc, fig_path = "figures", fig_ext = nothing, cache_path = "cache", cache=:off)</code></p>
<p>Weave an input document to output file.</p>
<ul>
<li><code>doctype</code>: :auto = set based on file extension or specify one of the supported formats. See <code>list_out_formats()</code></li>
<li><code>plotlib</code>: <code>"PyPlot"</code>, <code>"Gadfly"</code> or <code>nothing</code></li>
<li><code>informat</code>: :auto = set based on file extension or set to <code>"noweb"</code>, <code>"markdown"</code> or <code>script</code></li>
<li><code>out_path</code>: Path where the output is generated. Can be: <code>:doc</code>: Path of the source document, <code>:pwd</code>: Julia working directory, <code>"somepath"</code>: output directory as a String e.g <code>"/home/mpastell/weaveout"</code> or filename as string e.g. ~/outpath/outfile.tex.</li>
<li><code>fig_path</code>: where figures will be generated, relative to out_path</li>
<li><code>fig_ext</code>: Extension for saved figures e.g. <code>".pdf"</code>, <code>".png"</code>. Default setting depends on <code>doctype</code>.</li>
<li><code>cache_path</code>: where of cached output will be saved.</li>
<li><code>cache</code>: controls caching of code: <code>:off</code> = no caching, <code>:all</code> = cache everything, <code>:user</code> = cache based on chunk options, <code>:refresh</code>, run all code chunks and save new cache.</li>
</ul>
<p><strong>Note:</strong> Run Weave from terminal and not using IJulia, Juno or ESS, they tend to mess with capturing output.</p>
<p><a id='Weave-from-shell-1'></a></p>
<h2 id="weave-from-shell">Weave from shell</h2>
<p>You can also use the <code>weave.jl</code> script under bin directory to weave documents from the shell:</p>
<div class="code"><pre><span></span>$ ./weave.jl
usage: weave.jl <span class="o">[</span>--doctype DOCTYPE<span class="o">]</span> <span class="o">[</span>--plotlib PLOTLIB<span class="o">]</span>
<span class="o">[</span>--informat INFORMAT<span class="o">]</span> <span class="o">[</span>--out_path OUT_PATH<span class="o">]</span>
<span class="o">[</span>--fig_path FIG_PATH<span class="o">]</span> <span class="o">[</span>--fig_ext FIG_EXT<span class="o">]</span> source...
</pre></div>
<p><a id='Tangle-1'></a></p>
<h2 id="tangle">Tangle</h2>
<p>Tangling extracts the code from document:</p>
<p><a id='Weave.tangle-Tuple{Any}' href='#Weave.tangle-Tuple{Any}'>#</a>
<strong><code>Weave.tangle</code></strong> &mdash; <em>Method</em>.</p>
<p><code>tangle(source ; out_path=:doc, informat="noweb")</code></p>
<p>Tangle source code from input document to .jl file.</p>
<ul>
<li><code>informat</code>: <code>"noweb"</code> of <code>"markdown"</code></li>
<li><code>out_path</code>: Path where the output is generated. Can be: <code>:doc</code>: Path of the source document, <code>:pwd</code>: Julia working directory, <code>"somepath"</code>, directory name as a string e.g <code>"/home/mpastell/weaveout"</code></li>
</ul>
<p>or filename as string e.g. ~/outpath/outfile.jl.</p>
<p><a id='Supported-formats-1'></a></p>
<h2 id="supported-formats">Supported formats</h2>
<p>Weave sets the output format based on the file extension, but you can also set it using <code>doctype</code> option. The rules for detecting the format are:</p>
<div class="code"><pre><span></span><span class="n">ext</span> <span class="o">==</span> <span class="s">&quot;.jl&quot;</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;md2html&quot;</span>
<span class="n">contains</span><span class="p">(</span><span class="n">ext</span><span class="p">,</span> <span class="s">&quot;.md&quot;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;md2html&quot;</span>
<span class="n">contains</span><span class="p">(</span><span class="n">ext</span><span class="p">,</span> <span class="s">&quot;.rst&quot;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;rst&quot;</span>
<span class="n">contains</span><span class="p">(</span><span class="n">ext</span><span class="p">,</span> <span class="s">&quot;.tex&quot;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;texminted&quot;</span>
<span class="n">contains</span><span class="p">(</span><span class="n">ext</span><span class="p">,</span> <span class="s">&quot;.txt&quot;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;asciidoc&quot;</span>
<span class="k">return</span> <span class="s">&quot;pandoc&quot;</span>
</pre></div>
<p>You can get a list of supported output formats:</p>
<div class="code"><pre><span></span><span class="n">julia</span><span class="o">&gt;</span> <span class="n">list_out_formats</span><span class="p">()</span>
<span class="n">pandoc</span><span class="p">:</span> <span class="n">Pandoc</span> <span class="n">markdown</span>
<span class="n">rst</span><span class="p">:</span> <span class="n">reStructuredText</span> <span class="n">and</span> <span class="n">Sphinx</span>
<span class="n">texminted</span><span class="p">:</span> <span class="n">Latex</span> <span class="k">using</span> <span class="n">minted</span> <span class="k">for</span> <span class="n">highlighting</span>
<span class="n">github</span><span class="p">:</span> <span class="n">Github</span> <span class="n">markdown</span>
<span class="n">md2html</span><span class="p">:</span> <span class="n">Markdown</span> <span class="n">to</span> <span class="n">HTML</span> <span class="p">(</span><span class="n">requires</span> <span class="n">Pandoc</span><span class="p">)</span>
<span class="n">md2pdf</span><span class="p">:</span> <span class="n">Markdown</span> <span class="n">to</span> <span class="n">pdf</span> <span class="p">(</span><span class="n">requires</span> <span class="n">Pandoc</span> <span class="n">and</span> <span class="n">xelatex</span><span class="p">)</span>
<span class="n">asciidoc</span><span class="p">:</span> <span class="n">AsciiDoc</span>
<span class="n">tex</span><span class="p">:</span> <span class="n">Latex</span> <span class="n">with</span> <span class="n">custom</span> <span class="n">code</span> <span class="n">environments</span>
</pre></div>
<p><a id='Weave.list_out_formats-Tuple{}' href='#Weave.list_out_formats-Tuple{}'>#</a>
<strong><code>Weave.list_out_formats</code></strong> &mdash; <em>Method</em>.</p>
<p><code>list_out_formats()</code></p>
<p>List supported output formats</p>
<p><a id='Document-syntax-1'></a></p>
<h2 id="document-syntax">Document syntax</h2>
<p>Weave uses noweb, markdown or script syntax for defining the code chunks and documentation chunks. You can also weave Jupyter notebooks. The format is detected based on the file extension, but you can also set it manually using the <code>informat</code> parameter.</p>
<p>The rules for autodetection are:</p>
<div class="code"><pre><span></span><span class="n">ext</span> <span class="o">==</span> <span class="s">&quot;.jl&quot;</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;script&quot;</span>
<span class="n">ext</span> <span class="o">==</span> <span class="s">&quot;.jmd&quot;</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;markdown&quot;</span>
<span class="n">ext</span> <span class="o">==</span> <span class="s">&quot;.ipynb&quot;</span> <span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="s">&quot;notebook&quot;</span>
<span class="k">return</span> <span class="s">&quot;noweb&quot;</span>
</pre></div>
<p><a id='Noweb-1'></a></p>
<h2 id="noweb">Noweb</h2>
<p><a id='Code-chunks-1'></a></p>
<h3 id="code-chunks">Code chunks</h3>
<p>start with a line marked with <code>&lt;&lt;&gt;&gt;=</code> or <code>&lt;&lt;options&gt;&gt;=</code> and end with line marked with <code>@</code>. The code between the start and end markers is executed and the output is captured to the output document. See for options below.</p>
<p><a id='Documentation-chunks-1'></a></p>
<h3 id="documentation-chunks">Documentation chunks</h3>
<p>Are the rest of the document (between <code>@</code> and <code>&lt;&lt;&gt;&gt;=</code> lines and the first chunk be default) and can be written with several different markup languages.</p>
<p><a href="https://github.com/mpastell/Weave.jl/blob/master/examples/julia_sample.mdw">Sample document</a></p>
<p><a id='Markdown-1'></a></p>
<h2 id="markdown">Markdown</h2>
<p>Markdown code chunks are defined using fenced code blocks. <a href="https://github.com/mpastell/Weave.jl/blob/master/examples/gadfly_md_sample.jmd">See sample document:</a></p>
<aside class="copyright" role="note">
Matti Pastell 2016 &ndash;
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
<footer class="footer">
<nav class="pagination" aria-label="Footer">
<div class="previous">
<a href="../getting_started/" title="Getting started">
<span class="direction">
Previous
</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
Getting started
</div>
</div>
</div>
</a>
</div>
<div class="next">
<a href="../publish/" title="Publishing scripts">
<span class="direction">
Next
</span>
<div class="page">
<div class="stretch">
<div class="title">
Publishing scripts
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
</div>
</nav>
</footer>
</div>
</article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
</div>
</div>
</div>
</main>
<script>
var base_url = '..';
var repo_id = 'mpastell/Weave.jl';
</script>
<script src="../assets/javascripts/application-997097ee0c.js"></script>
<script src="../assets/mathjaxhelper.js"></script>
</body>
</html>

133
examples/FIR_design.html Normal file

File diff suppressed because one or more lines are too long

111
examples/FIR_design.md Normal file
View File

@ -0,0 +1,111 @@
% FIR filter design with Julia
% Matti Pastell
% 21th April 2016
# Introduction
This an example of a julia script that can be published using
[Weave](http://mpastell.github.io/Weave.jl/latest/usage/).
The script can be executed normally using Julia
or published to HTML or pdf with Weave.
Text is written in markdown in lines starting with "`#'` " and code
is executed and results are included in the published document.
Notice that you don't need to define chunk options, but you can using
`#+`. just before code e.g. `#+ term=True, caption='Fancy plots.'`.
If you're viewing the published version have a look at the
[source](FIR_design.jl) to see the markup.
# FIR Filter Design
We'll implement lowpass, highpass and ' bandpass FIR filters. If
you want to read more about DSP I highly recommend [The Scientist
and Engineer's Guide to Digital Signal
Processing](http://www.dspguide.com/) which is freely available
online.
## Calculating frequency response
DSP.jl package doesn't (yet) have a method to calculate the
the frequency response of a FIR filter so we define it:
````julia
using Gadfly, DSP
function FIRfreqz(b::Array, w = linspace(0, π, 1024))
n = length(w)
h = Array{Complex64}(n)
sw = 0
for i = 1:n
for j = 1:length(b)
sw += b[j]*exp(-im*w[i])^-j
end
h[i] = sw
sw = 0
end
return h
end
````
## Design Lowpass FIR filter
Designing a lowpass FIR filter is very simple to do with DSP.jl, all you
need to do is to define the window length, cut off frequency and the
window. We will define a lowpass filter with cut off frequency at 5Hz for a signal
sampled at 20 Hz.
We will use the Hamming window, which is defined as:
$w(n) = \alpha - \beta\cos\frac{2\pi n}{N-1}$, where $\alpha=0.54$ and $\beta=0.46$
````julia
fs = 20
f = digitalfilter(Lowpass(5, fs = fs), FIRWindow(hamming(61)))
w = linspace(0, pi, 1024)
h = FIRfreqz(f, w)
````
## Plot the frequency and impulse response
The next code chunk is executed in term mode, see the [script](FIR_design.jl) for syntax.
````julia
julia>
h_db = log10(abs(h));
julia> ws = w/pi*(fs/2)
1024-element LinSpace{Float64}:
0.0,0.00977517,0.0195503,0.0293255,…,9.9609,9.97067,9.98045,9.99022,10.0
````
````julia
plot(y = h_db, x = ws, Geom.line,
Guide.xlabel("Frequency (Hz)"), Guide.ylabel("Magnitude (db)"))
````
![](figures/FIR_design_4_1.svg)\
And again with default options
````julia
h_phase = unwrap(-atan2(imag(h),real(h)))
plot(y = h_phase, x = ws, Geom.line,
Guide.xlabel("Frequency (Hz)"), Guide.ylabel("Phase (radians)"))
````
![](figures/FIR_design_5_1.svg)\

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,880 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with matplotlib (http://matplotlib.org/) -->
<svg height="432pt" version="1.1" viewBox="0 0 576 432" width="576pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
*{stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:100000;}
</style>
</defs>
<g id="figure_1">
<g id="patch_1">
<path d="M 0 432
L 576 432
L 576 0
L 0 0
z
" style="fill:#ffffff;"/>
</g>
<g id="axes_1">
<g id="patch_2">
<path d="M 72 388.8
L 518.4 388.8
L 518.4 43.2
L 72 43.2
z
" style="fill:#ffffff;"/>
</g>
<g id="line2d_1">
<path clip-path="url(#p515468138a)" d="M 72 86.4
L 76.047351 87.828329
L 80.094701 92.07934
L 84.142052 99.052066
L 88.189402 108.581405
L 92.236753 120.442783
L 96.284103 134.358478
L 100.331454 150.005416
L 104.378804 167.024188
L 108.426155 185.029035
L 112.473505 203.618467
L 116.520856 222.386223
L 120.568206 240.932224
L 124.615557 258.873195
L 128.662907 275.852652
L 132.710258 291.549947
L 136.757609 305.688125
L 140.804959 318.040365
L 144.85231 328.434841
L 148.89966 336.757872
L 152.947011 342.955298
L 156.994361 347.032082
L 161.041712 349.050167
L 165.089062 349.124702
L 169.136413 347.418784
L 173.183763 344.136902
L 177.231114 339.517326
L 181.278464 333.823705
L 185.325815 327.33613
L 189.373166 320.341994
L 193.420516 313.126912
L 197.467867 305.965995
L 201.515217 299.115755
L 205.562568 292.80687
L 209.609918 287.238026
L 213.657269 282.571004
L 217.704619 278.927125
L 221.75197 276.385147
L 225.79932 274.980623
L 229.846671 274.706712
L 233.894021 275.516362
L 237.941372 277.325753
L 241.988722 280.018849
L 246.036073 283.452875
L 250.083424 287.464493
L 254.130774 291.876459
L 258.178125 296.504512
L 262.225475 301.164254
L 266.272826 305.677785
L 270.320176 309.879864
L 274.367527 313.623411
L 278.414877 316.784165
L 282.462228 319.264364
L 286.509578 320.995359
L 290.556929 321.939079
L 294.604279 322.088357
L 298.65163 321.466118
L 302.698981 320.123504
L 306.746331 318.137033
L 310.793682 315.604917
L 314.841032 312.642704
L 318.888383 309.378416
L 322.935733 305.947381
L 326.983084 302.48694
L 331.030434 299.131246
L 335.077785 296.006331
L 339.125135 293.225609
L 343.172486 290.885987
L 347.219836 289.064691
L 351.267187 287.816917
L 355.314537 287.174367
L 359.361888 287.144709
L 363.409239 287.711943
L 367.456589 288.837652
L 371.50394 290.463059
L 375.55129 292.511795
L 379.598641 294.893265
L 383.645991 297.506456
L 387.693342 300.244055
L 391.740692 302.996691
L 395.788043 305.657164
L 399.835393 308.124481
L 403.882744 310.307563
L 407.930094 312.128492
L 411.977445 313.52518
L 416.024796 314.453376
L 420.072146 314.887946
L 424.119497 314.8234
L 428.166847 314.27366
L 432.214198 313.271087
L 436.261548 311.864832
L 440.308899 310.118577
L 444.356249 308.107775
L 448.4036 305.916486
L 452.45095 303.633968
L 456.498301 301.351125
L 460.545651 299.156967
L 464.593002 297.135225
L 468.640352 295.361221
L 472.687703 293.899138
" style="fill:none;stroke:#0000ff;stroke-linecap:square;"/>
</g>
<g id="patch_3">
<path d="M 72 388.8
L 72 43.2
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
</g>
<g id="patch_4">
<path d="M 72 43.2
L 518.4 43.2
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
</g>
<g id="patch_5">
<path d="M 518.4 388.8
L 518.4 43.2
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
</g>
<g id="patch_6">
<path d="M 72 388.8
L 518.4 388.8
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
</g>
<g id="matplotlib.axis_1">
<g id="xtick_1">
<g id="line2d_2">
<defs>
<path d="M 0 0
L 0 -4
" id="mef28f6589c" style="stroke:#000000;stroke-width:0.5;"/>
</defs>
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_3">
<defs>
<path d="M 0 0
L 0 4
" id="ma022cbbe4e" style="stroke:#000000;stroke-width:0.5;"/>
</defs>
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_1">
<!-- 0 -->
<defs>
<path d="M 31.78125 66.40625
Q 24.171875 66.40625 20.328125 58.90625
Q 16.5 51.421875 16.5 36.375
Q 16.5 21.390625 20.328125 13.890625
Q 24.171875 6.390625 31.78125 6.390625
Q 39.453125 6.390625 43.28125 13.890625
Q 47.125 21.390625 47.125 36.375
Q 47.125 51.421875 43.28125 58.90625
Q 39.453125 66.40625 31.78125 66.40625
M 31.78125 74.21875
Q 44.046875 74.21875 50.515625 64.515625
Q 56.984375 54.828125 56.984375 36.375
Q 56.984375 17.96875 50.515625 8.265625
Q 44.046875 -1.421875 31.78125 -1.421875
Q 19.53125 -1.421875 13.0625 8.265625
Q 6.59375 17.96875 6.59375 36.375
Q 6.59375 54.828125 13.0625 64.515625
Q 19.53125 74.21875 31.78125 74.21875
" id="BitstreamVeraSans-Roman-30"/>
</defs>
<g transform="translate(68.1825 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
</g>
</g>
</g>
<g id="xtick_2">
<g id="line2d_4">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="135.771428571" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_5">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="135.771428571" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_2">
<!-- 1 -->
<defs>
<path d="M 12.40625 8.296875
L 28.515625 8.296875
L 28.515625 63.921875
L 10.984375 60.40625
L 10.984375 69.390625
L 28.421875 72.90625
L 38.28125 72.90625
L 38.28125 8.296875
L 54.390625 8.296875
L 54.390625 0
L 12.40625 0
z
" id="BitstreamVeraSans-Roman-31"/>
</defs>
<g transform="translate(131.953928571 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-31"/>
</g>
</g>
</g>
<g id="xtick_3">
<g id="line2d_6">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="199.542857143" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_7">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="199.542857143" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_3">
<!-- 2 -->
<defs>
<path d="M 19.1875 8.296875
L 53.609375 8.296875
L 53.609375 0
L 7.328125 0
L 7.328125 8.296875
Q 12.9375 14.109375 22.625 23.890625
Q 32.328125 33.6875 34.8125 36.53125
Q 39.546875 41.84375 41.421875 45.53125
Q 43.3125 49.21875 43.3125 52.78125
Q 43.3125 58.59375 39.234375 62.25
Q 35.15625 65.921875 28.609375 65.921875
Q 23.96875 65.921875 18.8125 64.3125
Q 13.671875 62.703125 7.8125 59.421875
L 7.8125 69.390625
Q 13.765625 71.78125 18.9375 73
Q 24.125 74.21875 28.421875 74.21875
Q 39.75 74.21875 46.484375 68.546875
Q 53.21875 62.890625 53.21875 53.421875
Q 53.21875 48.921875 51.53125 44.890625
Q 49.859375 40.875 45.40625 35.40625
Q 44.1875 33.984375 37.640625 27.21875
Q 31.109375 20.453125 19.1875 8.296875
" id="BitstreamVeraSans-Roman-32"/>
</defs>
<g transform="translate(195.725357143 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-32"/>
</g>
</g>
</g>
<g id="xtick_4">
<g id="line2d_8">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="263.314285714" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_9">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="263.314285714" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_4">
<!-- 3 -->
<defs>
<path d="M 40.578125 39.3125
Q 47.65625 37.796875 51.625 33
Q 55.609375 28.21875 55.609375 21.1875
Q 55.609375 10.40625 48.1875 4.484375
Q 40.765625 -1.421875 27.09375 -1.421875
Q 22.515625 -1.421875 17.65625 -0.515625
Q 12.796875 0.390625 7.625 2.203125
L 7.625 11.71875
Q 11.71875 9.328125 16.59375 8.109375
Q 21.484375 6.890625 26.8125 6.890625
Q 36.078125 6.890625 40.9375 10.546875
Q 45.796875 14.203125 45.796875 21.1875
Q 45.796875 27.640625 41.28125 31.265625
Q 36.765625 34.90625 28.71875 34.90625
L 20.21875 34.90625
L 20.21875 43.015625
L 29.109375 43.015625
Q 36.375 43.015625 40.234375 45.921875
Q 44.09375 48.828125 44.09375 54.296875
Q 44.09375 59.90625 40.109375 62.90625
Q 36.140625 65.921875 28.71875 65.921875
Q 24.65625 65.921875 20.015625 65.03125
Q 15.375 64.15625 9.8125 62.3125
L 9.8125 71.09375
Q 15.4375 72.65625 20.34375 73.4375
Q 25.25 74.21875 29.59375 74.21875
Q 40.828125 74.21875 47.359375 69.109375
Q 53.90625 64.015625 53.90625 55.328125
Q 53.90625 49.265625 50.4375 45.09375
Q 46.96875 40.921875 40.578125 39.3125
" id="BitstreamVeraSans-Roman-33"/>
</defs>
<g transform="translate(259.496785714 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-33"/>
</g>
</g>
</g>
<g id="xtick_5">
<g id="line2d_10">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="327.085714286" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_11">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="327.085714286" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_5">
<!-- 4 -->
<defs>
<path d="M 37.796875 64.3125
L 12.890625 25.390625
L 37.796875 25.390625
z
M 35.203125 72.90625
L 47.609375 72.90625
L 47.609375 25.390625
L 58.015625 25.390625
L 58.015625 17.1875
L 47.609375 17.1875
L 47.609375 0
L 37.796875 0
L 37.796875 17.1875
L 4.890625 17.1875
L 4.890625 26.703125
z
" id="BitstreamVeraSans-Roman-34"/>
</defs>
<g transform="translate(323.268214286 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-34"/>
</g>
</g>
</g>
<g id="xtick_6">
<g id="line2d_12">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="390.857142857" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_13">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="390.857142857" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_6">
<!-- 5 -->
<defs>
<path d="M 10.796875 72.90625
L 49.515625 72.90625
L 49.515625 64.59375
L 19.828125 64.59375
L 19.828125 46.734375
Q 21.96875 47.46875 24.109375 47.828125
Q 26.265625 48.1875 28.421875 48.1875
Q 40.625 48.1875 47.75 41.5
Q 54.890625 34.8125 54.890625 23.390625
Q 54.890625 11.625 47.5625 5.09375
Q 40.234375 -1.421875 26.90625 -1.421875
Q 22.3125 -1.421875 17.546875 -0.640625
Q 12.796875 0.140625 7.71875 1.703125
L 7.71875 11.625
Q 12.109375 9.234375 16.796875 8.0625
Q 21.484375 6.890625 26.703125 6.890625
Q 35.15625 6.890625 40.078125 11.328125
Q 45.015625 15.765625 45.015625 23.390625
Q 45.015625 31 40.078125 35.4375
Q 35.15625 39.890625 26.703125 39.890625
Q 22.75 39.890625 18.8125 39.015625
Q 14.890625 38.140625 10.796875 36.28125
z
" id="BitstreamVeraSans-Roman-35"/>
</defs>
<g transform="translate(387.039642857 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-35"/>
</g>
</g>
</g>
<g id="xtick_7">
<g id="line2d_14">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="454.628571429" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_15">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="454.628571429" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_7">
<!-- 6 -->
<defs>
<path d="M 33.015625 40.375
Q 26.375 40.375 22.484375 35.828125
Q 18.609375 31.296875 18.609375 23.390625
Q 18.609375 15.53125 22.484375 10.953125
Q 26.375 6.390625 33.015625 6.390625
Q 39.65625 6.390625 43.53125 10.953125
Q 47.40625 15.53125 47.40625 23.390625
Q 47.40625 31.296875 43.53125 35.828125
Q 39.65625 40.375 33.015625 40.375
M 52.59375 71.296875
L 52.59375 62.3125
Q 48.875 64.0625 45.09375 64.984375
Q 41.3125 65.921875 37.59375 65.921875
Q 27.828125 65.921875 22.671875 59.328125
Q 17.53125 52.734375 16.796875 39.40625
Q 19.671875 43.65625 24.015625 45.921875
Q 28.375 48.1875 33.59375 48.1875
Q 44.578125 48.1875 50.953125 41.515625
Q 57.328125 34.859375 57.328125 23.390625
Q 57.328125 12.15625 50.6875 5.359375
Q 44.046875 -1.421875 33.015625 -1.421875
Q 20.359375 -1.421875 13.671875 8.265625
Q 6.984375 17.96875 6.984375 36.375
Q 6.984375 53.65625 15.1875 63.9375
Q 23.390625 74.21875 37.203125 74.21875
Q 40.921875 74.21875 44.703125 73.484375
Q 48.484375 72.75 52.59375 71.296875
" id="BitstreamVeraSans-Roman-36"/>
</defs>
<g transform="translate(450.811071429 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-36"/>
</g>
</g>
</g>
<g id="xtick_8">
<g id="line2d_16">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#mef28f6589c" y="388.8"/>
</g>
</g>
<g id="line2d_17">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#ma022cbbe4e" y="43.2"/>
</g>
</g>
<g id="text_8">
<!-- 7 -->
<defs>
<path d="M 8.203125 72.90625
L 55.078125 72.90625
L 55.078125 68.703125
L 28.609375 0
L 18.3125 0
L 43.21875 64.59375
L 8.203125 64.59375
z
" id="BitstreamVeraSans-Roman-37"/>
</defs>
<g transform="translate(514.5825 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-37"/>
</g>
</g>
</g>
<g id="text_9">
<!-- x -->
<defs>
<path d="M 54.890625 54.6875
L 35.109375 28.078125
L 55.90625 0
L 45.3125 0
L 29.390625 21.484375
L 13.484375 0
L 2.875 0
L 24.125 28.609375
L 4.6875 54.6875
L 15.28125 54.6875
L 29.78125 35.203125
L 44.28125 54.6875
z
" id="BitstreamVeraSans-Roman-78"/>
</defs>
<g transform="translate(291.64875 418.531875)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-78"/>
</g>
</g>
</g>
<g id="matplotlib.axis_2">
<g id="ytick_1">
<g id="line2d_18">
<defs>
<path d="M 0 0
L 4 0
" id="m34b864056f" style="stroke:#000000;stroke-width:0.5;"/>
</defs>
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="388.8"/>
</g>
</g>
<g id="line2d_19">
<defs>
<path d="M 0 0
L -4 0
" id="me25825c560" style="stroke:#000000;stroke-width:0.5;"/>
</defs>
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="388.8"/>
</g>
</g>
<g id="text_10">
<!-- 0.4 -->
<defs>
<path d="M 10.6875 12.40625
L 21 12.40625
L 21 0
L 10.6875 0
z
" id="BitstreamVeraSans-Roman-2e"/>
<path d="M 10.59375 35.5
L 73.1875 35.5
L 73.1875 27.203125
L 10.59375 27.203125
z
" id="BitstreamVeraSans-Roman-2212"/>
</defs>
<g transform="translate(38.860625 392.11125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-2212"/>
<use x="83.7890625" xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="147.412109375" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="179.19921875" xlink:href="#BitstreamVeraSans-Roman-34"/>
</g>
</g>
</g>
<g id="ytick_2">
<g id="line2d_20">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="345.6"/>
</g>
</g>
<g id="line2d_21">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="345.6"/>
</g>
</g>
<g id="text_11">
<!-- 0.2 -->
<g transform="translate(38.860625 348.91125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-2212"/>
<use x="83.7890625" xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="147.412109375" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="179.19921875" xlink:href="#BitstreamVeraSans-Roman-32"/>
</g>
</g>
</g>
<g id="ytick_3">
<g id="line2d_22">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="302.4"/>
</g>
</g>
<g id="line2d_23">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="302.4"/>
</g>
</g>
<g id="text_12">
<!-- 0.0 -->
<g transform="translate(48.91625 305.71125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
</g>
</g>
</g>
<g id="ytick_4">
<g id="line2d_24">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="259.2"/>
</g>
</g>
<g id="line2d_25">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="259.2"/>
</g>
</g>
<g id="text_13">
<!-- 0.2 -->
<g transform="translate(48.91625 262.51125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-32"/>
</g>
</g>
</g>
<g id="ytick_5">
<g id="line2d_26">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="216.0"/>
</g>
</g>
<g id="line2d_27">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="216.0"/>
</g>
</g>
<g id="text_14">
<!-- 0.4 -->
<g transform="translate(48.91625 219.31125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-34"/>
</g>
</g>
</g>
<g id="ytick_6">
<g id="line2d_28">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="172.8"/>
</g>
</g>
<g id="line2d_29">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="172.8"/>
</g>
</g>
<g id="text_15">
<!-- 0.6 -->
<g transform="translate(48.91625 176.11125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-36"/>
</g>
</g>
</g>
<g id="ytick_7">
<g id="line2d_30">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="129.6"/>
</g>
</g>
<g id="line2d_31">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="129.6"/>
</g>
</g>
<g id="text_16">
<!-- 0.8 -->
<defs>
<path d="M 31.78125 34.625
Q 24.75 34.625 20.71875 30.859375
Q 16.703125 27.09375 16.703125 20.515625
Q 16.703125 13.921875 20.71875 10.15625
Q 24.75 6.390625 31.78125 6.390625
Q 38.8125 6.390625 42.859375 10.171875
Q 46.921875 13.96875 46.921875 20.515625
Q 46.921875 27.09375 42.890625 30.859375
Q 38.875 34.625 31.78125 34.625
M 21.921875 38.8125
Q 15.578125 40.375 12.03125 44.71875
Q 8.5 49.078125 8.5 55.328125
Q 8.5 64.0625 14.71875 69.140625
Q 20.953125 74.21875 31.78125 74.21875
Q 42.671875 74.21875 48.875 69.140625
Q 55.078125 64.0625 55.078125 55.328125
Q 55.078125 49.078125 51.53125 44.71875
Q 48 40.375 41.703125 38.8125
Q 48.828125 37.15625 52.796875 32.3125
Q 56.78125 27.484375 56.78125 20.515625
Q 56.78125 9.90625 50.3125 4.234375
Q 43.84375 -1.421875 31.78125 -1.421875
Q 19.734375 -1.421875 13.25 4.234375
Q 6.78125 9.90625 6.78125 20.515625
Q 6.78125 27.484375 10.78125 32.3125
Q 14.796875 37.15625 21.921875 38.8125
M 18.3125 54.390625
Q 18.3125 48.734375 21.84375 45.5625
Q 25.390625 42.390625 31.78125 42.390625
Q 38.140625 42.390625 41.71875 45.5625
Q 45.3125 48.734375 45.3125 54.390625
Q 45.3125 60.0625 41.71875 63.234375
Q 38.140625 66.40625 31.78125 66.40625
Q 25.390625 66.40625 21.84375 63.234375
Q 18.3125 60.0625 18.3125 54.390625
" id="BitstreamVeraSans-Roman-38"/>
</defs>
<g transform="translate(48.91625 132.91125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-38"/>
</g>
</g>
</g>
<g id="ytick_8">
<g id="line2d_32">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="86.4"/>
</g>
</g>
<g id="line2d_33">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="86.4"/>
</g>
</g>
<g id="text_17">
<!-- 1.0 -->
<g transform="translate(48.91625 89.71125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
</g>
</g>
</g>
<g id="ytick_9">
<g id="line2d_34">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="72.0" xlink:href="#m34b864056f" y="43.2"/>
</g>
</g>
<g id="line2d_35">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="518.4" xlink:href="#me25825c560" y="43.2"/>
</g>
</g>
<g id="text_18">
<!-- 1.2 -->
<g transform="translate(48.91625 46.51125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-31"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-32"/>
</g>
</g>
</g>
<g id="text_19">
<!-- sinc(x) -->
<defs>
<path d="M 9.421875 54.6875
L 18.40625 54.6875
L 18.40625 0
L 9.421875 0
z
M 9.421875 75.984375
L 18.40625 75.984375
L 18.40625 64.59375
L 9.421875 64.59375
z
" id="BitstreamVeraSans-Roman-69"/>
<path d="M 8.015625 75.875
L 15.828125 75.875
Q 23.140625 64.359375 26.78125 53.3125
Q 30.421875 42.28125 30.421875 31.390625
Q 30.421875 20.453125 26.78125 9.375
Q 23.140625 -1.703125 15.828125 -13.1875
L 8.015625 -13.1875
Q 14.5 -2 17.703125 9.0625
Q 20.90625 20.125 20.90625 31.390625
Q 20.90625 42.671875 17.703125 53.65625
Q 14.5 64.65625 8.015625 75.875
" id="BitstreamVeraSans-Roman-29"/>
<path d="M 54.890625 33.015625
L 54.890625 0
L 45.90625 0
L 45.90625 32.71875
Q 45.90625 40.484375 42.875 44.328125
Q 39.84375 48.1875 33.796875 48.1875
Q 26.515625 48.1875 22.3125 43.546875
Q 18.109375 38.921875 18.109375 30.90625
L 18.109375 0
L 9.078125 0
L 9.078125 54.6875
L 18.109375 54.6875
L 18.109375 46.1875
Q 21.34375 51.125 25.703125 53.5625
Q 30.078125 56 35.796875 56
Q 45.21875 56 50.046875 50.171875
Q 54.890625 44.34375 54.890625 33.015625
" id="BitstreamVeraSans-Roman-6e"/>
<path d="M 31 75.875
Q 24.46875 64.65625 21.28125 53.65625
Q 18.109375 42.671875 18.109375 31.390625
Q 18.109375 20.125 21.3125 9.0625
Q 24.515625 -2 31 -13.1875
L 23.1875 -13.1875
Q 15.875 -1.703125 12.234375 9.375
Q 8.59375 20.453125 8.59375 31.390625
Q 8.59375 42.28125 12.203125 53.3125
Q 15.828125 64.359375 23.1875 75.875
z
" id="BitstreamVeraSans-Roman-28"/>
<path d="M 44.28125 53.078125
L 44.28125 44.578125
Q 40.484375 46.53125 36.375 47.5
Q 32.28125 48.484375 27.875 48.484375
Q 21.1875 48.484375 17.84375 46.4375
Q 14.5 44.390625 14.5 40.28125
Q 14.5 37.15625 16.890625 35.375
Q 19.28125 33.59375 26.515625 31.984375
L 29.59375 31.296875
Q 39.15625 29.25 43.1875 25.515625
Q 47.21875 21.78125 47.21875 15.09375
Q 47.21875 7.46875 41.1875 3.015625
Q 35.15625 -1.421875 24.609375 -1.421875
Q 20.21875 -1.421875 15.453125 -0.5625
Q 10.6875 0.296875 5.421875 2
L 5.421875 11.28125
Q 10.40625 8.6875 15.234375 7.390625
Q 20.0625 6.109375 24.8125 6.109375
Q 31.15625 6.109375 34.5625 8.28125
Q 37.984375 10.453125 37.984375 14.40625
Q 37.984375 18.0625 35.515625 20.015625
Q 33.0625 21.96875 24.703125 23.78125
L 21.578125 24.515625
Q 13.234375 26.265625 9.515625 29.90625
Q 5.8125 33.546875 5.8125 39.890625
Q 5.8125 47.609375 11.28125 51.796875
Q 16.75 56 26.8125 56
Q 31.78125 56 36.171875 55.265625
Q 40.578125 54.546875 44.28125 53.078125
" id="BitstreamVeraSans-Roman-73"/>
<path d="M 48.78125 52.59375
L 48.78125 44.1875
Q 44.96875 46.296875 41.140625 47.34375
Q 37.3125 48.390625 33.40625 48.390625
Q 24.65625 48.390625 19.8125 42.84375
Q 14.984375 37.3125 14.984375 27.296875
Q 14.984375 17.28125 19.8125 11.734375
Q 24.65625 6.203125 33.40625 6.203125
Q 37.3125 6.203125 41.140625 7.25
Q 44.96875 8.296875 48.78125 10.40625
L 48.78125 2.09375
Q 45.015625 0.34375 40.984375 -0.53125
Q 36.96875 -1.421875 32.421875 -1.421875
Q 20.0625 -1.421875 12.78125 6.34375
Q 5.515625 14.109375 5.515625 27.296875
Q 5.515625 40.671875 12.859375 48.328125
Q 20.21875 56 33.015625 56
Q 37.15625 56 41.109375 55.140625
Q 45.0625 54.296875 48.78125 52.59375
" id="BitstreamVeraSans-Roman-63"/>
</defs>
<g transform="translate(31.365 236.1271875)rotate(-90.0)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-73"/>
<use x="52.099609375" xlink:href="#BitstreamVeraSans-Roman-69"/>
<use x="79.8828125" xlink:href="#BitstreamVeraSans-Roman-6e"/>
<use x="143.26171875" xlink:href="#BitstreamVeraSans-Roman-63"/>
<use x="198.2421875" xlink:href="#BitstreamVeraSans-Roman-28"/>
<use x="237.255859375" xlink:href="#BitstreamVeraSans-Roman-78"/>
<use x="296.435546875" xlink:href="#BitstreamVeraSans-Roman-29"/>
</g>
</g>
</g>
</g>
</g>
<defs>
<clipPath id="p515468138a">
<rect height="345.6" width="446.4" x="72.0" y="43.2"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

653
examples/julia_sample.html Normal file

File diff suppressed because one or more lines are too long

68
examples/julia_sample.md Normal file
View File

@ -0,0 +1,68 @@
# Introducion to Weave
This a sample [Julia](http://julialang.org/) noweb document that can
be executed using Weave. Output from code chunks and PyPlot
plots will be included in the weaved document. You also need to install Pweave from Github in order to use Weave.
This documented can be turned into Pandoc markdown with captured
result from Julia prompt.
~~~~{.julia}
using Weave
weave("examples/julia_sample.mdw")
~~~~
## Terminal chunk
````julia
julia> x = 1:10
1:10
julia> d = Dict("Weave" => "testing")
Dict{String,String} with 1 entry:
"Weave" => "testing"
julia> y = [2, 4 ,8]
3-element Array{Int64,1}:
2
4
8
````
## Capturing figures
The figures and code can be included in the output.
````julia
using PyPlot
t = linspace(0, 2*pi, 100)
plot(t, sinc(t))
xlabel("x")
ylabel("sinc(x)")
````
````
PyObject <matplotlib.text.Text object at 0x7fa4afb91a20>
````
![](figures/julia_sample_2_1.svg)\
You can also include a plot with caption and hide the code:
````
1-element Array{Any,1}:
PyObject <matplotlib.lines.Line2D object at 0x7fa4d272bd30>
````
![Random walk.](figures/julia_sample_random_1.svg)

View File

@ -0,0 +1,97 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
</head>
<body>
<h1 id="introducion-to-weave">Introducion to Weave</h1>
<p>This a sample <a href="http://julialang.org/">Julia</a> noweb document that can be executed using Weave. Output from code chunks and Winston plots will be included in the weaved document. You also need to install Pweave from Github in order to use Weave.</p>
<p>This documented can be turned into Pandoc markdown with captured result from Julia prompt.</p>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">using Weave
weave(Pkg.dir(<span class="st">&quot;Weave&quot;</span>,<span class="st">&quot;examples&quot;</span>,<span class="st">&quot;winston_sample.mdw&quot;</span>), plotlib=<span class="st">&quot;Winston&quot;</span>)</code></pre></div>
<h2 id="terminal-chunk">Terminal chunk</h2>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">julia&gt; x = <span class="fl">1</span>:<span class="fl">10</span>
<span class="fl">1</span>:<span class="fl">10</span>
julia&gt; d = <span class="dt">Dict</span>(<span class="st">&quot;Weave&quot;</span> =&gt; <span class="st">&quot;testing&quot;</span>)
<span class="dt">Dict</span>{<span class="dt">String</span>,<span class="dt">String</span>} with <span class="fl">1</span> entry:
<span class="st">&quot;Weave&quot;</span> =&gt; <span class="st">&quot;testing&quot;</span>
julia&gt; y = [<span class="fl">2</span>, <span class="fl">4</span> ,<span class="fl">8</span>]
<span class="fl">3</span>-element <span class="dt">Array</span>{<span class="dt">Int64</span>,<span class="fl">1</span>}:
<span class="fl">2</span>
<span class="fl">4</span>
<span class="fl">8</span></code></pre></div>
<h2 id="capturing-figures">Capturing figures</h2>
<p>The figures and code can be included in the output.</p>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">julia&gt; using Winston
julia&gt; t = linspace(<span class="fl">0</span>, <span class="fl">2</span>*pi, <span class="fl">100</span>)
<span class="fl">100</span>-element LinSpace{<span class="dt">Float64</span>}:
<span class="fl">0.0</span>,<span class="fl">0.0634665</span>,<span class="fl">0.126933</span>,<span class="fl">0.1904</span>,<span class="fl">0.253866</span>,…,<span class="fl">6.09279</span>,<span class="fl">6.15625</span>,<span class="fl">6.21972</span>,<span class="fl">6.28319</span>
julia&gt; p = plot(t, sinc(t))
Winston.FramedPlot(...)</code></pre></div>
<p><img src="figures/winston_sample_2_1.png" /> </p>
<p>You can also include a plot with caption and hide the code:</p>
<div class="figure">
<img src="figures/winston_sample_random_1.png" alt="Random walk." />
<p class="caption">Random walk.</p>
</div>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">x = linspace(<span class="fl">0</span>, <span class="fl">3</span>pi, <span class="fl">100</span>)
c = cos(x)
s = sin(x)
p = FramedPlot(
title=<span class="st">&quot;title!&quot;</span>,
xlabel=<span class="st">&quot;</span>\\<span class="st">Sigma x^2_i&quot;</span>,
ylabel=<span class="st">&quot;</span>\\<span class="st">Theta_i&quot;</span>)
add(p, FillBetween(x, c, x, s))
add(p, Curve(x, c, color=<span class="st">&quot;red&quot;</span>))
add(p, Curve(x, s, color=<span class="st">&quot;blue&quot;</span>))
display(p)</code></pre></div>
<p><img src="figures/winston_sample_4_1.png" /> </p>
</body>
</html>

View File

@ -0,0 +1,82 @@
# Introducion to Weave
This a sample [Julia](http://julialang.org/) noweb document that can
be executed using Weave. Output from code chunks and Winston
plots will be included in the weaved document. You also need to install Pweave from Github in order to use Weave.
This documented can be turned into Pandoc markdown with captured
result from Julia prompt.
~~~~{.julia}
using Weave
weave(Pkg.dir("Weave","examples","winston_sample.mdw"), plotlib="Winston")
~~~~
## Terminal chunk
~~~~{.julia}
julia> x = 1:10
1:10
julia> d = Dict("Weave" => "testing")
Dict{String,String} with 1 entry:
"Weave" => "testing"
julia> y = [2, 4 ,8]
3-element Array{Int64,1}:
2
4
8
~~~~~~~~~~~~~
## Capturing figures
The figures and code can be included in the output.
~~~~{.julia}
julia> using Winston
julia> t = linspace(0, 2*pi, 100)
100-element LinSpace{Float64}:
0.0,0.0634665,0.126933,0.1904,0.253866,…,6.09279,6.15625,6.21972,6.28319
julia> p = plot(t, sinc(t))
Winston.FramedPlot(...)
~~~~~~~~~~~~~
![](figures/winston_sample_2_1.png)\
You can also include a plot with caption and hide the code:
![Random walk.](figures/winston_sample_random_1.png)
~~~~{.julia}
x = linspace(0, 3pi, 100)
c = cos(x)
s = sin(x)
p = FramedPlot(
title="title!",
xlabel="\\Sigma x^2_i",
ylabel="\\Theta_i")
add(p, FillBetween(x, c, x, s))
add(p, Curve(x, c, color="red"))
add(p, Curve(x, s, color="blue"))
display(p)
~~~~~~~~~~~~~
![](figures/winston_sample_4_1.png)\

View File

@ -0,0 +1,111 @@
% FIR filter design with Julia
% Matti Pastell
% 21th April 2016
# Introduction
This an example of a julia script that can be published using
[Weave](http://mpastell.github.io/Weave.jl/latest/usage/).
The script can be executed normally using Julia
or published to HTML or pdf with Weave.
Text is written in markdown in lines starting with "`#'` " and code
is executed and results are included in the published document.
Notice that you don't need to define chunk options, but you can using
`#+`. just before code e.g. `#+ term=True, caption='Fancy plots.'`.
If you're viewing the published version have a look at the
[source](FIR_design.jl) to see the markup.
# FIR Filter Design
We'll implement lowpass, highpass and ' bandpass FIR filters. If
you want to read more about DSP I highly recommend [The Scientist
and Engineer's Guide to Digital Signal
Processing](http://www.dspguide.com/) which is freely available
online.
## Calculating frequency response
DSP.jl package doesn't (yet) have a method to calculate the
the frequency response of a FIR filter so we define it:
~~~~{.julia}
using Gadfly, DSP
function FIRfreqz(b::Array, w = linspace(0, π, 1024))
n = length(w)
h = Array{Complex64}(n)
sw = 0
for i = 1:n
for j = 1:length(b)
sw += b[j]*exp(-im*w[i])^-j
end
h[i] = sw
sw = 0
end
return h
end
~~~~~~~~~~~~~
## Design Lowpass FIR filter
Designing a lowpass FIR filter is very simple to do with DSP.jl, all you
need to do is to define the window length, cut off frequency and the
window. We will define a lowpass filter with cut off frequency at 5Hz for a signal
sampled at 20 Hz.
We will use the Hamming window, which is defined as:
$w(n) = \alpha - \beta\cos\frac{2\pi n}{N-1}$, where $\alpha=0.54$ and $\beta=0.46$
~~~~{.julia}
fs = 20
f = digitalfilter(Lowpass(5, fs = fs), FIRWindow(hamming(61)))
w = linspace(0, pi, 1024)
h = FIRfreqz(f, w)
~~~~~~~~~~~~~
## Plot the frequency and impulse response
~~~~{.julia}
h_db = log10(abs(h))
ws = w/pi*(fs/2)
~~~~~~~~~~~~~
The next code chunk is executed in term mode, see the [script](FIR_design.jl) for syntax.
~~~~{.julia}
julia>
plot(y = h_db, x = ws, Geom.line,
Guide.xlabel("Frequency (Hz)"), Guide.ylabel("Magnitude (db)"))
~~~~~~~~~~~~~
![](figures/FIR_design_4_1.png)\
And again with default options
~~~~{.julia}
h_phase = unwrap(-atan2(imag(h),real(h)))
plot(y = h_phase, x = ws, Geom.line,
Guide.xlabel("Frequency (Hz)"), Guide.ylabel("Phase (radians)"))
~~~~~~~~~~~~~
![](figures/FIR_design_5_1.png)\

BIN
test/documents/cache/chunk_cache.jld vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,109 @@
~~~~{.julia}
julia> y= [2, 5, 12]
3-element Array{Int64,1}:
2
5
12
~~~~~~~~~~~~~
~~~~{.julia}
julia> y= [2, 5, 12]
3-element Array{Int64,1}:
2
5
12
~~~~~~~~~~~~~
~~~~{.julia}
x = [12, 10]
println(y)
~~~~~~~~~~~~~
~~~~
[2,5,12]
~~~~
~~~~{.julia}
println(x)
~~~~~~~~~~~~~
~~~~
[12,10]
~~~~
~~~~{.julia}
x = [12, 10]
println(y)
~~~~~~~~~~~~~
~~~~
[2,5,12]
~~~~
~~~~{.julia}
println(x)
~~~~~~~~~~~~~
~~~~
[12,10]
~~~~
~~~~{.julia}
y = 1:5
println(y)
~~~~~~~~~~~~~
~~~~
1:5
~~~~
~~~~{.julia}
y = 1:5
println(y)
~~~~~~~~~~~~~
~~~~
1:5
~~~~
Some text in the end

View File

@ -0,0 +1,146 @@
~~~~{.julia}
julia> y= [2, 5, 12]
3-element Array{Int64,1}:
2
5
12
~~~~~~~~~~~~~
~~~~{.julia}
x = [12, 10]
println(y)
~~~~~~~~~~~~~
~~~~
[2,5,12]
~~~~
~~~~{.julia}
println(x)
~~~~~~~~~~~~~
~~~~
[12,10]
~~~~
~~~~
Results without code
~~~~
~~~~
[12,10]
~~~~
~~~~{.julia}
y = randn(5)
println("Don't eval, but show code")
~~~~~~~~~~~~~
~~~~{.julia}
y = 1:5
println(y)
~~~~~~~~~~~~~
~~~~
1:5
~~~~
~~~~{.julia}
a = "Don't print me"
println(a)
~~~~~~~~~~~~~
~~~~{.julia}
println("No markup for results.")
~~~~~~~~~~~~~
No markup for results.
Test wrapping:
~~~~{.julia}
println(collect(0:10:1000))
~~~~~~~~~~~~~
~~~~
[0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,2
10,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,
400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580
,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,77
0,780,790,800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,9
60,970,980,990,1000]
~~~~
~~~~{.julia}
println(collect(0:10:1000))
~~~~~~~~~~~~~
~~~~[0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,990,1000]
~~~~
~~~~{.julia}
println(collect(0:10:1000))
~~~~~~~~~~~~~
~~~~
[0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,17
0,180,190,200,210,220,230,240,250,260,270,280,290,300,310,32
0,330,340,350,360,370,380,390,400,410,420,430,440,450,460,47
0,480,490,500,510,520,530,540,550,560,570,580,590,600,610,62
0,630,640,650,660,670,680,690,700,710,720,730,740,750,760,77
0,780,790,800,810,820,830,840,850,860,870,880,890,900,910,92
0,930,940,950,960,970,980,990,1000]
~~~~

View File

@ -0,0 +1,75 @@
````julia
using Gadfly
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
````
![sin(x) function.][figures/gadfly_formats_test_sin_fun_1.png]
[figures/gadfly_formats_test_sin_fun_1.png]: figures/gadfly_formats_test_sin_fun_1.png
![cos(x) function.][figures/gadfly_formats_test_2_1.png]
[figures/gadfly_formats_test_2_1.png]: figures/gadfly_formats_test_2_1.png
![][figures/gadfly_formats_test_cos2_fun_1.png]
[figures/gadfly_formats_test_cos2_fun_1.png]: figures/gadfly_formats_test_cos2_fun_1.png
````julia
julia> x = linspace(0, 2π, 200)
200-element LinSpace{Float64}:
0.0,0.0315738,0.0631476,0.0947214,0.126295,…,6.18846,6.22004,6.25161,6.28319
julia> plot(x=x, y = sin(x), Geom.line)
````
![][figures/gadfly_formats_test_4_1.png]
[figures/gadfly_formats_test_4_1.png]: figures/gadfly_formats_test_4_1.png
````julia
julia> y = 20
20
julia> plot(x=x, y = cos(x), Geom.line)
````
![][figures/gadfly_formats_test_4_2.png]
[figures/gadfly_formats_test_4_2.png]: figures/gadfly_formats_test_4_2.png
````julia
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
````
![][figures/gadfly_formats_test_5_1.png]
[figures/gadfly_formats_test_5_1.png]: figures/gadfly_formats_test_5_1.png width=15cm
````julia
y = 20
plot(x=x, y = cos(x), Geom.line)
````
![][figures/gadfly_formats_test_5_2.png]
[figures/gadfly_formats_test_5_2.png]: figures/gadfly_formats_test_5_2.png width=15cm

View File

@ -0,0 +1,84 @@
.. code-block:: julia
using Gadfly
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
.. figure:: figures/gadfly_formats_test_sin_fun_1.png
:width: 15 cm
sin(x) function.
.. figure:: figures/gadfly_formats_test_2_1.png
:width: 15 cm
cos(x) function.
.. image:: figures/gadfly_formats_test_cos2_fun_1.png
:width: 15 cm
.. code-block:: julia
julia> x = linspace(0, 2π, 200)
200-element LinSpace{Float64}:
0.0,0.0315738,0.0631476,0.0947214,0.126295,…,6.18846,6.22004,6.25161,6.28319
julia> plot(x=x, y = sin(x), Geom.line)
.. image:: figures/gadfly_formats_test_4_1.png
:width: 15 cm
.. code-block:: julia
julia> y = 20
20
julia> plot(x=x, y = cos(x), Geom.line)
.. image:: figures/gadfly_formats_test_4_2.png
:width: 15 cm
.. code-block:: julia
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
.. image:: figures/gadfly_formats_test_5_1.png
:width: 15cm
.. code-block:: julia
y = 20
plot(x=x, y = cos(x), Geom.line)
.. image:: figures/gadfly_formats_test_5_2.png
:width: 15cm

View File

@ -0,0 +1,60 @@
\begin{juliacode}
using Gadfly
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
\end{juliacode}
\begin{figure}[ht]
\center
\includegraphics[width=\linewidth]{figures/gadfly_formats_test_sin_fun_1.ps}
\caption{sin(x) function.}
\label{fig:sin_fun}
\end{figure}
\begin{figure}[htpb]
\center
\includegraphics[width=\linewidth]{figures/gadfly_formats_test_2_1.ps}
\caption{cos(x) function.}
\end{figure}
\includegraphics[width=\linewidth]{figures/gadfly_formats_test_cos2_fun_1.ps}
\begin{juliaterm}
julia> x = linspace(0, 2π, 200)
200-element LinSpace{Float64}:
0.0,0.0315738,0.0631476,0.0947214,0.126295,…,6.18846,6.22004,6.25161,6.28319
julia> plot(x=x, y = sin(x), Geom.line)
\end{juliaterm}
\includegraphics[width=\linewidth]{figures/gadfly_formats_test_4_1.ps}
\begin{juliaterm}
julia> y = 20
20
julia> plot(x=x, y = cos(x), Geom.line)
\end{juliaterm}
\includegraphics[width=\linewidth]{figures/gadfly_formats_test_4_2.ps}
\begin{juliacode}
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
\end{juliacode}
\includegraphics[width=15cm]{figures/gadfly_formats_test_5_1.ps}
\begin{juliacode}
y = 20
plot(x=x, y = cos(x), Geom.line)
\end{juliacode}
\includegraphics[width=15cm]{figures/gadfly_formats_test_5_2.ps}

View File

@ -0,0 +1,82 @@
# Gadfly
````julia
julia> using Gadfly
julia> x = linspace(0, 2π, 200)
200-element LinSpace{Float64}:
0.0,0.0315738,0.0631476,0.0947214,0.126295,…,6.18846,6.22004,6.25161,6.28319
julia> plot(x=x, y = sin(x), Geom.line)
````
![](figures/gadfly_markdown_test_1_1.png)
````julia
julia> y = 20
20
julia> plot(x=x, y = cos(x), Geom.line)
````
![](figures/gadfly_markdown_test_1_2.png)
````julia
x = linspace(0, 200)
println(x)
````
````
linspace(0.0,200.0,50)
````
````julia
julia> using Gadfly
julia> x = linspace(0, 2π, 200)
200-element LinSpace{Float64}:
0.0,0.0315738,0.0631476,0.0947214,0.126295,…,6.18846,6.22004,6.25161,6.28319
julia> plot(x=x, y = sin(x), Geom.line)
````
![](figures/gadfly_markdown_test_3_1.png)
````julia
julia> y = 20
20
julia> plot(x=x, y = cos(x), Geom.line)
````
![](figures/gadfly_markdown_test_3_2.png)
````julia
x = linspace(0, 200)
println(x)
````
````
linspace(0.0,200.0,50)
````

View File

@ -0,0 +1,131 @@
~~~~{.julia}
using DataFrames
df = DataFrame(letters = 'a':'z', numbers = 1:26)
df
~~~~~~~~~~~~~
~~~~
26×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
│ 7 │ 'g' │ 7 │
│ 8 │ 'h' │ 8 │
│ 18 │ 'r' │ 18 │
│ 19 │ 's' │ 19 │
│ 20 │ 't' │ 20 │
│ 21 │ 'u' │ 21 │
│ 22 │ 'v' │ 22 │
│ 23 │ 'w' │ 23 │
│ 24 │ 'x' │ 24 │
│ 25 │ 'y' │ 25 │
│ 26 │ 'z' │ 26 │
~~~~
~~~~{.julia}
z = 51
display(df)
~~~~~~~~~~~~~
~~~~
26×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
│ 7 │ 'g' │ 7 │
│ 8 │ 'h' │ 8 │
│ 18 │ 'r' │ 18 │
│ 19 │ 's' │ 19 │
│ 20 │ 't' │ 20 │
│ 21 │ 'u' │ 21 │
│ 22 │ 'v' │ 22 │
│ 23 │ 'w' │ 23 │
│ 24 │ 'x' │ 24 │
│ 25 │ 'y' │ 25 │
│ 26 │ 'z' │ 26 │
~~~~
~~~~{.julia}
head(df)
~~~~~~~~~~~~~
~~~~
6×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
~~~~
~~~~{.julia}
julia> df
26×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
│ 7 │ 'g' │ 7 │
│ 8 │ 'h' │ 8 │
│ 18 │ 'r' │ 18 │
│ 19 │ 's' │ 19 │
│ 20 │ 't' │ 20 │
│ 21 │ 'u' │ 21 │
│ 22 │ 'v' │ 22 │
│ 23 │ 'w' │ 23 │
│ 24 │ 'x' │ 24 │
│ 25 │ 'y' │ 25 │
│ 26 │ 'z' │ 26 │
~~~~~~~~~~~~~
~~~~{.julia}
m = Base.Markdown.parse("**Some Markdown**")
m
~~~~~~~~~~~~~
**Some Markdown**

View File

@ -0,0 +1,115 @@
\begin{juliacode}
using DataFrames
df = DataFrame(letters = 'a':'z', numbers = 1:26)
df
\end{juliacode}
\begin{juliaout}
26×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
│ 7 │ 'g' │ 7 │
│ 8 │ 'h' │ 8 │
│ 18 │ 'r' │ 18 │
│ 19 │ 's' │ 19 │
│ 20 │ 't' │ 20 │
│ 21 │ 'u' │ 21 │
│ 22 │ 'v' │ 22 │
│ 23 │ 'w' │ 23 │
│ 24 │ 'x' │ 24 │
│ 25 │ 'y' │ 25 │
│ 26 │ 'z' │ 26 │
\end{juliaout}
\begin{juliacode}
z = 51
display(df)
\end{juliacode}
\begin{juliaout}
26×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
│ 7 │ 'g' │ 7 │
│ 8 │ 'h' │ 8 │
│ 18 │ 'r' │ 18 │
│ 19 │ 's' │ 19 │
│ 20 │ 't' │ 20 │
│ 21 │ 'u' │ 21 │
│ 22 │ 'v' │ 22 │
│ 23 │ 'w' │ 23 │
│ 24 │ 'x' │ 24 │
│ 25 │ 'y' │ 25 │
│ 26 │ 'z' │ 26 │
\end{juliaout}
\begin{juliacode}
head(df)
\end{juliacode}
\begin{juliaout}
6×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
\end{juliaout}
\begin{juliaterm}
julia> df
26×2 DataFrames.DataFrame
│ Row │ letters │ numbers │
├─────┼─────────┼─────────┤
│ 1 │ 'a' │ 1 │
│ 2 │ 'b' │ 2 │
│ 3 │ 'c' │ 3 │
│ 4 │ 'd' │ 4 │
│ 5 │ 'e' │ 5 │
│ 6 │ 'f' │ 6 │
│ 7 │ 'g' │ 7 │
│ 8 │ 'h' │ 8 │
│ 18 │ 'r' │ 18 │
│ 19 │ 's' │ 19 │
│ 20 │ 't' │ 20 │
│ 21 │ 'u' │ 21 │
│ 22 │ 'v' │ 22 │
│ 23 │ 'w' │ 23 │
│ 24 │ 'x' │ 24 │
│ 25 │ 'y' │ 25 │
│ 26 │ 'z' │ 26 │
\end{juliaterm}
\begin{juliacode}
m = Base.Markdown.parse("**Some Markdown**")
m
\end{juliacode}
\textbf{Some Markdown}

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1,64 @@
[source,julia]
--------------------------------------
using Gadfly
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
--------------------------------------
image::figures/gadfly_formats_test_sin_fun_1.png[width=600,title="sin(x) function."]
image::figures/gadfly_formats_test_2_1.png[width=600,title="cos(x) function."]
image::figures/gadfly_formats_test_cos2_fun_1.png[width=600]
[source,julia]
--------------------------------------
julia> x = linspace(0, 2π, 200)
200-element LinSpace{Float64}:
0.0,0.0315738,0.0631476,0.0947214,0.126295,…,6.18846,6.22004,6.25161,6.28319
julia> plot(x=x, y = sin(x), Geom.line)
--------------------------------------
image::figures/gadfly_formats_test_4_1.png[width=600]
[source,julia]
--------------------------------------
julia> y = 20
20
julia> plot(x=x, y = cos(x), Geom.line)
--------------------------------------
image::figures/gadfly_formats_test_4_2.png[width=600]
[source,julia]
--------------------------------------
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
--------------------------------------
image::figures/gadfly_formats_test_5_1.png[width=15cm]
[source,julia]
--------------------------------------
y = 20
plot(x=x, y = cos(x), Geom.line)
--------------------------------------
image::figures/gadfly_formats_test_5_2.png[width=15cm]

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,80 @@
~~~~{.julia}
using Plots
pyplot()
x = linspace(0, 2*pi)
println(x)
~~~~~~~~~~~~~
~~~~
linspace(0.0,6.283185307179586,50)
~~~~
~~~~{.julia}
p = plot(x, sin(x), size =(900,300))
~~~~~~~~~~~~~
![](figures/plotsjl_test_1_1.png)\
~~~~{.julia}
julia> plot(x, sin(x))
~~~~~~~~~~~~~
![](figures/plotsjl_test_2_1.png)\
![](figures/plotsjl_test_2_1.png)\
~~~~{.julia}
plot(rand(100) / 3,reg=true,fill=(0,:green))
scatter!(rand(100),markersize=6,c=:orange)
~~~~~~~~~~~~~
![](figures/plotsjl_test_3_1.png)\
![](figures/plotsjl_test_3_1.png)\
~~~~{.julia}
julia> plot(rand(100) / 3,reg=true,fill=(0,:green))
~~~~~~~~~~~~~
![](figures/plotsjl_test_4_1.png)\
~~~~{.julia}
julia> scatter!(rand(100),markersize=6,c=:orange)
~~~~~~~~~~~~~
![](figures/plotsjl_test_4_2.png)\
![](figures/plotsjl_test_4_1.png)\
![A random walk.](figures/plotsjl_test_random_1.png)
![](figures/plotsjl_test_random_1.png)

View File

@ -0,0 +1,58 @@
\begin{juliacode}
using Plots
pyplot()
x = linspace(0, 2*pi)
println(x)
\end{juliacode}
\begin{juliaout}
linspace(0.0,6.283185307179586,50)
\end{juliaout}
\begin{juliacode}
p = plot(x, sin(x), size =(900,300))
\end{juliacode}
\begin{juliaterm}
julia> plot(x, sin(x))
\end{juliaterm}
\includegraphics[width=\linewidth]{figures/plotsjl_test_2_1.pdf}
\begin{juliacode}
plot(rand(100) / 3,reg=true,fill=(0,:green))
scatter!(rand(100),markersize=6,c=:orange)
\end{juliacode}
\includegraphics[width=\linewidth]{figures/plotsjl_test_3_1.pdf}
\begin{juliaterm}
julia> plot(rand(100) / 3,reg=true,fill=(0,:green))
\end{juliaterm}
\includegraphics[width=\linewidth]{figures/plotsjl_test_4_1.pdf}
\begin{juliaterm}
julia> scatter!(rand(100),markersize=6,c=:orange)
\end{juliaterm}
\includegraphics[width=\linewidth]{figures/plotsjl_test_4_2.pdf}
\begin{figure}[htpb]
\center
\includegraphics[width=\linewidth]{figures/plotsjl_test_random_1.pdf}
\caption{A random walk.}
\label{fig:random}
\end{figure}

View File

@ -0,0 +1,69 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
</head>
<body>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">using Plots
pyplot()
x = linspace(<span class="fl">0</span>, <span class="fl">2</span>*pi)
println(x)</code></pre></div>
<pre><code>linspace(0.0,6.283185307179586,50)</code></pre>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">p = plot(x = x, y = sin(x), size =(<span class="fl">900</span>,<span class="fl">300</span>))</code></pre></div>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">julia&gt; plot(x = x, y = sin(x))</code></pre></div>
<p><img src="figures/plotsjl_test_2_1.png" /> </p>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">plot(rand(<span class="fl">100</span>) / <span class="fl">3</span>,reg=true,fill=(<span class="fl">0</span>,:green))
scatter!(rand(<span class="fl">100</span>),markersize=<span class="fl">6</span>,c=:orange)</code></pre></div>
<p><img src="figures/plotsjl_test_3_1.png" /> </p>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">julia&gt; plot(rand(<span class="fl">100</span>) / <span class="fl">3</span>,reg=true,fill=(<span class="fl">0</span>,:green))
</code></pre></div>
<p><img src="figures/plotsjl_test_4_1.png" /> </p>
<div class="sourceCode"><pre class="sourceCode julia"><code class="sourceCode julia">julia&gt; scatter!(rand(<span class="fl">100</span>),markersize=<span class="fl">6</span>,c=:orange)</code></pre></div>
<p><img src="figures/plotsjl_test_4_2.png" /> </p>
<div class="figure">
<img src="figures/plotsjl_test_random_1.png" alt="A random walk." />
<p class="caption">A random walk.</p>
</div>
</body>
</html>

View File

@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@ -0,0 +1,708 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# FIR filter design with Julia\n",
"**Matti Pastell**\n",
"\n",
"\n",
"# Introduction\n",
"\n",
"This an example of a julia script that can be published using\n",
"[Weave](http://mpastell.github.io/Weave.jl/latest/usage/).\n",
"The script can be executed normally using Julia\n",
"or published to HTML or pdf with Weave.\n",
"Text is written in markdown in lines starting with \"`#'` \" and code\n",
"is executed and results are included in the published document.\n",
"\n",
"Notice that you don't need to define chunk options, but you can using\n",
"`#+`. just before code e.g. `#+ term=True, caption='Fancy plots.'`.\n",
"If you're viewing the published version have a look at the\n",
"[source](FIR_design.jl) to see the markup.\n",
"\n",
"\n",
"# FIR Filter Design\n",
"\n",
"We'll implement lowpass, highpass and ' bandpass FIR filters. If\n",
"you want to read more about DSP I highly recommend [The Scientist\n",
"and Engineer's Guide to Digital Signal\n",
"Processing](http://www.dspguide.com/) which is freely available\n",
"online.\n",
"\n",
"## Calculating frequency response\n",
"\n",
"DSP.jl package doesn't (yet) have a method to calculate the\n",
"the frequency response of a FIR filter so we define it:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: Precompiling module DSP.\n",
"INFO: Recompiling stale cache file C:\\Users\\mpast\\.julia\\lib\\v0.5\\GR.ji for module GR.\n"
]
},
{
"data": {
"text/plain": [
"FIRfreqz (generic function with 2 methods)"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"using Plots, DSP\n",
"glvisualize()\n",
"\n",
"function FIRfreqz(b::Array, w = linspace(0, π, 1024))\n",
" n = length(w)\n",
" h = Array{Complex64}(n)\n",
" sw = 0\n",
" for i = 1:n\n",
" for j = 1:length(b)\n",
" sw += b[j]*exp(-im*w[i])^-j\n",
" end\n",
" h[i] = sw\n",
" sw = 0\n",
" end\n",
" return h\n",
"end"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Design Lowpass FIR filter\n",
"\n",
"Designing a lowpass FIR filter is very simple to do with DSP.jl, all you\n",
"need to do is to define the window length, cut off frequency and the\n",
"window. We will define a lowpass filter with cut off frequency at 5Hz for a signal\n",
"sampled at 20 Hz.\n",
"We will use the Hamming window, which is defined as:\n",
"$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ and $\\beta=0.46$"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"fs = 20\n",
"f = digitalfilter(Lowpass(5, fs = fs), FIRWindow(hamming(61)))\n",
"w = linspace(0, pi, 1024)\n",
"h = FIRfreqz(f, w);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plot the frequency and impulse response"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"1024-element LinSpace{Float64}:\n",
" 0.0,0.00977517,0.0195503,0.0293255,…,9.9609,9.97067,9.98045,9.99022,10.0"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"h_db = log10(abs(h))\n",
"ws = w/pi*(fs/2)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
"<defs>\n",
" <clipPath id=\"clip00\">\n",
" <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<polygon clip-path=\"url(#clip00)\" points=\"\n",
"0,400 600,400 600,0 0,0 \n",
" \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
"<defs>\n",
" <clipPath id=\"clip01\">\n",
" <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<polygon clip-path=\"url(#clip00)\" points=\"\n",
"36.9926,369.674 596.063,369.674 596.063,3.93701 36.9926,3.93701 \n",
" \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
"<defs>\n",
" <clipPath id=\"clip02\">\n",
" <rect x=\"36\" y=\"3\" width=\"560\" height=\"366\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 36.9926,364.188 36.9926,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 148.807,364.188 148.807,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 260.621,364.188 260.621,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 372.435,364.188 372.435,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 484.249,364.188 484.249,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 596.063,364.188 596.063,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 45.3786,265.462 587.677,265.462 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 45.3786,134.715 587.677,134.715 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 45.3786,3.96833 587.677,3.96833 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 36.9926,369.674 596.063,369.674 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 36.9926,369.674 36.9926,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 148.807,369.674 148.807,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 260.621,369.674 260.621,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 372.435,369.674 372.435,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 484.249,369.674 484.249,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 596.063,369.674 596.063,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 36.9926,369.674 36.9926,3.93701 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 36.9926,265.462 45.3786,265.462 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 36.9926,134.715 45.3786,134.715 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 36.9926,3.96833 45.3786,3.96833 \n",
" \"/>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 36.9926, 381.674)\" x=\"36.9926\" y=\"381.674\">0</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 148.807, 381.674)\" x=\"148.807\" y=\"381.674\">2</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 260.621, 381.674)\" x=\"260.621\" y=\"381.674\">4</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 372.435, 381.674)\" x=\"372.435\" y=\"381.674\">6</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 484.249, 381.674)\" x=\"484.249\" y=\"381.674\">8</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 596.063, 381.674)\" x=\"596.063\" y=\"381.674\">10</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 35.7926, 269.962)\" x=\"35.7926\" y=\"269.962\">-4</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 35.7926, 139.215)\" x=\"35.7926\" y=\"139.215\">-2</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 35.7926, 8.46833)\" x=\"35.7926\" y=\"8.46833\">0</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 316.528, 397.6)\" x=\"316.528\" y=\"397.6\">Frequency (Hz)</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(-90, 14.4, 186.806)\" x=\"14.4\" y=\"186.806\">Magnitude (db)</text>\n",
"</g>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#0099ff; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 36.9926,3.96833 37.5391,3.96843 38.0856,3.96873 38.6321,3.96922 39.1786,3.9699 39.7251,3.97076 40.2716,3.97181 40.8181,3.97302 41.3646,3.97439 41.9111,3.9759 \n",
" 42.4576,3.97755 43.0041,3.97932 43.5506,3.9812 44.0971,3.98316 44.6436,3.98519 45.1901,3.98729 45.7366,3.98942 46.2831,3.99157 46.8296,3.99372 47.3761,3.99585 \n",
" 47.9226,3.99795 48.4691,3.99999 49.0156,4.00197 49.5621,4.00386 50.1086,4.00564 50.6551,4.00731 51.2016,4.00885 51.7481,4.01024 52.2946,4.01147 52.8411,4.01253 \n",
" 53.3876,4.01342 53.9341,4.01412 54.4806,4.01464 55.0271,4.01495 55.5736,4.01507 56.1201,4.01499 56.6666,4.01471 57.2131,4.01424 57.7596,4.01357 58.3061,4.01272 \n",
" 58.8526,4.01169 59.3991,4.01048 59.9456,4.00912 60.4921,4.0076 61.0386,4.00595 61.5851,4.00418 62.1316,4.0023 62.6781,4.00032 63.2246,3.99828 63.7711,3.99617 \n",
" 64.3176,3.99403 64.8641,3.99186 65.4106,3.98968 65.9571,3.98753 66.5036,3.98541 67.0501,3.98334 67.5966,3.98133 68.1431,3.97941 68.6896,3.9776 69.2361,3.9759 \n",
" 69.7826,3.97434 70.3291,3.97291 70.8756,3.97165 71.4221,3.97056 71.9686,3.96964 72.5151,3.96891 73.0616,3.96837 73.6081,3.96803 74.1546,3.96789 74.7011,3.96795 \n",
" 75.2476,3.96821 75.7941,3.96867 76.3406,3.96933 76.8871,3.97018 77.4336,3.97121 77.9801,3.97241 78.5266,3.97378 79.0731,3.9753 79.6196,3.97697 80.1661,3.97876 \n",
" 80.7126,3.98066 81.2591,3.98266 81.8056,3.98474 82.3521,3.98688 82.8986,3.98906 83.4451,3.99127 83.9916,3.99348 84.5381,3.99568 85.0846,3.99785 85.6311,3.99998 \n",
" 86.1776,4.00203 86.7241,4.004 87.2706,4.00587 87.8171,4.00762 88.3636,4.00923 88.9101,4.0107 89.4567,4.01201 90.0032,4.01315 90.5497,4.0141 91.0962,4.01487 \n",
" 91.6427,4.01545 92.1892,4.01581 92.7357,4.01598 93.2822,4.01594 93.8287,4.01569 94.3752,4.01524 94.9217,4.01458 95.4682,4.01373 96.0147,4.01269 96.5612,4.01147 \n",
" 97.1077,4.01008 97.6542,4.00853 98.2007,4.00683 98.7472,4.005 99.2937,4.00306 99.8402,4.00101 100.387,3.99888 100.933,3.99668 101.48,3.99444 102.026,3.99217 \n",
" 102.573,3.98989 103.119,3.98762 103.666,3.98538 104.212,3.98319 104.759,3.98107 105.305,3.97903 105.852,3.97709 106.398,3.97528 106.945,3.9736 107.491,3.97207 \n",
" 108.038,3.9707 108.584,3.96951 109.131,3.9685 109.677,3.96769 110.224,3.96708 110.77,3.96668 111.317,3.96649 111.863,3.96651 112.41,3.96674 112.956,3.96719 \n",
" 113.503,3.96785 114.049,3.96871 114.596,3.96976 115.142,3.97101 115.689,3.97243 116.235,3.97402 116.782,3.97576 117.328,3.97765 117.875,3.97966 118.421,3.98177 \n",
" 118.968,3.98397 119.514,3.98625 120.061,3.98858 120.607,3.99093 121.154,3.99331 121.7,3.99567 122.247,3.998 122.793,4.00029 123.34,4.00251 123.886,4.00464 \n",
" 124.433,4.00667 124.979,4.00858 125.526,4.01035 126.072,4.01196 126.619,4.01341 127.165,4.01467 127.712,4.01574 128.258,4.01661 128.805,4.01727 129.351,4.01772 \n",
" 129.898,4.01794 130.444,4.01794 130.991,4.01772 131.537,4.01727 132.084,4.0166 132.63,4.01573 133.177,4.01464 133.723,4.01335 134.27,4.01187 134.816,4.01022 \n",
" 135.363,4.00841 135.909,4.00645 136.456,4.00435 137.002,4.00214 137.549,3.99983 138.095,3.99745 138.642,3.99501 139.188,3.99254 139.735,3.99005 140.281,3.98756 \n",
" 140.828,3.9851 141.374,3.98269 141.921,3.98035 142.467,3.9781 143.014,3.97595 143.56,3.97393 144.107,3.97206 144.653,3.97034 145.2,3.9688 145.746,3.96745 \n",
" 146.293,3.9663 146.839,3.96537 147.386,3.96465 147.932,3.96415 148.479,3.9639 149.025,3.96387 149.572,3.96409 150.118,3.96454 150.665,3.96522 151.211,3.96612 \n",
" 151.758,3.96725 152.304,3.96859 152.851,3.97013 153.397,3.97186 153.944,3.97376 154.49,3.97582 155.037,3.97803 155.583,3.98036 156.13,3.98279 156.676,3.98531 \n",
" 157.223,3.98789 157.769,3.99052 158.316,3.99316 158.862,3.9958 159.409,3.99842 159.955,4.00099 160.502,4.00348 161.048,4.00589 161.595,4.00819 162.141,4.01036 \n",
" 162.688,4.01237 163.234,4.01422 163.781,4.01588 164.327,4.01734 164.874,4.01859 165.42,4.01962 165.967,4.0204 166.513,4.02096 167.06,4.02125 167.606,4.02131 \n",
" 168.153,4.0211 168.699,4.02065 169.246,4.01995 169.792,4.019 170.339,4.01782 170.885,4.0164 171.432,4.01478 171.978,4.01295 172.525,4.01092 173.071,4.00873 \n",
" 173.618,4.00638 174.164,4.0039 174.711,4.0013 175.257,3.99861 175.804,3.99585 176.35,3.99303 176.897,3.9902 177.443,3.98736 177.99,3.98455 178.536,3.98179 \n",
" 179.083,3.9791 179.629,3.97651 180.176,3.97403 180.722,3.97169 181.269,3.96951 181.815,3.96751 182.362,3.9657 182.908,3.96411 183.455,3.96275 184.001,3.96162 \n",
" 184.548,3.96075 185.094,3.96014 185.641,3.95979 186.187,3.95971 186.734,3.95989 187.28,3.96035 187.827,3.96109 188.373,3.96208 188.92,3.96333 189.466,3.96482 \n",
" 190.013,3.96655 190.559,3.96851 191.106,3.97066 191.652,3.97301 192.199,3.97553 192.745,3.97819 193.292,3.98099 193.838,3.98388 194.385,3.98686 194.931,3.98989 \n",
" 195.478,3.99295 196.024,3.99602 196.571,3.99906 197.117,4.00205 197.664,4.00497 198.21,4.00779 198.757,4.01049 199.303,4.01304 199.85,4.01542 200.396,4.01761 \n",
" 200.943,4.01959 201.489,4.02133 202.036,4.02284 202.582,4.02409 203.129,4.02506 203.675,4.02576 204.222,4.02617 204.768,4.02629 205.315,4.02611 205.861,4.02564 \n",
" 206.408,4.02488 206.954,4.02383 207.501,4.0225 208.047,4.02091 208.594,4.01905 209.14,4.01696 209.687,4.01464 210.233,4.01212 210.78,4.00941 211.326,4.00654 \n",
" 211.873,4.00353 212.419,4.0004 212.966,3.99719 213.512,3.99392 214.059,3.99061 214.605,3.9873 215.152,3.98401 215.698,3.98078 216.245,3.97762 216.791,3.97456 \n",
" 217.338,3.97165 217.884,3.96888 218.431,3.96631 218.977,3.96393 219.524,3.96178 220.07,3.95987 220.617,3.95824 221.163,3.95687 221.71,3.95579 222.256,3.95502 \n",
" 222.803,3.95455 223.349,3.95439 223.896,3.95455 224.442,3.95502 224.989,3.9558 225.535,3.95689 226.082,3.95827 226.628,3.95995 227.175,3.96189 227.721,3.96408 \n",
" 228.268,3.96652 228.814,3.96918 229.361,3.97203 229.907,3.97505 230.454,3.97822 231,3.9815 231.547,3.98488 232.093,3.98832 232.64,3.99179 233.186,3.99527 \n",
" 233.733,3.99871 234.279,4.00211 234.826,4.00541 235.372,4.00861 235.919,4.01166 236.465,4.01454 237.012,4.01723 237.558,4.0197 238.105,4.02194 238.651,4.02392 \n",
" 239.198,4.02563 239.744,4.02705 240.291,4.02818 240.837,4.02899 241.384,4.0295 241.93,4.02969 242.477,4.02956 243.023,4.02912 243.57,4.02838 244.116,4.02733 \n",
" 244.663,4.026 245.209,4.0244 245.756,4.02253 246.302,4.02044 246.849,4.01812 247.395,4.01561 247.942,4.01293 248.488,4.01011 249.035,4.00717 249.581,4.00415 \n",
" 250.128,4.00107 250.674,3.99795 251.221,3.99485 251.767,3.99176 252.314,3.98874 252.86,3.9858 253.407,3.98297 253.953,3.98027 254.5,3.97773 255.046,3.97536 \n",
" 255.593,3.97319 256.139,3.97123 256.686,3.96949 257.232,3.96797 257.779,3.96669 258.325,3.96565 258.872,3.96484 259.418,3.96427 259.965,3.96392 260.511,3.96378 \n",
" 261.058,3.96383 261.604,3.96407 262.151,3.96446 262.697,3.96499 263.244,3.96562 263.79,3.96633 264.337,3.96709 264.883,3.96786 265.43,3.96862 265.976,3.96932 \n",
" 266.523,3.96994 267.069,3.97044 267.616,3.9708 268.162,3.97097 268.709,3.97094 269.255,3.97068 269.802,3.97016 270.348,3.96938 270.895,3.96833 271.441,3.96699 \n",
" 271.988,3.96537 272.534,3.96349 273.081,3.96136 273.627,3.95901 274.174,3.95647 274.72,3.9538 275.267,3.95105 275.813,3.94829 276.36,3.9456 276.906,3.94308 \n",
" 277.453,3.94084 277.999,3.93898 278.546,3.93766 279.092,3.93701 279.639,3.9372 280.185,3.9384 280.732,3.9408 281.278,3.94461 281.825,3.95003 282.371,3.95732 \n",
" 282.918,3.9667 283.464,3.97844 284.011,3.9928 284.557,4.01008 285.104,4.03057 285.65,4.05457 286.197,4.08241 286.743,4.11442 287.29,4.15094 287.836,4.19231 \n",
" 288.383,4.23891 288.929,4.29109 289.476,4.34923 290.022,4.41372 290.569,4.48495 291.115,4.56331 291.662,4.64921 292.208,4.74304 292.755,4.84523 293.301,4.95619 \n",
" 293.848,5.07634 294.394,5.20609 294.941,5.34587 295.487,5.49611 296.034,5.65724 296.58,5.82968 297.127,6.01386 297.673,6.21021 298.22,6.41917 298.766,6.64116 \n",
" 299.313,6.87662 299.86,7.12596 300.406,7.38964 300.953,7.66808 301.499,7.9617 302.046,8.27093 302.592,8.59621 303.139,8.93797 303.685,9.29663 304.232,9.67263 \n",
" 304.778,10.0664 305.325,10.4783 305.871,10.9089 306.418,11.3586 306.964,11.8277 307.511,12.3168 308.057,12.8263 308.604,13.3566 309.15,13.9081 309.697,14.4813 \n",
" 310.243,15.0767 310.79,15.6948 311.336,16.3359 311.883,17.0005 312.429,17.6893 312.976,18.4025 313.522,19.1407 314.069,19.9044 314.615,20.6942 315.162,21.5105 \n",
" 315.708,22.3539 316.255,23.225 316.801,24.1242 317.348,25.0522 317.894,26.0095 318.441,26.9969 318.987,28.0148 319.534,29.064 320.08,30.1452 320.627,31.259 \n",
" 321.173,32.4061 321.72,33.5874 322.266,34.8037 322.813,36.0556 323.359,37.3442 323.906,38.6702 324.452,40.0347 324.999,41.4386 325.545,42.883 326.092,44.369 \n",
" 326.638,45.8977 327.185,47.4703 327.731,49.0882 328.278,50.7527 328.824,52.4653 329.371,54.2275 329.917,56.041 330.464,57.9076 331.01,59.8292 331.557,61.8079 \n",
" 332.103,63.8459 332.65,65.9455 333.196,68.1095 333.743,70.3406 334.289,72.6419 334.836,75.017 335.382,77.4694 335.929,80.0034 336.475,82.6237 337.022,85.3353 \n",
" 337.568,88.144 338.115,91.0565 338.661,94.0803 339.208,97.2238 339.754,100.497 340.301,103.911 340.847,107.481 341.394,111.221 341.94,115.153 342.487,119.299 \n",
" 343.033,123.691 343.58,128.366 344.126,133.376 344.673,138.786 345.219,144.69 345.766,151.225 346.312,158.599 346.859,167.159 347.405,177.545 347.952,191.171 \n",
" 348.498,212.373 349.045,290.845 349.591,221.842 350.138,203.778 350.684,194.709 351.231,189.243 351.777,185.758 352.324,183.547 352.87,182.235 353.417,181.602 \n",
" 353.963,181.504 354.51,181.843 355.056,182.549 355.603,183.566 356.149,184.851 356.696,186.365 357.242,188.074 357.789,189.943 358.335,191.938 358.882,194.019 \n",
" 359.428,196.146 359.975,198.271 360.521,200.344 361.068,202.31 361.614,204.112 362.161,205.696 362.707,207.013 363.254,208.026 363.8,208.714 364.347,209.072 \n",
" 364.893,209.117 365.44,208.879 365.986,208.402 366.533,207.736 367.079,206.936 367.626,206.053 368.172,205.135 368.719,204.226 369.265,203.362 369.812,202.576 \n",
" 370.358,201.893 370.905,201.339 371.451,200.931 371.998,200.69 372.544,200.633 373.091,200.776 373.637,201.138 374.184,201.741 374.73,202.609 375.277,203.771 \n",
" 375.823,205.266 376.37,207.143 376.916,209.47 377.463,212.342 378.009,215.899 378.556,220.359 379.102,226.087 379.649,233.777 380.195,244.999 380.742,264.878 \n",
" 381.288,354.228 381.835,262.032 382.381,242.781 382.928,231.414 383.474,223.386 384.021,217.241 384.567,212.327 385.114,208.293 385.66,204.93 386.207,202.104 \n",
" 386.753,199.724 387.3,197.728 387.846,196.067 388.393,194.71 388.939,193.631 389.486,192.813 390.032,192.242 390.579,191.912 391.125,191.818 391.672,191.96 \n",
" 392.218,192.341 392.765,192.969 393.311,193.856 393.858,195.019 394.404,196.483 394.951,198.28 395.497,200.456 396.044,203.075 396.59,206.226 397.137,210.044 \n",
" 397.683,214.736 398.23,220.651 398.776,228.441 399.323,239.556 399.869,258.518 400.416,348.302 400.962,261.051 401.509,240.858 402.055,229.349 402.602,221.375 \n",
" 403.148,215.358 403.695,210.606 404.241,206.753 404.788,203.58 405.334,200.95 405.881,198.769 406.427,196.973 406.974,195.514 407.52,194.359 408.067,193.483 \n",
" 408.613,192.87 409.16,192.506 409.706,192.386 410.253,192.506 410.799,192.868 411.346,193.477 411.892,194.342 412.439,195.48 412.985,196.912 413.532,198.668 \n",
" 414.078,200.79 414.625,203.335 415.171,206.385 415.718,210.059 416.264,214.543 416.811,220.135 417.357,227.383 417.904,237.43 418.45,253.451 418.997,294.383 \n",
" 419.543,271.708 420.09,246.439 420.636,233.482 421.183,224.828 421.729,218.422 422.276,213.42 422.822,209.394 423.369,206.096 423.915,203.372 424.462,201.119 \n",
" 425.008,199.264 425.555,197.758 426.101,196.563 426.648,195.654 427.194,195.01 427.741,194.62 428.287,194.475 428.834,194.571 429.38,194.91 429.927,195.495 \n",
" 430.473,196.336 431.02,197.448 431.566,198.85 432.113,200.573 432.659,202.656 433.206,205.154 433.752,208.146 434.299,211.745 434.845,216.126 435.392,221.571 \n",
" 435.938,228.586 436.485,238.207 437.031,253.183 437.578,287.355 438.124,279.266 438.671,250.696 439.217,236.947 439.764,227.935 440.31,221.324 440.857,216.187 \n",
" 441.403,212.065 441.95,208.695 442.496,205.913 443.043,203.612 443.589,201.717 444.136,200.176 444.682,198.95 445.229,198.012 445.775,197.342 446.322,196.926 \n",
" 446.868,196.757 447.415,196.829 447.961,197.144 448.508,197.704 449.054,198.52 449.601,199.605 450.147,200.98 450.694,202.672 451.24,204.72 451.787,207.179 \n",
" 452.333,210.123 452.88,213.665 453.426,217.971 453.973,223.314 454.519,230.173 455.066,239.52 455.612,253.866 456.159,284.753 456.705,285.68 457.252,254.339 \n",
" 457.798,240 458.345,230.726 458.891,223.963 459.438,218.725 459.984,214.529 460.531,211.102 461.077,208.273 461.624,205.932 462.17,204.002 462.717,202.429 \n",
" 463.263,201.174 463.81,200.208 464.356,199.513 464.903,199.072 465.449,198.878 465.996,198.926 466.542,199.217 467.089,199.753 467.635,200.544 468.182,201.602 \n",
" 468.728,202.949 469.275,204.611 469.821,206.626 470.368,209.047 470.914,211.948 471.461,215.438 472.007,219.678 472.554,224.932 473.1,231.659 473.647,240.782 \n",
" 474.193,254.629 474.74,283.216 475.286,291.805 475.833,257.601 476.379,242.719 476.926,233.207 477.472,226.307 478.019,220.978 478.565,216.714 479.112,213.233 \n",
" 479.658,210.36 480.205,207.981 480.751,206.018 481.298,204.414 481.844,203.131 482.391,202.139 482.937,201.417 483.484,200.952 484.03,200.734 484.577,200.758 \n",
" 485.123,201.024 485.67,201.536 486.216,202.301 486.763,203.334 487.309,204.652 487.856,206.284 488.402,208.267 488.949,210.651 489.495,213.511 490.042,216.95 \n",
" 490.588,221.127 491.135,226.296 491.681,232.9 492.228,241.816 492.774,255.216 493.321,281.924 493.867,298.118 494.414,260.579 494.96,245.138 495.507,235.39 \n",
" 496.053,228.354 496.6,222.934 497.146,218.604 497.693,215.07 498.239,212.153 498.786,209.737 499.332,207.74 499.879,206.106 500.425,204.794 500.972,203.776 \n",
" 501.518,203.029 502.065,202.539 502.611,202.296 503.158,202.296 503.704,202.538 504.251,203.025 504.797,203.765 505.344,204.771 505.89,206.062 506.437,207.665 \n",
" 506.983,209.615 507.53,211.963 508.076,214.78 508.623,218.17 509.169,222.285 509.716,227.372 510.262,233.856 510.809,242.573 511.355,255.552 511.902,280.626 \n",
" 512.448,305.031 512.995,263.323 513.541,247.283 514.088,237.287 514.634,230.111 515.181,224.598 515.727,220.2 516.274,216.613 516.82,213.653 517.367,211.198 \n",
" 517.913,209.167 518.46,207.503 519.006,206.163 519.553,205.118 520.099,204.345 520.646,203.831 521.192,203.564 521.739,203.539 522.285,203.757 522.832,204.219 \n",
" 523.378,204.934 523.925,205.914 524.471,207.178 525.018,208.75 525.564,210.668 526.111,212.98 526.657,215.756 527.204,219.096 527.75,223.149 528.297,228.155 \n",
" 528.843,234.521 529.39,243.044 529.936,255.622 530.483,279.24 531.029,313.093 531.576,265.864 532.122,249.168 532.669,238.91 533.215,231.588 533.762,225.98 \n",
" 534.308,221.512 534.855,217.871 535.401,214.865 535.948,212.372 536.494,210.308 537.041,208.612 537.587,207.244 538.134,206.172 538.68,205.374 539.227,204.834 \n",
" 539.773,204.543 540.32,204.495 540.866,204.688 541.413,205.126 541.959,205.816 542.506,206.77 543.052,208.005 543.599,209.548 544.145,211.434 544.692,213.71 \n",
" 545.238,216.444 545.785,219.735 546.331,223.727 546.878,228.651 547.424,234.902 547.971,243.236 548.517,255.43 549.064,277.738 549.61,323.321 550.157,268.222 \n",
" 550.703,250.807 551.25,240.269 551.796,232.796 552.343,227.088 552.889,222.549 553.436,218.851 553.982,215.8 554.529,213.268 555.075,211.169 555.622,209.443 \n",
" 556.168,208.046 556.715,206.947 557.261,206.123 557.808,205.558 558.354,205.243 558.901,205.17 559.447,205.339 559.994,205.753 560.54,206.417 561.087,207.345 \n",
" 561.633,208.553 562.18,210.067 562.726,211.92 563.273,214.16 563.819,216.853 564.366,220.095 564.912,224.026 565.459,228.871 566.005,235.008 566.552,243.158 \n",
" 567.098,254.985 567.645,276.11 568.191,338.265 568.738,270.415 569.284,252.205 569.831,241.372 570.377,233.739 570.924,227.929 571.47,223.316 572.017,219.561 \n",
" 572.563,216.464 573.11,213.892 573.656,211.758 574.203,210 574.749,208.575 575.296,207.448 575.842,206.599 576.389,206.009 576.935,205.669 577.482,205.573 \n",
" 578.028,205.718 578.575,206.107 579.121,206.746 579.668,207.648 580.214,208.828 580.761,210.313 581.307,212.134 581.854,214.338 582.4,216.99 582.947,220.183 \n",
" 583.493,224.055 584.04,228.821 584.586,234.846 585.133,242.818 585.679,254.296 586.226,274.351 586.772,369.674 587.319,272.455 587.865,253.368 588.412,242.221 \n",
" 588.958,234.422 589.505,228.506 590.051,223.817 590.598,220.005 591.144,216.86 591.691,214.248 592.237,212.079 592.784,210.29 593.33,208.835 593.877,207.682 \n",
" 594.423,206.806 594.97,206.192 595.516,205.827 596.063,205.706 \n",
" \"/>\n",
"<polygon clip-path=\"url(#clip00)\" points=\"\n",
"505.547,55.057 578.063,55.057 578.063,24.817 505.547,24.817 \n",
" \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
"<polyline clip-path=\"url(#clip00)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 505.547,55.057 578.063,55.057 578.063,24.817 505.547,24.817 505.547,55.057 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip00)\" style=\"stroke:#0099ff; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 511.547,39.937 547.547,39.937 \n",
" \"/>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 553.547, 44.437)\" x=\"553.547\" y=\"44.437\">y1</text>\n",
"</g>\n",
"</svg>\n"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plot(ws, h_db, xlabel = \"Frequency (Hz)\", ylabel = \"Magnitude (db)\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 600 400\">\n",
"<defs>\n",
" <clipPath id=\"clip00\">\n",
" <rect x=\"0\" y=\"0\" width=\"600\" height=\"400\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<polygon clip-path=\"url(#clip00)\" points=\"\n",
"0,400 600,400 600,0 0,0 \n",
" \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
"<defs>\n",
" <clipPath id=\"clip01\">\n",
" <rect x=\"120\" y=\"0\" width=\"421\" height=\"400\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<polygon clip-path=\"url(#clip00)\" points=\"\n",
"45.8815,369.674 596.063,369.674 596.063,3.93701 45.8815,3.93701 \n",
" \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
"<defs>\n",
" <clipPath id=\"clip02\">\n",
" <rect x=\"45\" y=\"3\" width=\"551\" height=\"366\"/>\n",
" </clipPath>\n",
"</defs>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 45.8815,364.188 45.8815,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 155.918,364.188 155.918,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 265.954,364.188 265.954,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 375.99,364.188 375.99,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 486.027,364.188 486.027,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 596.063,364.188 596.063,9.42306 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 54.1342,319.355 587.81,319.355 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 54.1342,256.271 587.81,256.271 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 54.1342,193.188 587.81,193.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 54.1342,130.104 587.81,130.104 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 54.1342,67.0205 587.81,67.0205 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:0.5; fill:none\" stroke-dasharray=\"1, 2\" points=\"\n",
" 54.1342,3.93701 587.81,3.93701 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,369.674 596.063,369.674 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,369.674 45.8815,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 155.918,369.674 155.918,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 265.954,369.674 265.954,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 375.99,369.674 375.99,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 486.027,369.674 486.027,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 596.063,369.674 596.063,364.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,369.674 45.8815,3.93701 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,319.355 54.1342,319.355 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,256.271 54.1342,256.271 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,193.188 54.1342,193.188 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,130.104 54.1342,130.104 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,67.0205 54.1342,67.0205 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,3.93701 54.1342,3.93701 \n",
" \"/>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 45.8815, 381.674)\" x=\"45.8815\" y=\"381.674\">0</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 155.918, 381.674)\" x=\"155.918\" y=\"381.674\">2</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 265.954, 381.674)\" x=\"265.954\" y=\"381.674\">4</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 375.99, 381.674)\" x=\"375.99\" y=\"381.674\">6</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 486.027, 381.674)\" x=\"486.027\" y=\"381.674\">8</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:middle;\" transform=\"rotate(0, 596.063, 381.674)\" x=\"596.063\" y=\"381.674\">10</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 44.6815, 323.855)\" x=\"44.6815\" y=\"323.855\">-50</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 44.6815, 260.771)\" x=\"44.6815\" y=\"260.771\">-40</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 44.6815, 197.688)\" x=\"44.6815\" y=\"197.688\">-30</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 44.6815, 134.604)\" x=\"44.6815\" y=\"134.604\">-20</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 44.6815, 71.5205)\" x=\"44.6815\" y=\"71.5205\">-10</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:end;\" transform=\"rotate(0, 44.6815, 8.43701)\" x=\"44.6815\" y=\"8.43701\">0</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(0, 320.972, 397.6)\" x=\"320.972\" y=\"397.6\">Frequency (Hz)</text>\n",
"</g>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:16; text-anchor:middle;\" transform=\"rotate(-90, 14.4, 186.806)\" x=\"14.4\" y=\"186.806\">Phase (radians)</text>\n",
"</g>\n",
"<polyline clip-path=\"url(#clip02)\" style=\"stroke:#0099ff; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 45.8815,3.93701 46.4193,4.53756 46.9571,5.13811 47.4949,5.73867 48.0327,6.33922 48.5705,6.93978 49.1083,7.54033 49.6461,8.14088 50.1839,8.74144 50.7218,9.34199 \n",
" 51.2596,9.94254 51.7974,10.5431 52.3352,11.1436 52.873,11.7442 53.4108,12.3448 53.9486,12.9453 54.4864,13.5459 55.0243,14.1464 55.5621,14.747 56.0999,15.3475 \n",
" 56.6377,15.9481 57.1755,16.5486 57.7133,17.1492 58.2511,17.7497 58.7889,18.3503 59.3267,18.9508 59.8646,19.5514 60.4024,20.152 60.9402,20.7525 61.478,21.3531 \n",
" 62.0158,21.9536 62.5536,22.5542 63.0914,23.1547 63.6292,23.7553 64.1671,24.3558 64.7049,24.9564 65.2427,25.5569 65.7805,26.1575 66.3183,26.758 66.8561,27.3586 \n",
" 67.3939,27.9591 67.9317,28.5597 68.4696,29.1603 69.0074,29.7608 69.5452,30.3614 70.083,30.9619 70.6208,31.5625 71.1586,32.163 71.6964,32.7636 72.2342,33.3641 \n",
" 72.772,33.9647 73.3099,34.5652 73.8477,35.1658 74.3855,35.7663 74.9233,36.3669 75.4611,36.9675 75.9989,37.568 76.5367,38.1686 77.0745,38.7691 77.6124,39.3697 \n",
" 78.1502,39.9702 78.688,40.5708 79.2258,41.1713 79.7636,41.7719 80.3014,42.3724 80.8392,42.973 81.377,43.5735 81.9148,44.1741 82.4527,44.7746 82.9905,45.3752 \n",
" 83.5283,45.9758 84.0661,46.5763 84.6039,47.1769 85.1417,47.7774 85.6795,48.378 86.2173,48.9785 86.7552,49.5791 87.293,50.1796 87.8308,50.7802 88.3686,51.3807 \n",
" 88.9064,51.9813 89.4442,52.5818 89.982,53.1824 90.5198,53.783 91.0576,54.3835 91.5955,54.9841 92.1333,55.5846 92.6711,56.1852 93.2089,56.7857 93.7467,57.3863 \n",
" 94.2845,57.9868 94.8223,58.5874 95.3601,59.1879 95.898,59.7885 96.4358,60.389 96.9736,60.9896 97.5114,61.5901 98.0492,62.1907 98.587,62.7913 99.1248,63.3918 \n",
" 99.6626,63.9924 100.2,64.5929 100.738,65.1935 101.276,65.794 101.814,66.3946 102.352,66.9951 102.89,67.5957 103.427,68.1962 103.965,68.7968 104.503,69.3973 \n",
" 105.041,69.9979 105.579,70.5985 106.116,71.199 106.654,71.7996 107.192,72.4001 107.73,73.0007 108.268,73.6012 108.805,74.2018 109.343,74.8023 109.881,75.4029 \n",
" 110.419,76.0034 110.957,76.604 111.495,77.2045 112.032,77.8051 112.57,78.4056 113.108,79.0062 113.646,79.6068 114.184,80.2073 114.721,80.8079 115.259,81.4084 \n",
" 115.797,82.009 116.335,82.6095 116.873,83.2101 117.41,83.8106 117.948,84.4112 118.486,85.0117 119.024,85.6123 119.562,86.2128 120.099,86.8134 120.637,87.4139 \n",
" 121.175,88.0145 121.713,88.6151 122.251,89.2156 122.789,89.8162 123.326,90.4167 123.864,91.0173 124.402,91.6178 124.94,92.2184 125.478,92.8189 126.015,93.4195 \n",
" 126.553,94.02 127.091,94.6206 127.629,95.2211 128.167,95.8217 128.704,96.4223 129.242,97.0228 129.78,97.6234 130.318,98.2239 130.856,98.8245 131.394,99.425 \n",
" 131.931,100.026 132.469,100.626 133.007,101.227 133.545,101.827 134.083,102.428 134.62,103.028 135.158,103.629 135.696,104.229 136.234,104.83 136.772,105.431 \n",
" 137.309,106.031 137.847,106.632 138.385,107.232 138.923,107.833 139.461,108.433 139.999,109.034 140.536,109.634 141.074,110.235 141.612,110.836 142.15,111.436 \n",
" 142.688,112.037 143.225,112.637 143.763,113.238 144.301,113.838 144.839,114.439 145.377,115.039 145.914,115.64 146.452,116.241 146.99,116.841 147.528,117.442 \n",
" 148.066,118.042 148.604,118.643 149.141,119.243 149.679,119.844 150.217,120.444 150.755,121.045 151.293,121.645 151.83,122.246 152.368,122.847 152.906,123.447 \n",
" 153.444,124.048 153.982,124.648 154.519,125.249 155.057,125.849 155.595,126.45 156.133,127.05 156.671,127.651 157.209,128.252 157.746,128.852 158.284,129.453 \n",
" 158.822,130.053 159.36,130.654 159.898,131.254 160.435,131.855 160.973,132.455 161.511,133.056 162.049,133.657 162.587,134.257 163.124,134.858 163.662,135.458 \n",
" 164.2,136.059 164.738,136.659 165.276,137.26 165.813,137.86 166.351,138.461 166.889,139.062 167.427,139.662 167.965,140.263 168.503,140.863 169.04,141.464 \n",
" 169.578,142.064 170.116,142.665 170.654,143.265 171.192,143.866 171.729,144.467 172.267,145.067 172.805,145.668 173.343,146.268 173.881,146.869 174.418,147.469 \n",
" 174.956,148.07 175.494,148.67 176.032,149.271 176.57,149.872 177.108,150.472 177.645,151.073 178.183,151.673 178.721,152.274 179.259,152.874 179.797,153.475 \n",
" 180.334,154.075 180.872,154.676 181.41,155.276 181.948,155.877 182.486,156.478 183.023,157.078 183.561,157.679 184.099,158.279 184.637,158.88 185.175,159.48 \n",
" 185.713,160.081 186.25,160.681 186.788,161.282 187.326,161.883 187.864,162.483 188.402,163.084 188.939,163.684 189.477,164.285 190.015,164.885 190.553,165.486 \n",
" 191.091,166.086 191.628,166.687 192.166,167.288 192.704,167.888 193.242,168.489 193.78,169.089 194.318,169.69 194.855,170.29 195.393,170.891 195.931,171.491 \n",
" 196.469,172.092 197.007,172.693 197.544,173.293 198.082,173.894 198.62,174.494 199.158,175.095 199.696,175.695 200.233,176.296 200.771,176.896 201.309,177.497 \n",
" 201.847,178.098 202.385,178.698 202.923,179.299 203.46,179.899 203.998,180.5 204.536,181.1 205.074,181.701 205.612,182.301 206.149,182.902 206.687,183.503 \n",
" 207.225,184.103 207.763,184.704 208.301,185.304 208.838,185.905 209.376,186.505 209.914,187.106 210.452,187.706 210.99,188.307 211.528,188.907 212.065,189.508 \n",
" 212.603,190.109 213.141,190.709 213.679,191.31 214.217,191.91 214.754,192.511 215.292,193.111 215.83,193.712 216.368,194.312 216.906,194.913 217.443,195.514 \n",
" 217.981,196.114 218.519,196.715 219.057,197.315 219.595,197.916 220.132,198.516 220.67,199.117 221.208,199.717 221.746,200.318 222.284,200.919 222.822,201.519 \n",
" 223.359,202.12 223.897,202.72 224.435,203.321 224.973,203.921 225.511,204.522 226.048,205.122 226.586,205.723 227.124,206.324 227.662,206.924 228.2,207.525 \n",
" 228.737,208.125 229.275,208.726 229.813,209.326 230.351,209.927 230.889,210.527 231.427,211.128 231.964,211.729 232.502,212.329 233.04,212.93 233.578,213.53 \n",
" 234.116,214.131 234.653,214.731 235.191,215.332 235.729,215.932 236.267,216.533 236.805,217.134 237.342,217.734 237.88,218.335 238.418,218.935 238.956,219.536 \n",
" 239.494,220.136 240.032,220.737 240.569,221.337 241.107,221.938 241.645,222.538 242.183,223.139 242.721,223.74 243.258,224.34 243.796,224.941 244.334,225.541 \n",
" 244.872,226.142 245.41,226.742 245.947,227.343 246.485,227.943 247.023,228.544 247.561,229.145 248.099,229.745 248.637,230.346 249.174,230.946 249.712,231.547 \n",
" 250.25,232.147 250.788,232.748 251.326,233.348 251.863,233.949 252.401,234.55 252.939,235.15 253.477,235.751 254.015,236.351 254.552,236.952 255.09,237.552 \n",
" 255.628,238.153 256.166,238.753 256.704,239.354 257.242,239.955 257.779,240.555 258.317,241.156 258.855,241.756 259.393,242.357 259.931,242.957 260.468,243.558 \n",
" 261.006,244.158 261.544,244.759 262.082,245.36 262.62,245.96 263.157,246.561 263.695,247.161 264.233,247.762 264.771,248.362 265.309,248.963 265.847,249.563 \n",
" 266.384,250.164 266.922,250.765 267.46,251.365 267.998,251.966 268.536,252.566 269.073,253.167 269.611,253.767 270.149,254.368 270.687,254.968 271.225,255.569 \n",
" 271.762,256.169 272.3,256.77 272.838,257.371 273.376,257.971 273.914,258.572 274.451,259.172 274.989,259.773 275.527,260.373 276.065,260.974 276.603,261.574 \n",
" 277.141,262.175 277.678,262.776 278.216,263.376 278.754,263.977 279.292,264.577 279.83,265.178 280.367,265.778 280.905,266.379 281.443,266.979 281.981,267.58 \n",
" 282.519,268.181 283.056,268.781 283.594,269.382 284.132,269.982 284.67,270.583 285.208,271.183 285.746,271.784 286.283,272.384 286.821,272.985 287.359,273.586 \n",
" 287.897,274.186 288.435,274.787 288.972,275.387 289.51,275.988 290.048,276.588 290.586,277.189 291.124,277.789 291.661,278.39 292.199,278.991 292.737,279.591 \n",
" 293.275,280.192 293.813,280.792 294.351,281.393 294.888,281.993 295.426,282.594 295.964,283.194 296.502,283.795 297.04,284.395 297.577,284.996 298.115,285.597 \n",
" 298.653,286.197 299.191,286.798 299.729,287.398 300.266,287.999 300.804,288.599 301.342,289.2 301.88,289.8 302.418,290.401 302.956,291.002 303.493,291.602 \n",
" 304.031,292.203 304.569,292.803 305.107,293.404 305.645,294.004 306.182,294.605 306.72,295.205 307.258,295.806 307.796,296.407 308.334,297.007 308.871,297.608 \n",
" 309.409,298.208 309.947,298.809 310.485,299.409 311.023,300.01 311.561,300.61 312.098,301.211 312.636,301.812 313.174,302.412 313.712,303.013 314.25,303.613 \n",
" 314.787,304.214 315.325,304.814 315.863,305.415 316.401,306.015 316.939,306.616 317.476,307.217 318.014,307.817 318.552,308.418 319.09,309.018 319.628,309.619 \n",
" 320.166,310.219 320.703,310.82 321.241,311.42 321.779,312.021 322.317,312.622 322.855,313.222 323.392,313.823 323.93,314.423 324.468,315.024 325.006,315.624 \n",
" 325.544,316.225 326.081,316.825 326.619,317.426 327.157,318.027 327.695,318.627 328.233,319.228 328.77,319.828 329.308,320.429 329.846,321.029 330.384,321.63 \n",
" 330.922,322.23 331.46,322.831 331.997,323.431 332.535,324.032 333.073,324.633 333.611,325.233 334.149,325.834 334.686,326.434 335.224,327.035 335.762,327.635 \n",
" 336.3,328.236 336.838,328.836 337.375,329.437 337.913,330.038 338.451,330.638 338.989,331.239 339.527,331.839 340.065,332.44 340.602,333.04 341.14,333.641 \n",
" 341.678,334.241 342.216,334.842 342.754,335.443 343.291,336.043 343.829,336.644 344.367,337.244 344.905,337.845 345.443,338.445 345.98,339.046 346.518,339.646 \n",
" 347.056,340.247 347.594,340.848 348.132,341.448 348.67,342.049 349.207,342.649 349.745,343.25 350.283,343.85 350.821,344.451 351.359,345.051 351.896,345.652 \n",
" 352.434,346.253 352.972,346.853 353.51,327.635 354.048,328.236 354.585,328.836 355.123,329.437 355.661,330.038 356.199,330.638 356.737,331.239 357.275,331.839 \n",
" 357.812,332.44 358.35,333.04 358.888,333.641 359.426,334.241 359.964,334.842 360.501,335.443 361.039,336.043 361.577,336.644 362.115,337.244 362.653,337.845 \n",
" 363.19,338.445 363.728,339.046 364.266,339.646 364.804,340.247 365.342,340.848 365.88,341.448 366.417,342.049 366.955,342.649 367.493,343.25 368.031,343.85 \n",
" 368.569,344.451 369.106,345.051 369.644,345.652 370.182,346.253 370.72,346.853 371.258,347.454 371.795,348.054 372.333,348.655 372.871,349.255 373.409,349.856 \n",
" 373.947,350.456 374.485,351.057 375.022,351.657 375.56,352.258 376.098,352.859 376.636,353.459 377.174,354.06 377.711,354.66 378.249,355.261 378.787,355.861 \n",
" 379.325,356.462 379.863,357.062 380.4,357.663 380.938,358.264 381.476,358.864 382.014,359.465 382.552,360.065 383.089,360.666 383.627,361.266 384.165,361.867 \n",
" 384.703,342.649 385.241,343.25 385.779,343.85 386.316,344.451 386.854,345.051 387.392,345.652 387.93,346.253 388.468,346.853 389.005,347.454 389.543,348.054 \n",
" 390.081,348.655 390.619,349.255 391.157,349.856 391.694,350.456 392.232,351.057 392.77,351.657 393.308,352.258 393.846,352.859 394.384,353.459 394.921,354.06 \n",
" 395.459,354.66 395.997,355.261 396.535,355.861 397.073,356.462 397.61,357.062 398.148,357.663 398.686,358.264 399.224,358.864 399.762,359.465 400.299,360.065 \n",
" 400.837,360.666 401.375,361.266 401.913,361.867 402.451,362.467 402.989,363.068 403.526,363.669 404.064,344.451 404.602,345.051 405.14,345.652 405.678,346.253 \n",
" 406.215,346.853 406.753,347.454 407.291,348.054 407.829,348.655 408.367,349.255 408.904,349.856 409.442,350.456 409.98,351.057 410.518,351.657 411.056,352.258 \n",
" 411.594,352.859 412.131,353.459 412.669,354.06 413.207,354.66 413.745,355.261 414.283,355.861 414.82,356.462 415.358,357.062 415.896,357.663 416.434,358.264 \n",
" 416.972,358.864 417.509,359.465 418.047,360.065 418.585,360.666 419.123,361.266 419.661,361.867 420.199,362.467 420.736,363.068 421.274,363.669 421.812,364.269 \n",
" 422.35,345.051 422.888,345.652 423.425,346.253 423.963,346.853 424.501,347.454 425.039,348.054 425.577,348.655 426.114,349.255 426.652,349.856 427.19,350.456 \n",
" 427.728,351.057 428.266,351.657 428.804,352.258 429.341,352.859 429.879,353.459 430.417,354.06 430.955,354.66 431.493,355.261 432.03,355.861 432.568,356.462 \n",
" 433.106,357.062 433.644,357.663 434.182,358.264 434.719,358.864 435.257,359.465 435.795,360.065 436.333,360.666 436.871,361.266 437.408,361.867 437.946,362.467 \n",
" 438.484,363.068 439.022,363.669 439.56,364.269 440.098,364.87 440.635,345.652 441.173,346.253 441.711,346.853 442.249,347.454 442.787,348.054 443.324,348.655 \n",
" 443.862,349.255 444.4,349.856 444.938,350.456 445.476,351.057 446.013,351.657 446.551,352.258 447.089,352.859 447.627,353.459 448.165,354.06 448.703,354.66 \n",
" 449.24,355.261 449.778,355.861 450.316,356.462 450.854,357.062 451.392,357.663 451.929,358.264 452.467,358.864 453.005,359.465 453.543,360.065 454.081,360.666 \n",
" 454.618,361.266 455.156,361.867 455.694,362.467 456.232,363.068 456.77,363.669 457.308,364.269 457.845,364.87 458.383,365.47 458.921,346.253 459.459,346.853 \n",
" 459.997,347.454 460.534,348.054 461.072,348.655 461.61,349.255 462.148,349.856 462.686,350.456 463.223,351.057 463.761,351.657 464.299,352.258 464.837,352.859 \n",
" 465.375,353.459 465.913,354.06 466.45,354.66 466.988,355.261 467.526,355.861 468.064,356.462 468.602,357.062 469.139,357.663 469.677,358.264 470.215,358.864 \n",
" 470.753,359.465 471.291,360.065 471.828,360.666 472.366,361.266 472.904,361.867 473.442,362.467 473.98,363.068 474.518,363.669 475.055,364.269 475.593,364.87 \n",
" 476.131,365.47 476.669,366.071 477.207,346.853 477.744,347.454 478.282,348.054 478.82,348.655 479.358,349.255 479.896,349.856 480.433,350.456 480.971,351.057 \n",
" 481.509,351.657 482.047,352.258 482.585,352.859 483.123,353.459 483.66,354.06 484.198,354.66 484.736,355.261 485.274,355.861 485.812,356.462 486.349,357.062 \n",
" 486.887,357.663 487.425,358.264 487.963,358.864 488.501,359.465 489.038,360.065 489.576,360.666 490.114,361.266 490.652,361.867 491.19,362.467 491.727,363.068 \n",
" 492.265,363.669 492.803,364.269 493.341,364.87 493.879,365.47 494.417,366.071 494.954,366.671 495.492,347.454 496.03,348.054 496.568,348.655 497.106,349.255 \n",
" 497.643,349.856 498.181,350.456 498.719,351.057 499.257,351.657 499.795,352.258 500.332,352.859 500.87,353.459 501.408,354.06 501.946,354.66 502.484,355.261 \n",
" 503.022,355.861 503.559,356.462 504.097,357.062 504.635,357.663 505.173,358.264 505.711,358.864 506.248,359.465 506.786,360.065 507.324,360.666 507.862,361.266 \n",
" 508.4,361.867 508.937,362.467 509.475,363.068 510.013,363.669 510.551,364.269 511.089,364.87 511.627,365.47 512.164,366.071 512.702,366.671 513.24,367.272 \n",
" 513.778,348.054 514.316,348.655 514.853,349.255 515.391,349.856 515.929,350.456 516.467,351.057 517.005,351.657 517.542,352.258 518.08,352.859 518.618,353.459 \n",
" 519.156,354.06 519.694,354.66 520.232,355.261 520.769,355.861 521.307,356.462 521.845,357.062 522.383,357.663 522.921,358.264 523.458,358.864 523.996,359.465 \n",
" 524.534,360.065 525.072,360.666 525.61,361.266 526.147,361.867 526.685,362.467 527.223,363.068 527.761,363.669 528.299,364.269 528.837,364.87 529.374,365.47 \n",
" 529.912,366.071 530.45,366.671 530.988,367.272 531.526,367.872 532.063,348.655 532.601,349.255 533.139,349.856 533.677,350.456 534.215,351.057 534.752,351.657 \n",
" 535.29,352.258 535.828,352.859 536.366,353.459 536.904,354.06 537.441,354.66 537.979,355.261 538.517,355.861 539.055,356.462 539.593,357.062 540.131,357.663 \n",
" 540.668,358.264 541.206,358.864 541.744,359.465 542.282,360.065 542.82,360.666 543.357,361.266 543.895,361.867 544.433,362.467 544.971,363.068 545.509,363.669 \n",
" 546.046,364.269 546.584,364.87 547.122,365.47 547.66,366.071 548.198,366.671 548.736,367.272 549.273,367.872 549.811,368.473 550.349,349.255 550.887,349.856 \n",
" 551.425,350.456 551.962,351.057 552.5,351.657 553.038,352.258 553.576,352.859 554.114,353.459 554.651,354.06 555.189,354.66 555.727,355.261 556.265,355.861 \n",
" 556.803,356.462 557.341,357.062 557.878,357.663 558.416,358.264 558.954,358.864 559.492,359.465 560.03,360.065 560.567,360.666 561.105,361.266 561.643,361.867 \n",
" 562.181,362.467 562.719,363.068 563.256,363.669 563.794,364.269 564.332,364.87 564.87,365.47 565.408,366.071 565.946,366.671 566.483,367.272 567.021,367.872 \n",
" 567.559,368.473 568.097,369.074 568.635,349.856 569.172,350.456 569.71,351.057 570.248,351.657 570.786,352.258 571.324,352.859 571.861,353.459 572.399,354.06 \n",
" 572.937,354.66 573.475,355.261 574.013,355.861 574.551,356.462 575.088,357.062 575.626,357.663 576.164,358.264 576.702,358.864 577.24,359.465 577.777,360.065 \n",
" 578.315,360.666 578.853,361.266 579.391,361.867 579.929,362.467 580.466,363.068 581.004,363.669 581.542,364.269 582.08,364.87 582.618,365.47 583.156,366.071 \n",
" 583.693,366.671 584.231,367.272 584.769,367.872 585.307,368.473 585.845,369.074 586.382,369.674 586.92,350.456 587.458,351.057 587.996,351.657 588.534,352.258 \n",
" 589.071,352.859 589.609,353.459 590.147,354.06 590.685,354.66 591.223,355.261 591.76,355.861 592.298,356.462 592.836,357.062 593.374,357.663 593.912,358.264 \n",
" 594.45,358.864 594.987,359.465 595.525,360.065 596.063,360.666 \n",
" \"/>\n",
"<polygon clip-path=\"url(#clip00)\" points=\"\n",
"505.547,55.057 578.063,55.057 578.063,24.817 505.547,24.817 \n",
" \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n",
"<polyline clip-path=\"url(#clip00)\" style=\"stroke:#00002d; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 505.547,55.057 578.063,55.057 578.063,24.817 505.547,24.817 505.547,55.057 \n",
" \"/>\n",
"<polyline clip-path=\"url(#clip00)\" style=\"stroke:#0099ff; stroke-width:0.8; stroke-opacity:1; fill:none\" points=\"\n",
" 511.547,39.937 547.547,39.937 \n",
" \"/>\n",
"<g clip-path=\"url(#clip00)\">\n",
"<text style=\"fill:#00002d; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:12; text-anchor:start;\" transform=\"rotate(0, 553.547, 44.437)\" x=\"553.547\" y=\"44.437\">y1</text>\n",
"</g>\n",
"</svg>\n"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"h_phase = unwrap(-atan2(imag(h),real(h)))\n",
"plot(ws, h_phase, xlabel = \"Frequency (Hz)\", ylabel = \"Phase (radians)\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Julia 0.5.0",
"language": "julia",
"name": "julia-0.5"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "0.5.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

File diff suppressed because one or more lines are too long

694
tmp/FIR.html Normal file

File diff suppressed because one or more lines are too long

97
tmp/FIR.jl Normal file
View File

@ -0,0 +1,97 @@
#' % FIR filter design with Julia
#' % Matti Pastell
#' % 21th April 2016
#'
#' # Introduction
#'
#' This an example of a julia script that can be published using
#' [Weave](http://mpastell.github.io/Weave.jl/latest/usage/).
#' The script can be executed normally using Julia
#' or published to HTML or pdf with Weave.
#' Text is written in markdown in lines starting with "`#'` " and code
#' is executed and results are included in the published document.
#'
#' Notice that you don't need to define chunk options, but you can using
#' `#+`. just before code e.g. `#+ term=True, caption='Fancy plots.'`.
#' If you're viewing the published version have a look at the
#' [source](FIR_design_plots.jl) to see the markup.
#'
#'
#' # FIR Filter Design
#'
#' We'll implement lowpass, highpass and ' bandpass FIR filters. If
#' you want to read more about DSP I highly recommend [The Scientist
#' and Engineer's Guide to Digital Signal
#' Processing](http://www.dspguide.com/) which is freely available
#' online.
#'
#' ## Calculating frequency response
#'
#' DSP.jl package doesn't (yet) have a method to calculate the
#' the frequency response of a FIR filter so we define it:
#'
#'
#+
using Plots, DSP
plotly()
function FIRfreqz(b::Array, w = linspace(0, π, 1024))
n = length(w)
h = Array{Complex64}(n)
sw = 0
for i = 1:n
for j = 1:length(b)
sw += b[j]*exp(-im*w[i])^-j
end
h[i] = sw
sw = 0
end
return h
end
#'
#' ## Design Lowpass FIR filter
#'
#' Designing a lowpass FIR filter is very simple to do with DSP.jl, all you
#' need to do is to define the window length, cut off frequency and the
#' window. We will define a lowpass filter with cut off frequency at 5Hz for a signal
#' sampled at 20 Hz.
#' We will use the Hamming window, which is defined as:
#' $w(n) = \alpha - \beta\cos\frac{2\pi n}{N-1}$, where $\alpha=0.54$ and $\beta=0.46$
#'
#'
#'
#+
fs = 20
f = digitalfilter(Lowpass(5, fs = fs), FIRWindow(hamming(61)))
w = linspace(0, pi, 1024)
h = FIRfreqz(f, w)
#'
#' ## Plot the frequency and impulse response
#'
#' The next code chunk is executed in term mode, see the [script](FIR_design.jl) for syntax.
#'
#+ term=true
h_db = log10(abs(h));
ws = w/pi*(fs/2)
#+
plot(ws, h_db,
xlabel = "Frequency (Hz)", ylabel = "Magnitude (db)")
#'
#' And again with default options
#'
#'
#+
h_phase = unwrap(-atan2(imag(h),real(h)))
plot(ws, h_phase,
xlabel = "Frequency (Hz)", ylabel = "Phase (radians)")

132
tmp/FIR.md Normal file

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More