In [8]:
using Plots
pyplot(size = (400,300))
n = 100
x, y = linspace(0,1,n), randn(n, 3)
plot(x, y, line = (0.5, [4 1 0], [:path :scatter :density]),
marker=(10, 0.5, [:none :+ :none]), fill=0.5,
orientation = :h, title = "My title")
Out[8]:
In [9]:
# png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline0")
In [2]:
import PyPlot
n = 100
x, y = linspace(0,1,n), randn(n, 3)
fig = PyPlot.gcf()
fig[:set_size_inches](4,3,forward=true)
fig[:set_dpi](100)
PyPlot.clf()
PyPlot.plot(x, y[:,1], alpha = 0.5, "steelblue", linewidth = 4)
PyPlot.scatter(x, y[:,2], alpha = 0.5, marker = "+", s = 100, c="orangered")
PyPlot.plt[:hist](y[:,3], orientation = "horizontal", alpha = 0.5,
normed = true, bins=30, color="green",
linewidth = 0)
ax = PyPlot.gca()
ax[:xaxis][:grid](true)
ax[:yaxis][:grid](true)
PyPlot.title("My title")
PyPlot.legend(["y1","y2"])
PyPlot.show()
In [6]:
plot(y, lab = "my label", l = (2,0.5), m = (:hex,20,0.2,stroke(0)), key = false)
Out[6]:
In [10]:
plot(y, label = "my label", line = (2,0.5), marker = (:hexagon,20,0.2,stroke(0)), legend = false)
Out[10]:
In [11]:
png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline1")
In [14]:
plot(y, xaxis = ("my label", (0,10), 0:0.5:10, :log, :flip, font(20, "Courier")))
Out[14]:
In [12]:
plot(y, xlabel = "my label", xlim = (0,10), xticks = 0:0.5:10,
xscale = :log10, xflip = true, tickfont = font(20, "Courier"))
Out[12]:
In [13]:
png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline2")
In [15]:
type MyVecWrapper
v::Vector{Float64}
end
mv = MyVecWrapper(rand(100))
# add specialized attributes for custom types
function Plots._apply_recipe(d::Plots.KW, mv::MyVecWrapper; kw...)
d[:markershape] = :circle
d[:markersize] = 30
(mv.v, )
end
subplot(
plot(mv.v),
plot(mv)
)
Out[15]:
In [16]:
png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline3")
In [19]:
scatter(rand(100), group = rand(1:3, 100), marker = (10,0.3,[:s :o :x]))
Out[19]:
In [20]:
png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline4")
In [ ]:
In [20]:
png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline5")
In [ ]:
In [20]:
png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline5")
In [ ]:
In [20]:
png("/home/tom/.julia/v0.4/ExamplePlots/docs/examples/img/pipeline5")
In [ ]: