-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Useful to plot vertical columns
- Loading branch information
Showing
4 changed files
with
57 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# How-to guide and cookbook | ||
|
||
## How do I make a line plot with variable on the y axis instead of the x one? | ||
|
||
By default, the plotting functions in `CairoMakieExt` place the variable on the | ||
x axis. If you want it on the y axis instead (e.g., you are plotting the | ||
vertical profile of a column), you can pass the `dim_on_y = true` argument to | ||
the axis. | ||
|
||
For instance, | ||
```julia | ||
plot!(var, more_kwargs = Dict(:axis => [:dim_on_y = true])) | ||
``` | ||
|
||
`ClimaAnalysis.Utils` provides a convenience function `kwargs` to specify | ||
arguments a little bit more easily without having to think about `Symbol`s too | ||
much. | ||
```julia | ||
plot!(var, more_kwargs = Dict(:axis => kwargs(dim_on_y = true)) | ||
``` |
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