ios - 核心情节图从原点开始

标签 ios core-plot linegraph

我有使用核心绘图框架的折线图和条形图。在该图中,它不会从原点开始。看这张图片 graph image

在该图像中,x 轴和 y 轴从 (-2,-50) 开始。我不想显示负 x 轴和 y 轴。

CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet;
axisSet.xAxis.orthogonalCoordinateDecimal = CPTDecimalFromFloat(1.0);  // or whatever
axisSet.yAxis.orthogonalCoordinateDecimal = CPTDecimalFromFloat(1.0); 

我试过上面的代码。如果我使用它,它不会显示 x 轴和 y 轴的值。我该如何解决这个问题?提前致谢!

最佳答案

使用 axisSet.xAxis.visibleRange 设置图表的 x 轴可见范围和 yAxis 的 y 轴。

关于ios - 核心情节图从原点开始,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27523343/

相关文章:

iOS OpenGL ES 2.0 VBO 混淆

ios - Coreplot 注释绘制在轴上

ios - swift : How to convert String to string with time format?

iOS 6 自定义分组 UITableViewCell 大小不正确

ios - 什么是好的 ios 图表库/框架

r - 如何在ggplot中制作具有离散x轴的折线图?

javascript - 使用 Chart.Js 绘制最高(绿色)和最低(红色)坐标图

python - 在 Pandas 折线图中绘制多列

iOS 接入点 : sending the device token to the provider in string format

ios - Core Plot - iOS - 突出显示 2 条绘图线之间的区域