Skip to content

Simple and correct way to put labels on topoplot with 64 channels with predefined data #116

@vladdez

Description

@vladdez

There should be some zero-brainer way to call labels. Currently when is simply do this, result is not what is expected:

_labels_64 = [
            "Fp1", "AF7", "AF3", "F1", "F3", "F5", "F7", "FT7", "FC5", "FC3", "FC1",
            "C1", "C3", "C5", "T7", "TP7", "CP5", "CP3", "CP1", "P1", "P3", "P5", "P7", "P9",
            "PO7", "PO3", "O1", "Iz", "Oz", "POz", "Pz", "CPz", "Fpz", "Fp2", "AF8", "AF4",
            "AFz", "Fz", "F2", "F4", "F6", "F8", "FT8", "FC6", "FC4", "FC2", "FCz", "Cz",
            "C2", "C4", "C6", "T8", "TP8", "CP6", "CP4", "CP2", "P2", "P4", "P6", "P8",
            "P10", "PO8", "PO4", "O2",
        ]
pos = TopoPlots.labels2positions(_labels_64)

dat, positions = TopoPlots.example_data()
tp = 340
vec_estimate = dat[:, tp, 1]

plot_topoplot(
    vec_estimate;
    labels = _labels_64,
    positions = pos,
    visual = (; label_text = true, label_scatter = false),
    axis = (; xlabel = "Time point: $tp"),
)
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions