mirror of https://github.com/mpastell/Weave.jl
Gadfly tests pass
parent
4fb521e219
commit
6ab22417bf
|
@ -8,6 +8,8 @@ and Sweave.
|
|||
|
||||
You can write your documentation and code in input document using Nowed or Markdown syntax and use `weave` function to execute to document to capture results and figures.
|
||||
|
||||
**Master branch has now been ported to Julia 0.4, caching doesn't work and PyPlot output tests need to be checked**.
|
||||
|
||||
**Current features**
|
||||
|
||||
* Noweb or markdown syntax for input documents.
|
||||
|
|
|
@ -7,7 +7,7 @@ function savefigs_pyplot(chunk, report::Report)
|
|||
isdir(figpath) || mkdir(figpath)
|
||||
chunkid = (chunk.options[:name] == nothing) ? chunk.number : chunk.options[:name]
|
||||
#Iterate over all open figures, save them and store names
|
||||
info("Saving figs")
|
||||
#info("Saving figs")
|
||||
|
||||
for fig = plt[:get_fignums]()
|
||||
full_name, rel_name = get_figname(report, chunk, fignum=fig)
|
||||
|
|
|
@ -103,7 +103,7 @@ function run_code(chunk::CodeChunk, report::Report, SandBox::Module)
|
|||
reset_report(report)
|
||||
(obj, out) = capture_output(expr, SandBox, chunk.options[:term], rcParams[:plotlib])
|
||||
|
||||
if lowercase(rcParams[:plotlib]) == "pyplot"
|
||||
if rcParams[:plotlib] == "pyplot"
|
||||
savefigs_pyplot(chunk, report::Report)
|
||||
end
|
||||
|
||||
|
|
|
@ -14,29 +14,29 @@ julia> y= [2, 5, 12]
|
|||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","x = [12, 10]")
|
||||
(" ","println(y)")
|
||||
(" ","")
|
||||
|
||||
x = [12, 10]
|
||||
println(y)
|
||||
|
||||
|
||||
|
||||
|
||||
::
|
||||
(" ","")
|
||||
(" ","[2,5,12]")
|
||||
|
||||
[2,5,12]
|
||||
|
||||
|
||||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","println(x)")
|
||||
|
||||
println(x)
|
||||
|
||||
|
||||
|
||||
::
|
||||
(" ","")
|
||||
(" ","[12,10]")
|
||||
|
||||
[12,10]
|
||||
|
||||
|
||||
|
||||
|
@ -45,15 +45,15 @@ julia> y= [2, 5, 12]
|
|||
|
||||
|
||||
::
|
||||
(" ","")
|
||||
(" ","Results without code")
|
||||
|
||||
Results without code
|
||||
|
||||
|
||||
|
||||
|
||||
::
|
||||
(" ","")
|
||||
(" ","[12,10]")
|
||||
|
||||
[12,10]
|
||||
|
||||
|
||||
|
||||
|
@ -62,9 +62,9 @@ julia> y= [2, 5, 12]
|
|||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","y = randn(5)")
|
||||
(" ","println(\"Don't eval, but show code\")")
|
||||
|
||||
y = randn(5)
|
||||
println("Don't eval, but show code")
|
||||
|
||||
|
||||
|
||||
|
@ -72,15 +72,15 @@ julia> y= [2, 5, 12]
|
|||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","y = 1:5")
|
||||
(" ","println(y)")
|
||||
|
||||
y = 1:5
|
||||
println(y)
|
||||
|
||||
|
||||
|
||||
::
|
||||
(" ","")
|
||||
(" ","1:5")
|
||||
|
||||
1:5
|
||||
|
||||
|
||||
|
||||
|
@ -88,9 +88,9 @@ julia> y= [2, 5, 12]
|
|||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","a = \"Don't print me\"")
|
||||
(" ","println(a)")
|
||||
|
||||
a = "Don't print me"
|
||||
println(a)
|
||||
|
||||
|
||||
|
||||
|
@ -98,8 +98,8 @@ julia> y= [2, 5, 12]
|
|||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","println(\"No markup for results.\")")
|
||||
|
||||
println("No markup for results.")
|
||||
|
||||
|
||||
|
||||
|
@ -111,19 +111,19 @@ No markup for results.
|
|||
Test wrapping:
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","println(collect(0:10:1000))")
|
||||
|
||||
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]")
|
||||
|
||||
[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]
|
||||
|
||||
|
||||
|
||||
|
@ -131,14 +131,14 @@ Test wrapping:
|
|||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","println(collect(0:10:1000))")
|
||||
|
||||
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]")
|
||||
(" ","")
|
||||
[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]
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -146,20 +146,20 @@ Test wrapping:
|
|||
|
||||
|
||||
.. code-block:: julia
|
||||
(" ","")
|
||||
(" ","println(collect(0:10:1000))")
|
||||
|
||||
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]")
|
||||
|
||||
[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]
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,5 @@ end
|
|||
info("Test: Weaving with Gadfly")
|
||||
include("gadfly_formats.jl")
|
||||
|
||||
|
||||
info("Test: Weaving with PyPlot")
|
||||
include("pyplot_formats.jl")
|
||||
#info("Test: Weaving with PyPlot")
|
||||
#include("pyplot_formats.jl")
|
||||
|
|
Loading…
Reference in New Issue