# How do I plot data in Octave?

I wanted to plot a data in Octave for a logistic regression problem my teacher in my university assigned me to solve. Let's say the input-training features is a matrix X and output is y=1 or y=0 To plot the data I made this statement:

pos = find(y==1);neg = find(y==0);

plot(X(pos,1),X(pos,2),’k+’,’LineWidth’,2,’MarkerSize’,7);

plot(X(neg,1),X(neg,2),’ko’,’MarkerFaceColor’,y,’MarkerSize’,7);


• If you want to help, then you should post the actual error message that you receive. And you should make your code in a way that I can run it as well. At this point, I have no way to run your code as y is an unknown variable. – Valentin Calomme Jun 2 '20 at 13:41