graphics - Coreplot in swift: change starting value of axis to 1 -
i have graph , wan't x
, 2 y
start @ 1 not 0.
![enter image description here][1]
this how setup plotspaces:
//plotspace 1 var plotspace: cptxyplotspace = graph.defaultplotspace cptxyplotspace var xrange = plotspace.xrange.mutablecopy() cptmutableplotrange var yrange = plotspace.yrange.mutablecopy() cptmutableplotrange xrange.length = self.maxx yrange.length = maxpoids plotspace.xrange = xrange plotspace.yrange = yrange //plotspace2 (second y) var plotspace2: cptxyplotspace = cptxyplotspace() var xrange2 = plotspace2.xrange.mutablecopy() cptmutableplotrange var yrange2 = plotspace2.yrange.mutablecopy() cptmutableplotrange xrange2.length = self.maxx yrange2.length = maxeau plotspace2.xrange = xrange2 plotspace2.yrange = yrange2 graph.addplotspace(plotspace2)
how can that?
the location
of plot range left end (on x-axis) or bottom end (on y-axis). give each range location
of 1 (1) , adjust length
max - min (i.e., 1 in case).
Comments
Post a Comment