MATLAB: Separate Points for Plotting

Click For Summary
To plot 1000 data points in MATLAB, where class 1 points are shown in one color and class 0 points in another, users can utilize the 'scatter' function. By separating the data points based on their class, they can assign different colors for each class in the plot command. It is important to ensure that the data is correctly categorized before plotting. Additionally, users are reminded to avoid cross-posting in multiple forums to maintain clarity in discussions. This approach will effectively visualize the data according to the specified classes.
strokebow
Messages
122
Reaction score
0
Hi,

I have generated 1000 data points.
I have assigned them a class (1 or 0) depending if they are above or below a decision boundary.

I want to plot the data on a graph with the class 1 data points in one colour and the class 0 data points in another.

any ideasa how I can do this please?

Thanks!
 
Physics news on Phys.org
strokebow said:
Hi,

I have generated 1000 data points.
I have assigned them a class (1 or 0) depending if they are above or below a decision boundary.

I want to plot the data on a graph with the class 1 data points in one colour and the class 0 data points in another.

any ideasa how I can do this please?

Thanks!

Please don't cross-post to multiple subforums. I've already replied in your other thread:
https://www.physicsforums.com/showthread.php?t=310468
 

Similar threads

Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K