working on shapes

This commit is contained in:
Thomas Breloff 2015-10-14 20:53:44 -04:00
parent ac1ce03fe5
commit 39318e5e61
4 changed files with 5 additions and 4 deletions

View File

@ -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))]),
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",
"x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)",
[:(bar(randn(999)))]),

View File

@ -39,7 +39,7 @@ const _allStyles = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
# const _allMarkers = [:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle,
# :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(
:n => :none,
:no => :none,
@ -74,6 +74,7 @@ const _allMarkers = hcat(:none, :auto, sortedKeys(_shapes))
:pent => :pentagon,
:h => :hexagon,
:hex => :hexagon,
:hep => :heptagon,
:o => :octagon,
:oct => :octagon,
)

View File

@ -61,7 +61,7 @@ supportedAxes(::GadflyPackage) = [:auto, :left]
supportedTypes(::GadflyPackage) = [:none, :line, :path, :steppost, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar, :hline, :vline, :ohlc]
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) = hcat(:none, :auto, sortedKeys(_shapes))
supportedMarkers(::GadflyPackage) = _allMarkers
supportedScales(::GadflyPackage) = [:identity, :log, :log2, :log10, :asinh, :sqrt]

View File

@ -188,7 +188,7 @@ const _shapes = Dict(
:dtriangle => makeshape(3, offset=0.5),
:pentagon => makeshape(5),
:hexagon => makeshape(6),
:septagon => makeshape(7),
:heptagon => makeshape(7),
:octagon => makeshape(8),
:cross => makecross(offset=-0.25),
:xcross => makecross(),