-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78e4c9a
commit cb916d1
Showing
7 changed files
with
120 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
Geom.band[(; orientation=:vertical)] | ||
Draw bands across the plot canvas with a horizontal span specifed by `xmin` and `xmax` if `orientation` is `:vertical`, or a vertical span specified by `ymin` and `ymax` if the `orientation` is `:horizontal`. | ||
This geometry is equivalent to [`Geom.rect`](@ref) with [`Stat.band`](@ref). | ||
""" | ||
band(; orientation=:vertical) = RectangularBinGeometry(Stat.band(orientation)) #TODO: use RectangularGeometry when it becomes available. | ||
|
||
|
||
""" | ||
Geom.hband[()] | ||
Draw horizontal bands across the plot canvas with a vertical span specified by `ymin` and `ymax` aesthetics. | ||
This geometry is equivalent to [`Geom.band`](@ref) with `orientation` set to `:vertical`. | ||
""" | ||
hband() = band(orientation = :horizontal) | ||
|
||
|
||
""" | ||
Geom.vband[()] | ||
Draw vertical bands across the plot canvas with a horizontal span specified by `xmin` and `xmax` aesthetics. | ||
This geometry is equivalent to [`Geom.band`](@ref). | ||
""" | ||
const vband = band |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Gadfly | ||
set_default_plot_size(21cm, 8cm) | ||
|
||
p1 = plot(xmin=[1.0, 5.0, 7.0], xmax=[2.0, 6.5, 8.0] , Geom.vband, Theme(default_color="green")); | ||
|
||
p2 = plot(ymin=[2.5], ymax=[7.5], Geom.hband, Theme(default_color="red")); | ||
|
||
hstack(p1, p2) |