Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:40:26+00:00 2026-06-15T09:40:26+00:00

I have implemented an algorithm and here is a plot from my resource book:

  • 0

I have implemented an algorithm and here is a plot from my resource book:

enter image description here

I am new to Matlab. I have a xValues list, yValues list (I have divided my final matrix into x and y axis, I am not sure is that true, if you make a suggestion you are welcome) and a vector of labels.

I want to get an image as like in the above. How can I put some class labels (i.e. 0,1,2,3..) as like given image?

PS: I plot as like that: plot(xValues,yValues,'b.'); however my dots are like diamond, not point as like in the image.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:40:27+00:00Added an answer on June 15, 2026 at 9:40 am

    You can use text to plot text on the scene. (Matlab help:)

    text(X,Y,'string') adds the text in the quotes to location (X,Y)
    on the current axes, where (X,Y) is in units from the current
    plot.
    

    You will need to know where on the graph you want to plot your text but you can do this:

    x = -pi:.1:pi;
    y = sin(x);
    p = plot(x,y)
    
    text(-pi/4,sin(-pi/4),'7')
    text(-pi/4+1,sin(-pi/4),sprintf('%d', 8))
    text(-pi/4+2,sin(-pi/4),'9')
    

    which will give you this:

    enter image description here

    You can add different text styles etc with the regular matlab annotation things. You can also automatic add the number you want for your cluster with the sprintf command as i have shown when i plot the 8.

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented the A* Algorithm According to Wikipedia's implementation at here However, it
I have implemented an algorithm for floating point decimal to rational fraction approximation (example:
I have implemented the A* algorithm in AS3 and it works great except for
This is regarding AES algorithm. Suppose i have implemented a AES algorithm and encrypt
I have implemented a simple parallel merge sort algorithm in Java. This cuts the
What is the general algorithm used by a syntax highlighter? I have implemented a
Possible Duplicate: How is string.find implemented in CPython? I have read many posts here
So far, I have implemented the algorithm found on this blog post with limited
I have a single depth-first search algorithm implemented to traverse my graph, given the
I have implemented Hobbs' algorithm for anaphora resolution together with Lappin & Leass ranking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.