[newbie] Drawing a 2D graph
[newbie] Drawing a 2D graph
- Subject: [newbie] Drawing a 2D graph
- From: Matt Crocker <email@hidden>
- Date: Sat, 15 Nov 2003 23:47:25 +0000
Hi
Thanks to everyone who helped out with my NSMutableArray question of a
few hours ago. I have now used their suggestions to obtain a set of
data points held in arrays within my code. Now, I want to draw a simple
line graph made up from the x,y coordinates I have obtained from the
data file. I have been searching through the archives and it all seems
massively over-complicated for what I want to do. Setting up OpenGL has
me baffled (it is probably overkill for this), and trying to implement
a few examples using implementations of drawRect just to draw
*something* in by NSView has no effect.
The state of play so far is:
1. I have an NSView in my NIB file which is wired up to an outlet
called profileDisplay.
2. I have pairs of x,y coordinates.
3. I want to draw these as a nice, simple line within this NSView.
I have no idea how I apply the drawRect to my profileDisplay. Once this
is working, I'm sure I can work out how to use moveToPoint, etc to draw
my little line.
As usual, I'm sure it's simple, and it's me who's been stupid.
Thanks loads in advance.
Matt
_______________________________________________
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.