-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
4 changed files
with
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
""" | ||
supportive_defaults(cfg_symb::Symbol) | ||
Default configurations for the supporting axis. Similar to PlotConfig, but these configurations are not shared by all plots.\\ | ||
Such supporting axes allow users to flexibly see defaults in docstrings and manipulate them using corresponding axes. | ||
For developers: to make them updateable in the function, use `update_axis`. | ||
**Return value:** `NamedTuple`. | ||
""" | ||
function supportive_defaults(cfg_symb::Symbol) | ||
# plot_splines | ||
if cfg_symb == :toposeries_default | ||
return (; | ||
nrows = 1, | ||
col_labels = true, | ||
mapping = (; col = :condition), | ||
axis = (; xlabel = "Conditions", xlabelvisible = false), | ||
visual = ( | ||
label_scatter = (markersize = 10, strokewidth = 2), | ||
contours = (; levels = 0), | ||
colormap = Reverse(:RdGy_4), | ||
), | ||
colorbar = (; | ||
label = "Pattern detection function value", | ||
colorrange = (0, 1), | ||
height = 300, | ||
), | ||
layout = (; use_colorbar = true), | ||
) | ||
elseif cfg_symb == :erpimage_defaults | ||
return (; show_sortval = true, meanplot = true, axis = (; title = "ERP image")) | ||
end | ||
end | ||
|
||
""" | ||
update_axis(support_axis::NamedTuple; kwargs...) | ||
Update values of `NamedTuple{key = value}`.\\ | ||
Used for supportive axes to make users be able to flexibly change them. | ||
""" | ||
function update_axis(support_axis::NamedTuple; kwargs...) | ||
support_axis = (; support_axis..., kwargs...) | ||
return support_axis | ||
end |
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