Skip to main content

Posts

Showing posts with the label core-plot

Y axis positioning

I have added extra y axis in the graph. When i am trying to display the graph the added Y axis is not visible. I am able to draw graph with that y axis. How can i make that Y axis visible? My code is as below.. CPTXYAxis *rightY = [[CPTXYAxis alloc] init]; rightY.coordinate = CPTCoordinateY; rightY.orthogonalCoordinateDecimal = CPTDecimalFromFloat(3600 * 7); //rightY.majorGridLineStyle = lineStyle; rightY.axisLineStyle = lineStyle2; [rightY setAxisTitle:[[CPTAxisTitle alloc] initWithText:@"New Axis" textStyle:whiteText]]; rightY.gridLinesRange = [[CPTPlotRange alloc] initWithLocation:CPTDecimalFromInt(0) length:CPTDecimalFromInt(15)]; rightY.plotSpace = plotSpace1; NSMutableArray *newAxes = [graph.axisSet.axes mutableCopy]; [newAxes addObject:rightY]; graph.axisSet.axes = newAxes; [newAxes release]; [graph addPlotSpace:plotSpace1];

Core Plot :Move only Data

I have created a scatter graph with three plot spaces. One for two y-axis each and one for the x-axis. I am able to show data for both y-axis. However now i want to move only the data,i.e. two line and not the two y-axis.Only the data and x-axis should move. I have tried allowUserinteraction property. However is I enable it for x-axis, x axis moves without the data. If i enable it for both/either of axis, y axis also moves with data and scale of y-axis is not visible all the time. Can someone help pleas.e This is my first work with core plot. I will add code if required. Thanks