We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Positioning in processing
Page Index Toggle Pages: 1
Positioning in processing (Read 1040 times)
Positioning in processing
Nov 30th, 2009, 7:04am
 
Hello everyone:

I am trying to draw two nice graphs of some measurements in processing, and I am very new to drawing in processing, so I don't know neither if it is possible to do so nor how.
The thing is, is is possible to draw two different graphs using two different functions and then positioning them in different spots on the program window? Besides adding some nice text, just like the labels and scales to the graphs..

And I was wondering if someone could give me a hand with this telling me where to begin with?

Thanks a lot in advance!
Re: Positioning in processing
Reply #1 - Nov 30th, 2009, 7:31am
 
To answer the core question: yes, you can do that.
One simple (?) way is to draw the first graph, do a translate(), then draw the second graph: the coordinates will be offset, so they will be separate.
Another possible way is to draw in different off-screen PGraphics, then image() them on screen.

I suggest you look at the Learning section, it has lot of little samples showing various functions like drawing a line or displaying text.

And, of course, (precise) questions are welcome!
Re: Positioning in processing
Reply #2 - Dec 15th, 2009, 12:52am
 
You may want to check Tom Igoe's datalogger code for some basic graphing examples.
Page Index Toggle Pages: 1