Coreplot:轴标签固定位置 [英] Coreplot: Axis Labels Fixed Location

查看:68
本文介绍了Coreplot:轴标签固定位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过多种方式自定义Coreplot图,接下来我想做的就是将X轴标签(也可以自定义)放置在图的底部,与X轴的位置(无论是向上滚动还是向下滚动)。

I'm trying to customize a Coreplot graph in many ways I can and the next thing I would like to do is place the X Axis Labels (one that is custom as well) at the bottom of the graph, independent of the X axis' position (whether it's scrolled up or down).

要弄清楚,这类似于为标签赋予偏移值(例如50.0)。但是offset不是我想要的属性,因为它可以固定标签相对于X轴的位置。

To make it clear, it is similar to giving the labels an offset value of something like 50.0. But offset is not the property I'm looking for since it fixes the labels location relative to the X axis.

可以这样做吗?还是我必须跳过 axisLabels 属性并在图的底部手动放置和图层或其他内容?

Any way this can be done? Or do I have to skip the axisLabels property and place and layer or something manually at the bottom of the graph?

编辑:好的,我设法通过 CPTConstraints 在底部放置了一个轴。但这不是最底层的。如果绘图点在这些级别上,则绘图线与标签重叠。我很累图的填充,但是当然,它会移动整个图,因此问题仍然存在。

Alright, I managed to place an axis on the bottom with CPTConstraints. But it's not on the bottommost. If a plot point is on those levels, the plot line overlaps the labels. I tired padding of the graph but of course, it moves the whole graph, hence the issue persists.

预先感谢

推荐答案

结果表明,除了图形以外, CPTGrpah plotAreaFrame 属性c $ c>也有填充。如果您给 plotAreaFrame 填充多于图形的填充,则将在较小的框架中绘制图,并且图的其余部分将供您添加所需的内容(即第二个Axis)。

Turns out that aside from the graph, the plotAreaFrame property of the CPTGrpah also has paddings. If you give more paddings to plotAreaFrame than that of the graph, the plot will be drawn in a smaller frame and the rest of the graph area will be for you to add what you want (i.e., a second Axis).

非常感谢@Eric,感谢您尝试回答每个CorePlot问题。

Big thanks to @Eric, for trying to answer Every single CorePlot question as soon as possible.

CorePlot确实比我想象的要个性化很多。

CorePlot does have a lot of customisation than I thought.

这篇关于Coreplot:轴标签固定位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆