Overlaying Plots on Bar Graphs
Mostrar comentarios más antiguos
I want to creat an overlaying a dot plot on a bar graph. It seems very simple but I am running into 2 problems (1) I can't get ride of tick markers on both right and left side. I want the right on the right and left on left (2) How can I label the bar with text (say ON, QC, BC) and the dot with values
My data and code
hmM = [0.8 0.6 0.2];
hm = [0.25 0.38 0.60];
figure (1)
bar(hmM, 'y')
h1 = gca;
h2 = axes('Position',get(h1,'Position'));
plot(hm,'*')
set(h2,'YAxisLocation','right', 'Color','none')
set(h2,'XLim',get(h1,'XLim'),'Layer','top')
3 comentarios
Matt Tearle
el 1 de Jun. de 2011
Can you maybe show an example of what you're looking for? Even just a simple paint/photoshop mockup. I don't completely understand what you want. Labeling with text can be done with the text function.
Asdrubal
el 1 de Jun. de 2011
Asdrubal
el 6 de Jun. de 2011
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Discrete Data Plots 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!