working on shapes
This commit is contained in:
parent
ac1ce03fe5
commit
39318e5e61
@ -71,7 +71,7 @@ const examples = PlotExample[
|
|||||||
[:(styles = setdiff(supportedStyles(), [:auto])'), :(plot(cumsum(randn(20,length(styles)),1); style=:auto, label=map(string,styles), w=5))]),
|
[:(styles = setdiff(supportedStyles(), [:auto])'), :(plot(cumsum(randn(20,length(styles)),1); style=:auto, label=map(string,styles), w=5))]),
|
||||||
PlotExample("Marker types",
|
PlotExample("Marker types",
|
||||||
"",
|
"",
|
||||||
[:(markers = setdiff(supportedMarkers(), [:none,:auto])'), :(scatter(0.5:9.5, [fill(i-0.5,10) for i=length(markers):-1:1]; marker=:auto, label=map(string,markers), ms=12))]),
|
[:(markers = setdiff(supportedMarkers(), [:none,:auto])'), :(scatter(0.5:9.5, [fill(i-0.5,10) for i=length(markers):-1:1]; marker=:auto, label=map(string,markers), ms=12, ylim=(0,length(markers)+1)))]),
|
||||||
PlotExample("Bar",
|
PlotExample("Bar",
|
||||||
"x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)",
|
"x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)",
|
||||||
[:(bar(randn(999)))]),
|
[:(bar(randn(999)))]),
|
||||||
|
|||||||
@ -39,7 +39,7 @@ const _allStyles = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
|||||||
|
|
||||||
# const _allMarkers = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle,
|
# const _allMarkers = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle,
|
||||||
# :cross, :xcross, :star5, :star8, :hexagon, :octagon, Shape]
|
# :cross, :xcross, :star5, :star8, :hexagon, :octagon, Shape]
|
||||||
const _allMarkers = hcat(:none, :auto, sortedKeys(_shapes))
|
const _allMarkers = vcat(:none, :auto, sort(collect(keys(_shapes))))
|
||||||
@compat const _markerAliases = Dict(
|
@compat const _markerAliases = Dict(
|
||||||
:n => :none,
|
:n => :none,
|
||||||
:no => :none,
|
:no => :none,
|
||||||
@ -74,6 +74,7 @@ const _allMarkers = hcat(:none, :auto, sortedKeys(_shapes))
|
|||||||
:pent => :pentagon,
|
:pent => :pentagon,
|
||||||
:h => :hexagon,
|
:h => :hexagon,
|
||||||
:hex => :hexagon,
|
:hex => :hexagon,
|
||||||
|
:hep => :heptagon,
|
||||||
:o => :octagon,
|
:o => :octagon,
|
||||||
:oct => :octagon,
|
:oct => :octagon,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -61,7 +61,7 @@ supportedAxes(::GadflyPackage) = [:auto, :left]
|
|||||||
supportedTypes(::GadflyPackage) = [:none, :line, :path, :steppost, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar, :hline, :vline, :ohlc]
|
supportedTypes(::GadflyPackage) = [:none, :line, :path, :steppost, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar, :hline, :vline, :ohlc]
|
||||||
supportedStyles(::GadflyPackage) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
supportedStyles(::GadflyPackage) = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
||||||
# supportedMarkers(::GadflyPackage) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon, :octagon, Shape]
|
# supportedMarkers(::GadflyPackage) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon, :octagon, Shape]
|
||||||
supportedMarkers(::GadflyPackage) = hcat(:none, :auto, sortedKeys(_shapes))
|
supportedMarkers(::GadflyPackage) = _allMarkers
|
||||||
supportedScales(::GadflyPackage) = [:identity, :log, :log2, :log10, :asinh, :sqrt]
|
supportedScales(::GadflyPackage) = [:identity, :log, :log2, :log10, :asinh, :sqrt]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -188,7 +188,7 @@ const _shapes = Dict(
|
|||||||
:dtriangle => makeshape(3, offset=0.5),
|
:dtriangle => makeshape(3, offset=0.5),
|
||||||
:pentagon => makeshape(5),
|
:pentagon => makeshape(5),
|
||||||
:hexagon => makeshape(6),
|
:hexagon => makeshape(6),
|
||||||
:septagon => makeshape(7),
|
:heptagon => makeshape(7),
|
||||||
:octagon => makeshape(8),
|
:octagon => makeshape(8),
|
||||||
:cross => makecross(offset=-0.25),
|
:cross => makecross(offset=-0.25),
|
||||||
:xcross => makecross(),
|
:xcross => makecross(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user