2016-04-19 16:07:07 +02:00
|
|
|
|
|
|
|
# Default
|
|
|
|
|
|
|
|
<<>>=
|
|
|
|
using Gadfly
|
|
|
|
x = 1:10
|
|
|
|
plot(x = x, y = x)
|
|
|
|
print(x)
|
|
|
|
plot(x = x, y = x)
|
|
|
|
display(x)
|
|
|
|
@
|
|
|
|
|
|
|
|
# Terminal
|
|
|
|
|
|
|
|
<<term=true>>=
|
|
|
|
using Gadfly
|
|
|
|
x = 1:10
|
|
|
|
plot(x = x, y = x)
|
|
|
|
print(x)
|
|
|
|
plot(x = x, y = x)
|
|
|
|
display(x)
|
|
|
|
@
|
|
|
|
|
2016-05-01 01:05:27 +02:00
|
|
|
# Prompt
|
|
|
|
|
|
|
|
<<term=true; prompt="\njulietta> ">>=
|
|
|
|
using Gadfly
|
|
|
|
x = 1:10
|
|
|
|
plot(x = x, y = x)
|
|
|
|
print(x)
|
|
|
|
plot(x = x, y = x)
|
|
|
|
display(x)
|
|
|
|
@
|
|
|
|
|
|
|
|
# Display
|
|
|
|
|
|
|
|
<<display=true>>=
|
|
|
|
using Gadfly
|
|
|
|
x = 1:10
|
|
|
|
plot(x = x, y = x)
|
|
|
|
print(x)
|
|
|
|
plot(x = x, y = x)
|
|
|
|
display(x)
|
|
|
|
@
|
|
|
|
|
|
|
|
# Both display and term
|
|
|
|
|
|
|
|
<<display=true;term=true>>=
|
|
|
|
using Gadfly
|
|
|
|
x = 1:10
|
|
|
|
plot(x = x, y = x)
|
|
|
|
print(x)
|
|
|
|
plot(x = x, y = x)
|
|
|
|
display(x)
|
|
|
|
@
|
|
|
|
|
|
|
|
|
2016-04-19 16:07:07 +02:00
|
|
|
# Hold results
|
|
|
|
|
|
|
|
<<hold=true>>=
|
|
|
|
using Gadfly
|
|
|
|
x = 1:10
|
|
|
|
plot(x = x, y = x)
|
|
|
|
print(x)
|
|
|
|
plot(x = x, y = x)
|
|
|
|
display(x)
|
|
|
|
@
|