Borrar filtros
Borrar filtros

How to scatter plot differnet curves on a same figure

2 visualizaciones (últimos 30 días)
Hello,
Say I have two tables with five columns in each of them. Let's name them T1Col1, T2Col2, ..... in table 1. And T2Col1, T2Col2,....in table 2. I want to analyze the curves between T1Col1 vs T2Col1, T1Col2 vs T2Col2, T1Col3 vs T2Col3 and so on. And I want to do them in a single plot. I want the X-axis to have the range of T1Col1 to T1Col5 and I want to plot the corresponding T2Col1 to T2Col5. I want something exactly similar to this piece of code.
plot(T1Col1, T2Col1,'g',T1Col2, T2Col2,'b',T1Col3, T2Col3,'r'). I can plot it but cannot scatter plot it.
Its not the hold on and hold off code. Its not the plot(1,1,1) concept either. My problem is easily solved if I plot them. But I am NOT able to scatter plot them.
A similar matlab documentation is here: https://www.mathworks.com/help/matlab/creating_plots/combine-multiple-plots.html - (The first example) But again, the axis here is clearly 'X' fixed.

Respuesta aceptada

Walter Roberson
Walter Roberson el 29 de Jul. de 2020
plot(T1Col1, T2Col1, '*g', T1Col2, T2Col2,'+b', T1Col3, T2Col3, 'rs')
When you specify a marker without specifying a line style, then plot only uses the marker.
This would not be good enough for the case that you want your scatter plots to have a different size or different color for each point.

Más respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by