Re: Charting solutions
Re: Charting solutions
- Subject: Re: Charting solutions
- From: John Anderson <email@hidden>
- Date: Tue, 1 Apr 2003 16:17:13 -0500
On Tuesday, Apr 1, 2003, at 02:28 America/Detroit, Drew McCormack wrote:
>
Yes, I have just thrown together a small test app with XYPlot to see
>
what it is about.
>
It works very well, and is quite complete. My framework is less user
>
friendly at this
>
stage.
>
>
My framework takes quite a different approach to XYPlot. XYPlot is
>
basically procedural plotting
>
code in a single cocoa class. This has advantages, such that it is
>
very fast, and quite easy to
>
understand. In this sense, it probably meets most peoples needs and
>
expectations.
Drew,
For the type of scientific / numerical applications that I develop,
something like a pie chart is not going be to necessary. This type of
"warm and fuzzy" presentation is a distinctly different goal from the
fundamental graphs of technical data that we need immediately. So, I
think that the search simple 2D chart / graphics toolkit is basically
resolved for now. For basic 2D plotting in Cocoa, I am going to adopt
XYPlot and build on it. I will commit to releasing some more advanced
GUI / palette versions based on it.
In particular, I am planning to use and build on XYPlot for time-series
analysis in real-time data acquisition. I have yet to look at the
XYPlot code, but I am going to be concerned about the auto-scaling
features with respect to time axi. Until I get some kind of Cocoa
Numerics site up (which will take me a least a few weeks), anyone who
wants a copy of XYPlot can get it by emailing me off-list.
For those interested in Cocoa Numerics, within the XYPlot project there
is a very well developed class that I think represents something
missing in the current Cocoa Foundation (again, re-authored by Sean
Hill) . It is called NSValueArray, and it let us handle and manipulate
numerical arrays as NSArrays (instead of C pointers). Like, the
Foundation class is also defined in a mutable form:
NSMutableValueArray. Below I have posted NSValueArray.h for the
curious.
Truly Yours,
John Philip Anderson
"South of Eight Mile," Michigan
USA
// Rewritten for OpenStep, 1996 Sean Hill
// Originally by Scott Hess
#import <Foundation/Foundation.h>
@interface NSValueArray : NSArray
+ valueArray:(const void *)values count:(unsigned)count
withObjCType:(const char *)type;
- initWithValues:(const void *)values count:(unsigned)count
withObjCType:(const char *)type;
-(void)getValue:(void *)value atIndex:(unsigned)index;
- (NSValueArray *)valueArrayFromRange:(NSRange)range;
-(const char *)objCType;
-(unsigned)valueSize;
-(const void *)bytes;
- mutableCopyFromZone:(NSZone *)zone;
- copyFromZone:(NSZone *)zone;
@end
@interface NSMutableValueArray : NSMutableArray
+ valueArray:(const void *)values count:(unsigned)count
withObjCType:(const char *)type;
+ valueArrayWithObjCType:(const char *)type;
- initWithValues:(const void *)values count:(unsigned)count
withObjCType:(const char *)type;
-(void)getValue:(void *)value atIndex:(unsigned)index;
-(NSMutableValueArray *)valueArrayFromRange:(NSRange)range;
-(const char *)objCType;
-(unsigned)valueSize;
-(const void *)bytes;
-(void *)mutableBytes;
-(void)addValue:(void *)value;
-(void)addValues:(void *)values count:(unsigned)count;
-(void)replaceValue:(void *)value atIndex:(unsigned)index;
-(void)insertValue:(void *)value atIndex:(unsigned)index;
-(void)removeValueAtIndex:(unsigned)index;
- mutableCopyFromZone:(NSZone *)zone;
- copyFromZone:(NSZone *)zone;
@end
@interface NSNumber (NSValueArrayNumberExtensions)
+ (NSValue *)value:(const void *)value withObjCType:(const char *)type;
@end
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.