Borrar filtros
Borrar filtros

Combine 2 plots into a single figure

1 visualización (últimos 30 días)
SreeHarish Muppirisetty
SreeHarish Muppirisetty el 12 de Dic. de 2013
Respondida: Suneesh el 12 de Dic. de 2013
Can I combine two plots into a single figure. Assuming that my Xticks for:
Plot1 would be 0 1 2 3 4 5 6 7 8 9 10 and for
Plot2 they would be 10 1000 2000 3000 4000 5000.
I want Plot3 a combined figure of Plot 1 & 2 with Xticks arranged finally as
1 2 3 4 5 6 7 8 9 10 1000 2000 3000 4000 5000.
Thanks for your time

Respuestas (1)

Suneesh
Suneesh el 12 de Dic. de 2013
One way to do this is by manipulating the XData and YData properties. Try:
figure; h1 = plot(1:10);
figure; h2 = plot(10:10:50,20:24);
set(h1,'XData',[get(h1,'XData') get(h2,'XData')], 'YData', [get(h1,'YData') get(h2,'YData')])

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by