Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/112.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 如何在核心图散点图中添加图例_Objective C_Ios_Core Plot - Fatal编程技术网

Objective c 如何在核心图散点图中添加图例

Objective c 如何在核心图散点图中添加图例,objective-c,ios,core-plot,Objective C,Ios,Core Plot,我在我的iphone应用程序中使用core plot graph。如何在散点图中添加图例。有人能帮我吗 提前感谢你能告诉我如何添加legendTitleforscatterplot吗?你想在图例中添加文字吗?可以通过设置添加到图形中的每个CPTSpatterPlot的title属性来完成。如果未将值作为标题,coreplot会将每个绘图的标识符属性显示为图例中的文本。 graph_.legend = [CPTLegend legendWithGraph:graph_]; graph_.legen

我在我的iphone应用程序中使用core plot graph。如何在散点图中添加图例。有人能帮我吗


提前感谢

你能告诉我如何添加legendTitleforscatterplot吗?你想在图例中添加文字吗?可以通过设置添加到图形中的每个CPTSpatterPlot的title属性来完成。如果未将值作为标题,coreplot会将每个绘图的标识符属性显示为图例中的文本。
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);