trying to make many subjects the same color in graph
Mostrar comentarios más antiguos
Hello!
I am trying to make groups of subjects on a graph, and I am trying to define the subject and give it a certain color. there was a code online that said that said that something like my code below should work, but i am still getting errors. does anyone have any ideas? Thanks times a billion!
figure;
% plot(f, allspectrums_cortex_young, 'r');
% plot(f, allspectrums_ventricle_young, 'y');
% plot(f, allspectrums_cortex_elderly, 'b')
% plot(f, allspectrums_ventricle_elderly, 'g')
l1 = plot(f, allspectrums_cortex_young, 'r');
hold on
l2 = plot(f, allspectrums_ventricle_young, 'y');
l3 = plot(f, allspectrums_cortex_elderly, 'b')
l4 = plot(f, allspectrums_ventricle_elderly, 'g')
legend([l1, l2, l3, l4], {'ventricle cortex', 'ventricle young', 'ventricle elderly', 'cortex elderly'});
hold off
xlabel('Frequency (in hertz)');
ylabel('Power');
title('Young vs. Elderly Power - 4th Ventricle and Cortex')
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Electrophysiology en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!