Problems using hold on when plot figure
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Tam Ho
il 12 Mar 2018
Risposto: Santosh Prasad Choudhury
il 12 Mar 2018
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171173/image.jpeg)
My code
colors = repmat('krgbmc',1,300) ;
Rtot =20;
L = 0:0.01:200 ;
KDs = 10:20:90 ;
figure
hold on
for i=1:length(KDs)
KD = KDs(i) ;
LR = Rtot*L./(L + KD) ;
LR_all(i,:) = LR ;
figure
hold on
plot(L,LR,colors(i)) ;
figurelegend(i) = ['K_D = ', int2str(KD),'uM'];
end
xlabel('[Ligand] (uM)')
ylabel('[Ligand-Receptor] (uM)')
legend(figurelegend,'Location','SouthEast')
1 Commento
Walter Roberson
il 12 Mar 2018
What difficulty do you observe?
You are asking to create a new figure for each plot. Is that your intent?
Risposta accettata
Santosh Prasad Choudhury
il 12 Mar 2018
Please replace your code by figurelegend{i} = ['K_D = ', int2str(KD),'uM']; and you are creating somany figures? Please let me know your intention.
Più risposte (1)
Santosh Prasad Choudhury
il 12 Mar 2018
colors = repmat('krgbmc',1,300) ; Rtot =20; L = 0:0.01:200 ; KDs = 10:20:90 ; figure hold on for i=1:length(KDs) KD = KDs(i) ; LR = Rtot*L./(L + KD) ; LR_all(i,:) = LR ; plot(L,LR,colors(i)) ; figurelegend{i} = ['K_D = ', int2str(KD),'uM']; end xlabel('[Ligand] (uM)') ylabel('[Ligand-Receptor] (uM)') legend(figurelegend,'Location','SouthEast')
Please use above code and you will get your answer.
0 Commenti
Vedere anche
Categorie
Scopri di più su Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!