Merge pull request #1308 from rdeits/line-z-example
add line_z and marker_z example
This commit is contained in:
commit
e11c91ddd9
@ -416,6 +416,22 @@ attribute. The default framestyle is `:axes`.
|
|||||||
end)]
|
end)]
|
||||||
),
|
),
|
||||||
|
|
||||||
|
PlotExample("Lines and markers with varying colors",
|
||||||
|
"""
|
||||||
|
You can use the `line_z` and `marker_z` properties to associate a color with
|
||||||
|
each line segment or marker in the plot.
|
||||||
|
""",
|
||||||
|
[:(begin
|
||||||
|
t = linspace(0, 1, 100)
|
||||||
|
θ = 6π .* t
|
||||||
|
x = t .* cos.(θ)
|
||||||
|
y = t .* sin.(θ)
|
||||||
|
p1 = plot(x, y, line_z=t, linewidth=3, legend=false)
|
||||||
|
p2 = scatter(x, y, marker_z=t, color=:bluesreds, legend=false)
|
||||||
|
plot(p1, p2)
|
||||||
|
end)]
|
||||||
|
),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user