How to remove axis from a sparsity plot with spy function?

Hello,
I plot the sparsity of a matrix with spy, like this:
a = rand(5, 2);
spy(a)
So it comes with x and y axis, and
nz = 10
on the bottom, which is completely normal. Does anyone know how to remove these axis and 'nz = 10'?
Thanks!

 Akzeptierte Antwort

KSSV
KSSV am 12 Okt. 2017

0 Stimmen

axis off

3 Kommentare

frame also gone? Can we keep the box frame?
a = rand(5, 2);
spy(a)
set(gca,'xticklabel',{[]})
set(gca,'yticklabel',{[]})
delete(findall(findall(gcf,'Type','axe'),'Type','text'))
thanks! this is what I'm looking for!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Sparse Matrices finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 12 Okt. 2017

Kommentiert:

am 12 Okt. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by