-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Describe nonlinear beeswarm plots * Add the unconventional example back in
- Loading branch information
1 parent
7c9cdcb
commit dfa8660
Showing
3 changed files
with
31 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
# Scaled beeswarm plots | ||
# Nonlinear beeswarm plots | ||
|
||
Beeswarm plots can be plotted in any combination of `xscale` and `yscale`. | ||
|
||
Specifically, beeswarm plots are correct in any [separable transform](https://geo.makie.org/stable/nonlinear_transforms/#Nonlinear-but-separable) - basically, any transform in which the x and y coordinates are independent of each other. This excludes most geographic transformations, but includes any transformation you can make using `xscale` and `yscale` in a Makie `Axis`. | ||
|
||
```@figure logscale | ||
using SwarmMakie, Makie | ||
data = randn(75) .+ 3 | ||
fig = Figure() | ||
ax1 = Axis(fig[1, 1]; title = "No transform") | ||
beeswarm!(ax1, ones(75), data) | ||
ax2 = Axis(fig[1, 2]; title = "Log y axis", yscale = log10) | ||
beeswarm!(ax2, ones(75), data) | ||
fig | ||
``` | ||
|
||
Note how the shape of the beeswarm is transformed in the left plot, because of the log scale. | ||
|
||
```@figure logscale | ||
ax2.xscale = Makie.pseudolog10 | ||
ax2.title = "Log x and y axes" | ||
fig | ||
``` | ||
|
||
Beeswarm plots can also be plotted in log-scale axes! |
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