Trying to group objects in a legend.



Hello,

I have a plot with 24 sea ice curves (from 5 cumulative emission groups) for which I want to group objects in the legend, such that I can have one legend entry for each cumulative emission group



My plot is structured as follows:

[code]plot(CumEmFAST1000SVV,SVbar,'b',CumEmVFAST1000SVV,SVbar2,'b',CumEmOVST1000SVV,SVbar4,'b',CumEmFAST2000SVV,SVbar6,'g',CumEmMEDIUM2000SVV,SVbar7,'g',CumEmSLOW2000SVV,SVbar8,'g',CumEmOVST2000SVV,SVbar9,'g',CumEmFAST3000SVV,SVbar11,'k',CumEmMEDIUM3000SVV,SVbar12,'k',CumEmSLOW3000SVV,SVbar13,'k',CumEmOVST3000SVV,SVbar14,'k',CumEmFAST4000SVV,SVbar16,'m',CumEmMEDIUM4000SVV,SVbar17,'m',CumEmSLOW4000SVV,SVbar18,'m',CumEmOVST4000SVV,SVbar19,'m',CumEmFAST5000SVV,SVbar21,'c',CumEmMEDIUM5000SVV,SVbar22,'c',CumEmSLOW5000SVV,SVbar23,'c',CumEmOVST5000SVV,SVbar24,'c')

set(gca,'FontSize',15,'fontWeight','bold')
set(findall(gcf,'type','text'),'FontSize',15,'fontWeight','bold')
xlabel('Cumulative Emissions (GtC)')
ylabel('Northern Hemisphere Sea Ice Area (m ^2)')
title('Average September NH Sea Ice Area (2000-2500) for the 1000-5000 GtC scenarios')
[/code]



The Variables in the 1000 GtC group are: CumEmFAST1000SVV,SVbar,'b',CumEmVFAST1000SVV,SVbar2,'b',CumEmOVST1000SVV,SVbar4,'b'

2000 GtC: CumEmFAST2000SVV,SVbar6,'g',CumEmMEDIUM2000SVV,SVbar7,'g',CumEmSLOW2000SVV,SVbar8,'g',CumEmOVST2000SVV,SVbar9,'g'

3000 GtC: CumEmFAST3000SVV,SVbar11,'k',CumEmMEDIUM3000SVV,SVbar12,'k',CumEmSLOW3000SVV,SVbar13,'k',CumEmOVST3000SVV,SVbar14,'k'

4000 GtC: CumEmFAST4000SVV,SVbar16,'m',CumEmMEDIUM4000SVV,SVbar17,'m',CumEmSLOW4000SVV,SVbar18,'m',CumEmOVST4000SVV,SVbar19,'m'

5000 GtC: CumEmFAST5000SVV,SVbar21,'c',CumEmMEDIUM5000SVV,SVbar22,'c',CumEmSLOW5000SVV,SVbar23,'c',CumEmOVST5000SVV,SVbar24,'c'



How should I structure my "Legend" script to do so?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories