【问题标题】:How to add legends to scatter graph of core plot如何在核心图的散点图中添加图例
【发布时间】:2012-03-12 06:05:52
【问题描述】:

我在我的 iphone 应用程序中使用核心绘图图。如何在散点图中添加图例。谁能帮帮我?

提前致谢

【问题讨论】:

    标签: objective-c ios core-plot


    【解决方案1】:
    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);
    

    【讨论】:

    • 你能告诉如何添加legendTitleforscatterplot吗?
    • 您想在图例中添加文本吗?可以通过设置添加到图中的每个 CPTScatterPlot 的 title 属性来完成。如果你没有给出一个值作为标题,coreplot 会将每个图的标识符属性显示为图例中的文本。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-14
    • 1970-01-01
    • 1970-01-01
    • 2019-08-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多