iphone - Core Plot: How to set xRange/yRange with different scales? -


i wanting use altitude y range , distance x range. using:

plotspace.xrange = [cpplotrange                          plotrangewithlocation:cpdecimalfromfloat(0.0)                          length:cpdecimalfromunsignedinteger(sortedarray.count)]; plotspace.yrange = [cpplotrange                          plotrangewithlocation:cpdecimalfromfloat(min)                          length:cpdecimalfromfloat((max - min))]; 

that doesn't set x range correctly, because sets number of points in array, 2500. have tried setting xrange to max value in distance array, screws graph.

how can have 2 different scales x , y , still have graph correct?

here looks when change xrange distance, graph goes flat: alt text

calculate min , max distance , use set xrange , calculate min , max altitude , use set yrange.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -