Skip to content

Commit

Permalink
added AoG/Makie for references,fixed many small problems in documenta…
Browse files Browse the repository at this point in the history
…tion building
  • Loading branch information
behinger committed Oct 24, 2023
1 parent 886527a commit c052cd1
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 33 deletions.
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
AlgebraOfGraphics = "cbdf2221-f076-402e-a563-3d30da359d67"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand Down
4 changes: 4 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ using Documenter
using DocStringExtensions

# preload once

using CairoMakie
const Makie = CairoMakie # - for references
using AlgebraOfGraphics
using Unfold
using DataFrames
using DataFramesMeta
Expand Down Expand Up @@ -54,6 +57,7 @@ makedocs(;

],
"API" => "api.md",
"Utilities" => "helper.md",
],

)
Expand Down
7 changes: 0 additions & 7 deletions docs/src/helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@ UnfoldMakie.eeg_topoplot_series!
UnfoldMakie.config_kwargs!
UnfoldMakie.eeg_matrix_to_dataframe
UnfoldMakie.rel_to_abs_bbox
UnfoldMakie.plot_parallelcoordinates
UnfoldMakie.plot_topoplot
UnfoldMakie.to_positions
UnfoldMakie.df_timebin
UnfoldMakie.plot_erp
UnfoldMakie.plot_circulareegtopoplot
UnfoldMakie.plot_designmatrix
UnfoldMakie.cart3d_to_spherical
UnfoldMakie.plot_topoplotseries
UnfoldMakie.plot_butterfly
UnfoldMakie.valType_to_symbol
```
10 changes: 1 addition & 9 deletions docs/src/how_to/fix_pcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ Since Makie doesn't have a native function to draw PCPs, our version is somewhat
Under certain circumstances the PCP is not visualized correctly.
This leads to truncated edges of the PCP and unused space.

In particular, if the container size is changed by adjusting the figure resolution, or if multiple plots are added to a figure, the PCP may not fit.

![PCP with cutoff and bad spacing](../images/broken_PCP.png)



Since the plot could have more space above and below, we can change the aspect ratio of the plot with:
```
Expand All @@ -35,7 +30,4 @@ pc_tick_label_size = 25,
...
```

By setting these manually through trial and error we can fix the visualization issues:


![Fixed PCP](../images/fixed_PCP.png)
By setting these manually through trial and error we can fix the visualization issues
17 changes: 10 additions & 7 deletions docs/src/how_to/hide_deco.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ For more information on the input of these functions refer to the [Makie dokumen

Since some plots hide features by default, the hiding can be reverted by setting the variables to `nothing`

```
plot_xxx(...;layout=(;
```@example main
using TopoPlots
using UnfoldMakie
using CairoMakie
data, positions = TopoPlots.example_data()
plot_topoplot(data[:,340,1];
positions = positions,
layout=(;
hidespines = nothing,
hidedecorations = nothing
)
),)
```


![Topoplot with all axis spines and decorations enabled](../images/spine_topo.png)

3 changes: 0 additions & 3 deletions docs/src/how_to/show_oob_labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ We start with the "label-limited" time-expanded designmatrix from the [correspon
plot_designmatrix(designmatrix!(ufCont,evts), cDesign; xTicks=10, sortData=false)
```

#![Label Limited Timeexpanded Designmatrix](../images/designmatrix_te_12_labels.png)

While the plot automatically sets its height according to the labels, the labels are cut off on the left side.

Expand All @@ -27,5 +26,3 @@ plot_design(f[1,2:6], designmatrix!(ufCont, evts), cDesign; setExtraValues=(xTic
f
```

#![Label Limited Timeexpanded Designmatrix](../images/label_fix.png)
2 changes: 0 additions & 2 deletions docs/src/tutorials/butterfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ plot_butterfly(df; positions=pos)

Since butterfly plots use a `DataFrame` as input, the library needs to know the names of the columns used for plotting. You can set these mapping values by calling `plot_butterfly(...; mapping=(; :x=:time,))`, that is, by specifying a `NamedTuple` (note the `;` right after the opening parentheses).

For more information on mapping values, see the [Mapping Data](@ref config_mapping) section of the documentation.

While there are several default values that will be checked in that order if they exist in the `DataFrame`, a custom name may need to be chosen:


Expand Down
2 changes: 0 additions & 2 deletions docs/src/tutorials/parallelcoordinates.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ plot_parallelcoordinates(results_plot, [5,3,2]; # this selects channel 5,3 & 2

Since PCPs use a `DataFrame` as an input, the library needs to know the names of the columns used for plotting.

For more informations about mapping values, look into the [Mapping Data](@ref config_mapping) section of the documentation.

While there are multiple default values that are checked in that order if they exist in the `DataFrame`, a custom name might need to be choosen for:

### y
Expand Down
4 changes: 1 addition & 3 deletions docs/src/tutorials/topoplot.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ To get the positions from the labels we use a [database](https://raw.githubuserc

## Column Mappings for Topo Plots

When using topo plots with a `DataFrame` as an input, the library needs to know the names of the columns used for plotting.

For more informations about mapping values look into the [Mapping Data](@ref config_mapping) section of the documentation.
When using topo plots with a `DataFrame` as an input, the library needs to know the names of the columns used for plotting. This is specified using the `mapping=(;)` kwargs.

While there are multiple default values, that are checked in that order if they exist in the `DataFrame`, a custom name might need to be choosen for:

Expand Down

0 comments on commit c052cd1

Please sign in to comment.