Crowley
Crowley

Reputation: 2331

Removing lines from contourf graphs

Hi all I'm using scripts for generating plots easily and with exactly the same layout.

That's why I'd like to create contourf graph of given data automaticcaly without black contour lines. I can do it manually by advanced figure layout, byt is there a command for it?

Thanks for suggestions; I have no idea how to solve it.

Upvotes: 4

Views: 11284

Answers (3)

Tong
Tong

Reputation: 2127

'shading flat' will do the job.

Upvotes: 2

gnovice
gnovice

Reputation: 125854

You can remove the black lines by setting the 'LineColor' property to 'none', either in the initial call to CONTOURF:

contourf(peaks(20),10,'LineColor','none');

Or by modifying the handle graphics object after creating it:

[C,h] = contourf(peaks(20),10);
set(h,'LineColor','none');

Upvotes: 7

Jonas
Jonas

Reputation: 74940

Whatever you can do with manual editing you can also do programmatically. For contourf, you can do the following:

[~,h] = contourf(peaks(20),10);
set(h,'LineColor','none')

See here for all the properties you can modify using the set command.

Upvotes: 4

Related Questions