• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[newbie] Drawing a 2D graph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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.

  • Follow-Ups:
    • Re: [newbie] Drawing a 2D graph
      • From: Brad <email@hidden>
  • Prev by Date: Re: NSTextField getting input number by number
  • Next by Date: Re: Search Hard Drive
  • Previous by thread: Re: Memory Leak with NSURLRequest?
  • Next by thread: Re: [newbie] Drawing a 2D graph
  • Index(es):
    • Date
    • Thread