core-plot

Change line style of CPScatterPlot for different points

孤街浪徒 提交于 2019-12-24 08:22:24
问题 I'm using coreplot on ios and have a scatterplot. Is it possible to vary the line style depending on the point being plotted? I've only found how to set it for the whole plot. 回答1: Yes. Make sure your graph delegate conforms to CPScatterPlotDelegate by implementing - symbolForScatterPlot:recordIndex: . Here's a working implementation which returns a different symbol for the index which matches _selectedIndex : - (CPPlotSymbol *)symbolForScatterPlot:(CPScatterPlot *)plot recordIndex:

How can I customize a Core Plot graph to mimic this style?

淺唱寂寞╮ 提交于 2019-12-24 04:07:26
问题 I would like to draw a line graph in the same style as the one posted in this Core Plot issue. Is there a tutorial out there on how to create a graph like this in Core Plot? 回答1: Use the below links this will help you. http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application http://code.google.com/p/s7graphview/ http://code.google.com/p/core-plot/wiki/PlotExamples 来源: https://stackoverflow.com/questions/6420717/how-can-i-customize-a-core-plot-graph-to-mimic-this-style

CorePlot - Expected Token Before '@' token

自闭症网瘾萝莉.ら 提交于 2019-12-24 00:46:31
问题 I am trying to incorporate CorePlot into my project. I finally manages to get my header files recognized but i keep getting the following error in my main.m. "Expected expression before '@' token" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([ProjectFiveAppDelegate class])); } } 回答1: The @autoreleasepool syntax was introduced fairly recently, you probably need to install Xcode 4.2. Another possibility is that your compiler

Using CPTAnnotation in CorePlot DatePlot (iOS)

别来无恙 提交于 2019-12-23 18:26:28
问题 I am Using CorePlot in my app, and I want to display a annotation over the plotSymbol. I haven't found any code in the sample projects of the latest 0.9 version of CorePlot. After some research i have come to this point: - (void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index { CPTLayerAnnotation *annot = [[CPTLayerAnnotation alloc]initWithAnchorLayer:graph]; CPTBorderedLayer * logoLayer = [[(CPTBorderedLayer *) [CPTBorderedLayer alloc] initWithFrame

Coreplot legend with title, country label and under that line in swift

无人久伴 提交于 2019-12-23 13:38:07
问题 How to display the coreplot legend like this? country flag,country name under that line(resembled in the graph) func configureLegend() { guard let graph = hostView.hostedGraph else { return } let legend = CPTLegend(graph: graph) graph.legend = legend graph.legendAnchor = .topLeft graph.legendDisplacement = CGPoint(x: 50.0, y: -2.0) legend.fill = CPTFill(color: CPTColor.clear()) legend.swatchSize = CGSize(width: 10.0, height: 10.0) legend.numberOfRows = 1 legend.entryPaddingBottom = 12 let

core-plot: still do not understand how to have custom label AND ticks

守給你的承諾、 提交于 2019-12-23 09:20:35
问题 I have this problem since a long time and I cannot find anything to solve this. I read several forum but was not able to find a working solution. I have the following code: // Adjust graph using above data CPXYPlotSpace *plotSpace = (CPXYPlotSpace *)graph.defaultPlotSpace; plotSpace.xRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(-10) length:CPDecimalFromFloat(xmax + 17)]; plotSpace.yRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(-450) length:CPDecimalFromFloat

Core plot: How to hide the plot, axis and labels?

Deadly 提交于 2019-12-23 07:49:59
问题 I have a graph with Y and X axises drawn on the default plot space along with the primary plot, and then I have separate plot spaces for auxiliary plots each with their own Y-axes (the X-axis is the same for all plots). I'm implementing buttons to switch the auxiliary plots on and off and I would like this to include basically the whole plot space (plot, custom y-axis, and labels of the custom y-axis). There doesn't seem to be any 'hidden' property for the plot space, and all-tough the plot

CorePlot: what is the difference between majorTickLocations (graph) and setYRange (plot space)?

三世轮回 提交于 2019-12-23 05:41:36
问题 I would like to create 3 colour bands in my graph but I think I am doing something wrong. The y values should range from 0 to 1024 and I would like to have a first colour band from 0 to 300, a second one from 300 to 600 and a third one from 600 to 1024. However the code I wrote creates 6 bands instead of 3 and it seems to ignore the 1024 limit . Here is the resulting graph and the code I used: Graph: It should have only 3 bands , plus it seems to ignore the fact that I set a range of 1024 in

How to Install CorePlot SDK

非 Y 不嫁゛ 提交于 2019-12-23 04:57:20
问题 I want to create a chart application. I read that CorePlot can be used to do this, but I don't know where may I go to download the CorePlotSDK, and how or where to install it. I also read the procedure for installing the CorePlotSDK but I'm not clear about that. Please explain the downloading and installing procedure. Also explain the frameworks that I want to include and that purpose. 回答1: The project is hosted here. Follow the instructions there to download it, then maybe tell us any issues

Application get stuck when drawing nearly 40 Scatter Plots using Core Plot in IPad

与世无争的帅哥 提交于 2019-12-23 03:57:07
问题 I am developing an iPad app , it has the option to show Scatter Plots user able to plot the points.I have used core plot library.i have to show 40 Scatter plots in a view controller. my application becomes not responding and get quits when i load 25 graphs. Is there any limitation (No.of Scatter plot counts) in Core plot for a View Controller to show? What is the optimal way to load Scatter Plots using Core Plot? 回答1: There's no hard limit on the number of graphs, but you will eventually run