scatter plot in matlab (2024)

13vues (au cours des 30derniers jours)

Afficher commentaires plus anciens

rohit le 27 Déc 2023

  • Lien

    Utiliser le lien direct vers cette question

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab

  • Lien

    Utiliser le lien direct vers cette question

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab

Commenté: Dyuman Joshi le 27 Déc 2023

Réponse acceptée: Hari

I have a dataset containing two columns of data, x and y, and I want to create a scatter plot of these points in MATLAB. Additionally, I want to customize the plot by setting the marker style to circles, the marker color to red, and adding a title "Scatter Plot of x vs y" to the graph. I need matlab code accomplish this.

2commentaires

Afficher AucuneMasquer Aucune

Dyuman Joshi le 27 Déc 2023

Utiliser le lien direct vers ce commentaire

https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010292

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010292

Déplacé(e): Dyuman Joshi le 27 Déc 2023

See the documentation of scatter. You will find all the information you need in there.

Torsten le 27 Déc 2023

Utiliser le lien direct vers ce commentaire

https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010267

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010267

If your homework gets too tough, I suggest to invest 2 hours of your time and visit the MATLAB introductory course free of costs under

https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted

Connectez-vous pour commenter.

Connectez-vous pour répondre à cette question.

Réponse acceptée

Hari le 27 Déc 2023

  • Lien

    Utiliser le lien direct vers cette réponse

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#answer_1378682

  • Lien

    Utiliser le lien direct vers cette réponse

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#answer_1378682

Ouvrir dans MATLAB Online

Hi Rohit,

I understand that you need assistance with creating a scatter plot in MATLAB using a dataset with two columns, 'x' and 'y'. You want the plot to have a specific marker style and color, and to include a custom title.

I am assuming that the data is stored in two vectors "x" and "y" of equal length, here is the MATLAB code that would create the desired scatter plot:

% Assuming x and y are your dataset columns

scatter(x, y, 'o', 'MarkerEdgeColor', 'r'); % 'o' sets the marker to circles, 'r' sets the color to red

title('Scatter Plot of x vs y'); % Adds the title to the plot

This code uses the "scatter" function to create the scatter plot, sets the marker style to circles with "o", and the marker edge color to red with "MarkerEdgeColor", "r". The "title" function is then used to add the specified title to the plot.

Refer to the documentation of "scatter" function for more information on how to create scatter plots and customize markers.

https://www.mathworks.com/help/matlab/ref/scatter.html

Hope this helps!

4commentaires

Afficher 2 commentaires plus anciensMasquer 2 commentaires plus anciens

Dyuman Joshi le 27 Déc 2023

Utiliser le lien direct vers ce commentaire

https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010277

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010277

@Hari, Please don't do obvious homework questions on Answers, when no effort has been shown. Especially when it is such basic thing like what OP has asked.

This does not help the student, who learns nothing more than to post all of their homwork problems on the site, hoping they will find someone willing to do their thinking and work for them. Worse that that, it convinces the next student who comes along to do the same.

If you want to help, then find a way to push the student in the right direction. But posting a complete solution does far more harm than good.

Image Analyst le 27 Déc 2023

Utiliser le lien direct vers ce commentaire

https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010356

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010356

Modifié(e): Image Analyst le 27 Déc 2023

To be fair I see nothing that explicitly says it's a homework question. It could be a legitimate request of someone on how to plot their experimental data in a certain desired way. What's more obvious is that this answer is a AI chatbot answer and it should have been mentioned that it was.

Torsten le 27 Déc 2023

Utiliser le lien direct vers ce commentaire

https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010481

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010481

Modifié(e): Torsten le 27 Déc 2023

I think nobody has such a clear idea concerning marker, markerstyle and title if it's not a homework question. Even the exact names marker, markerstyle and title wouldn't come to his/her mind because it implies that he/she knows the "scatter" command.

Dyuman Joshi le 27 Déc 2023

Utiliser le lien direct vers ce commentaire

https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010496

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.mathworks.com/matlabcentral/answers/2064357-scatter-plot-in-matlab#comment_3010496

I agree with @Torsten.

Connectez-vous pour commenter.

Plus de réponses (0)

Connectez-vous pour répondre à cette question.

Voir également

Catégories

MATLABGraphics2-D and 3-D PlotsData Distribution PlotsScatter Plots

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Tags

  • scatter plot

Community Treasure Hunt

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

Start Hunting!

Une erreur s'est produite

Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.


Translated by scatter plot in matlab (9)

scatter plot in matlab (10)

Sélectionner un site web

Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .

Vous pouvez également sélectionner un site web dans la liste suivante :

Amériques

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asie-Pacifique

Contactez votre bureau local

scatter plot in matlab (2024)

References

Top Articles
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 5735

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.