Effacer les filtres
Effacer les filtres

Making a categorical dot plot with indexed variables?

1 vue (au cours des 30 derniers jours)
nines
nines le 6 Juin 2022
Commenté : Walter Roberson le 6 Juin 2022
Hello,
I am trying to make a categorical dot plot with 8 components on the x-axis.
I have two categories: 1. a control and 2. stimulus, and then there are four conditions for the control and stimulus (time1, time2, time 3, time4)
I have fed the control and stimulus into a cell:
for i = 1:length(subject_list)
subject=subject_list{i}
control(:,1)=control_with_time % where then control = [1 2 3 4]
stimulus(:,1)=stimulus_with_time % where then stimulus = [2 3 4 5]
% all of above works but scatter plot below doesn't work
scatter([1 2 3 4], [control(i) stimulus(i)]
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Error in connector.internal.fevalMatlab

Error in connector.internal.fevalJSON
end
I can make the scatter plot for one subject, but I am not sure how to to make it for multiple control/stimulus conditions and feed it into a dot plot.
Here is an example of what I want to do:
Thank you

Réponses (0)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by