How to plot a matrix?

1,083 views (last 30 days)
sono
sono on 25 Sep 2012
I have a matrix I am trying to plot called "errors"
Best I can do is:
plotmatrix(errors,'b')
But that gives a weird mess of graphs:
The bottom left one is what I am shooting for.
Thank you.
  1 Comment
Tom
Tom on 25 Sep 2012
Edited: Tom on 25 Sep 2012
Plot Matrix isn't a plot function for a matrix, it provides a matrix of different plots. You'll want to use the standard plot function, can you provide some sample data?

Sign in to comment.

Accepted Answer

José-Luis
José-Luis on 25 Sep 2012
Edited: José-Luis on 25 Sep 2012
Given your figure it looks like you have a two-column matrix. The bottom left plot one is given by:
plot(your_data(:,1),your_data(:,2));
The top right:
plot(your_data(:,2),your_data(:,1));
The diagonals:
hist(your_data(:,1));
hist(your_data(:,2));
You get the idea...
  1 Comment
Madalena Francisco
Madalena Francisco on 14 Jan 2023
Thank u! This help me plot my matrix

Sign in to comment.

More Answers (1)

Sachin Ganjare
Sachin Ganjare on 25 Sep 2012
Use "hold on" or "hold all" command
Hope it helps!!!

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!