Priya
Priya

Reputation: 101

How to add legends to scatter graph of core plot

I am using core plot graph in my iphone application. How to add legends in scatter graph. Can anyone help me?

Thanks in advance

Upvotes: 3

Views: 4087

Answers (1)

Neo
Neo

Reputation: 936

graph_.legend = [CPTLegend legendWithGraph:graph_];
graph_.legend.fill = [CPTFill fillWithColor:[CPTColor darkGrayColor]];
graph_.legend.cornerRadius = 5.0;
graph_.legend.swatchSize = CGSizeMake(25.0, 25.0);
graph_.legendAnchor = CPTRectAnchorBottom;
graph_.legendDisplacement = CGPointMake(0.0, 12.0);

Upvotes: 7

Related Questions