Scalabilty

53 views
Skip to first unread message

nitesh dulal

unread,
Jun 6, 2011, 5:49:40 AM6/6/11
to coreplot-discuss
HI
i am looking to build a stockplot like example except that i wana plot
the stock data over the day
so instead of days on x axis i want to display hours and minutes. how
can i do that. looking through your examples i learn that day's are
printed on the x-axis what should i do to display time
also as the time progresses i want to expand my x-axis.
or the span should compress to accomodate the new data and the date
value on the xaxis
any help would be highly appreciated
Thanks
Nitesh

Eric

unread,
Jun 6, 2011, 8:42:19 PM6/6/11
to coreplot-discuss
It's all a matter of how you choose to scale your data and how you set
up the formatter for the x-axis. Depending on your range and the
desired appearance, you could even label the major ticks with the date
and use a different format to label the minor ticks with the time.

Eric

nitesh dulal

unread,
Jun 7, 2011, 12:44:14 AM6/7/11
to coreplot...@googlegroups.com
Got it thanks a lot eric :)
hey in my scatter stock plot
i want to show the highest point with a red annoitation and the lowest point with a green one
can i do this in core plot

--
You received this message because you are subscribed to the Google Groups "coreplot-discuss" group.
To post to this group, send email to coreplot...@googlegroups.com.
To unsubscribe from this group, send email to coreplot-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coreplot-discuss?hl=en.


nitesh dulal

unread,
Jun 8, 2011, 9:49:55 AM6/8/11
to coreplot...@googlegroups.com
hi eric
i am tryinf to plot a stock plot like example
now as the the time passes there would be some new data data cuming which i ahev to plot
i reload the data source method after 5 mins
but they take a lot of time to plot. its like the data which come at 11 am gets plotted by 11 :15.
where can i be going wrong

Eric

unread,
Jun 8, 2011, 10:31:54 PM6/8/11
to coreplot-discuss
It takes 15 minutes to draw the plot?!?

On Jun 8, 9:49 am, nitesh dulal <nitesh.dul...@gmail.com> wrote:
> hi eric
> i am tryinf to plot a stock plot like example
> now as the the time passes there would be some new data data cuming which i
> ahev to plot
> i reload the data source method after 5 mins
> but they take a lot of time to plot. its like the data which come at 11 am
> gets plotted by 11 :15.
> where can i be going wrong
>
> On Tue, Jun 7, 2011 at 10:14 AM, nitesh dulal <nitesh.dul...@gmail.com>wrote:
>
>
>
> > Got it thanks a lot eric :)
> > hey in my scatter stock plot
> > i want to show the highest point with a red annoitation and the lowest
> > point with a green one
> > can i do this in core plot
>

nitesh dulal

unread,
Jun 9, 2011, 1:01:10 AM6/9/11
to coreplot...@googlegroups.com
no no! i was jus trying to explain you the situation its doesnt take that much time to plot
it just lags behind the time scale
see what i am doing is
m plotting a stock plot for a day.
so i have an array where i store the data which comes from the webservice
the webservice returns the data every 5 secs
so after every  5 secss its obvious i have to reload the datasource methods
so i assumed that by the time the next time datasource are called the plot would be drawn.
but it is drawn only after the i call the datasource methods using reload for the next time interval
but at the end everythings does get plot but its jus lags
i just wana know if they are any methods which help me draw on on a certain range
like my x axis time
i wana plot 10am to 11 am first time
then i wana plot for 11-12 the second time i call teh datasource methids

nitesh dulal

unread,
Jun 9, 2011, 2:52:56 AM6/9/11
to coreplot...@googlegroups.com
hi i realised where i was going wrong thanks anyways :)

nitesh dulal

unread,
Jun 14, 2011, 10:06:20 AM6/14/11
to coreplot...@googlegroups.com
hey can u tell me how to disable the pinching on the coreplot without disabling the scrolling
thnks in advance

Eric

unread,
Jun 14, 2011, 10:35:20 PM6/14/11
to coreplot-discuss
Set allowPinchScaling = NO on your hosting view.

Eric

On Jun 14, 10:06 am, nitesh dulal <nitesh.dul...@gmail.com> wrote:
> hey can u tell me how to disable the pinching on the coreplot without
> disabling the scrolling
> thnks in advance
>
> On Thu, Jun 9, 2011 at 12:22 PM, nitesh dulal <nitesh.dul...@gmail.com>wrote:
>
>
>
> > hi i realised where i was going wrong thanks anyways :)
>
> > On Thu, Jun 9, 2011 at 10:31 AM, nitesh dulal <nitesh.dul...@gmail.com>wrote:
>
> >> no no! i was jus trying to explain you the situation its doesnt take that
> >> much time to plot
> >> it just lags behind the time scale
> >> see what i am doing is
> >> m plotting a stock plot for a day.
> >> so i have an array where i store the data which comes from the webservice
> >> the webservice returns the data every 5 secs
> >> so after every  5 secss its obvious i have to reload the datasource
> >> methods
> >> so i assumed that by the time the next time datasource are called the plot
> >> would be drawn.
> >> but it is drawn only after the i call the datasource methods using reload
> >> for the next time interval
> >> but at the end everythings does get plot but its jus lags
> >> i just wana know if they are any methods which help me draw on on a
> >> certain range
> >> like my x axis time
> >> i wana plot 10am to 11 am first time
> >> then i wana plot for 11-12 the second time i call teh datasource methids
>

nitesh dulal

unread,
Jun 15, 2011, 5:03:45 AM6/15/11
to coreplot...@googlegroups.com
great that did the trick
and is there any way that while zooming i jus want my x axis to scale not my y- axis!!!!
i have my axis as time
now when i pinch in everything zoom's in i would like to change my major interval length then
. so is there any method where i can get the range after zoomin in or out and set the major interval length

nitesh dulal

unread,
Jun 15, 2011, 5:04:43 AM6/15/11
to coreplot...@googlegroups.com
great that did the trick
and is there any way that while zooming i jus want my x axis to scale not my y- axis!!!!
i have my xaxis as time

Drew McCormack

unread,
Jun 15, 2011, 5:06:28 AM6/15/11
to coreplot...@googlegroups.com
Look at the delegate methods of CPTXYPlotSpace and CPTPlotSpace. There are some there you can use to get updates of the ranges.
You can use the delegate methods to prevent scaling in Y too, or set the globalYRange to the yRange to prevent that.

Drew

nitesh dulal

unread,
Jun 15, 2011, 7:41:07 AM6/15/11
to coreplot...@googlegroups.com
yea i dod have a look at those methods
but i cant see them giving me the current range
they jus return CGPoint if possible can u name the methods

Drew McCormack

unread,
Jun 15, 2011, 8:40:22 AM6/15/11
to coreplot...@googlegroups.com
-(CPTPlotRange *)plotSpace:(CPTPlotSpace *)space willChangePlotRangeTo:(CPTPlotRange *)newRange forCoordinate:(CPTCoordinate)coordinate;
-(void)plotSpace:(CPTPlotSpace *)space didChangePlotRangeForCoordinate:(CPTCoordinate)coordinate;

nitesh dulal

unread,
Jun 15, 2011, 12:07:48 PM6/15/11
to coreplot...@googlegroups.com
so the newRange would return the current range ????

Drew McCormack

unread,
Jun 16, 2011, 3:10:49 AM6/16/11
to coreplot...@googlegroups.com
Yes. If you don't want it to change, return the current range when the coordinate is y.

Drew
Reply all
Reply to author
Forward
0 new messages