Azzera filtri
Azzera filtri

Scatter plot mutiple dataset

52 visualizzazioni (ultimi 30 giorni)
James
James il 7 Giu 2015
Commentato: Image Analyst il 7 Giu 2015
I trying to scatterplot multiple data plots but cannot seem to do it correctly.
I tried
scatterplot(data1);
hold on
scatterplot(data2);
I just receive 2 figures with each separate scatterplot.. How do i put into one.. I have to merge 94 dataset into one scatterplot.. So...

Risposte (2)

Image Analyst
Image Analyst il 7 Giu 2015
Try scatter() instead:
scatter(data1(:, 1), data1(:, 2));
hold on
scatter(data2(:, 1), data2(:, 2));
  2 Commenti
James
James il 7 Giu 2015
That seem to work.. Do have any idea on how to not manually plot each individual dataset?
Image Analyst
Image Analyst il 7 Giu 2015
What's wrong with the code? How is this "manual" and not "automatic"? scatter() does nearly all the work (all you have to do is to simply call it) - isn't that "automatic"? And what difference does it make as long as it does the job?

Accedi per commentare.


Walter Roberson
Walter Roberson il 7 Giu 2015
h = scatterplot(data1);
hold on
scatterplot(data2, h);
You might need to provide all of the arguments for the second call to scatterplot(); see the documentation page.

Categorie

Scopri di più su Discrete Data Plots 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!

Translated by