Re: how to highlight an entire column in a scatter graph

26 views
Skip to first unread message

Eric

unread,
May 21, 2013, 8:18:40 PM5/21/13
to coreplot...@googlegroups.com
Use a "background limit band" on the x-axis. See Axis Demo in the Plot Gallery example app for sample code.

Eric

On Tuesday, May 21, 2013 6:46:44 AM UTC-4, taurus wrote:
In a scatter a plot, what's the easiest way to highlight an entire column as the picture below?

thanks in advance!


taurus

unread,
May 22, 2013, 6:41:27 AM5/22/13
to coreplot...@googlegroups.com
great, that worked, thanks! I'm posting the code I've added for future readers:

CPTFill *bandFill = [CPTFill fillWithColor:[[CPTColor whiteColor] colorWithAlphaComponent:0.7]];


        [x addBackgroundLimitBand:[CPTLimitBand limitBandWithRange:[CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(month-0.5) length:CPTDecimalFromDouble(1.0)] fill:bandFill]];

taurus

unread,
May 22, 2013, 6:57:47 AM5/22/13
to coreplot...@googlegroups.com
Just one more quick question. I've looked into the Axis Demo example, but I can't figure out why in my chart the limit band goes under the x-axis. I think it's because of the minor grid, since it finishes when the dash line finishes. But how can I change those values to stop at 0?



Il giorno mercoledì 22 maggio 2013 02:18:40 UTC+2, Eric ha scritto:

taurus

unread,
May 22, 2013, 10:09:05 AM5/22/13
to coreplot...@googlegroups.com
never mind, found out, my mistake :)
Reply all
Reply to author
Forward
0 new messages