CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Showing legends in Matlab (

Doctor Blade August 28, 2004 07:25

Showing legends in Matlab
Anybody knows how can I show the legend of a contour graphic in Matlab?. I mean, the typical legend with the colours display and their numerical values for each one. I'm using the Student Version.

Thanks in advanced.

Junseok Kim August 28, 2004 14:47

Re: Showing legends in Matlab
type help legend on the matlab command window

Doctor Blade September 1, 2004 11:17

Re: Showing legends in Matlab
I've read about it, but it does not say anything about "contours" plot. Only "plot" command.

noName September 1, 2004 17:42

Re: Showing legends in Matlab
just type 'colorbar'

should work!

Junseok Kim September 1, 2004 18:32

Re: Showing legends in Matlab
try clabel

for example,

[cs,h] = contour(peaks); clabel(cs,h,'fontsize',15,'color','r','rotation',0 )

it should work also use help clabel.

Good luck

Steve September 2, 2004 04:56

Re: Showing legends in Matlab
Try posting MATLAB questions to comp.soft-sys.matlab. They're a very friendly and helpful bunch. You can access this NG via TMW web site:

Doctor Blade September 2, 2004 15:18

Re: Showing legends in Matlab
Thanks to all people!. I'll prove your advices soon and I will feedback the result.

aswad yusak September 7, 2004 09:57

driven cavity
i want to know what a 'driven cavity with aspect ratio 1/4'. And this problem is a flow in square not rectangular.Meanwhile,how to use matlab with mesh (129,129).And then what a diffrent with aspect ratio and mesh in. I hope you can explain it.

Junseok Kim September 7, 2004 12:10

Re: driven cavity
Would you be more specific and more details, thanks

All times are GMT -4. The time now is 22:56.