Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot - Python
This is a discussion on Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot - Python ; I'm looking for an example with canvas that produces, say, a complete x-y
plot of some data. By that I mean, it should do something like the following:
1. Produce x-y axes. The x-axis should be blue and the y-axis
...
-
Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot
I'm looking for an example with canvas that produces, say, a complete x-y
plot of some data. By that I mean, it should do something like the following:
1. Produce x-y axes. The x-axis should be blue and the y-axis
should be green
2. Put a label on each axis (vertical and horizontal text)
3. Plot some data (3 points is enough) and connect the points
with a dashed line. Color one line red and the other green.
4. Position a title at some arbitrary place inside the x-y axes.
That is, not just a title above and outside the top of the
x-y area.
I just want to see how it's done. I'm not interested in a full-blown canned
class or widget that does an x-y plot given some data. If not exactly the
above, then something like it that gives me some idea of how to do such a
graph. Maybe there's a tutorial that does something like this as an example.
--
Wayne Watson (Nevada City, CA)
Web Page: <speckledwithStars.net>
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot
On 2007-09-18, W. Watson <wolf_tracks@invalid.com> wrote:
> I'm looking for an example with canvas that produces, say, a
> complete x-y plot of some data.
With what widget set?
--
Grant Edwards grante Yow! I'm a nuclear
at submarine under the
visi.com polar ice cap and I need
a Kleenex!
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Producea Plot
What would be appropriate? What are the choices? I'm pretty new to Python,
but am familiar with the XWindow widget set. I think it is available under
Python, but if there's a more suitable choice, that's fine. I would think
Tkinter would be the simplest choice. Yes, Tkinter would be preferable. It
seems to be the GUI of choice.
Grant Edwards wrote:
> On 2007-09-18, W. Watson <wolf_tracks@invalid.com> wrote:
>
>> I'm looking for an example with canvas that produces, say, a
>> complete x-y plot of some data.
>
> With what widget set?
>
--
Wayne Watson (Nevada City, CA)
Web Page: <speckledwithStars.net>
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot
On Sep 18, 12:23 pm, "W. Watson" <wolf_tra...@invalid.com> wrote:
> What would be appropriate? What are the choices? I'm pretty new to Python,
> but am familiar with the XWindow widget set. I think it is available under
> Python, but if there's a more suitable choice, that's fine. I would think
> Tkinter would be the simplest choice. Yes, Tkinter would be preferable. It
> seems to be the GUI of choice.
>
> Grant Edwards wrote:
> > On 2007-09-18, W. Watson <wolf_tra...@invalid.com> wrote:
>
> >> I'm looking for an example with canvas that produces, say, a
> >> complete x-y plot of some data.
>
> > With what widget set?
>
> --
> Wayne Watson (Nevada City, CA)
>
> Web Page: <speckledwithStars.net>
I've heard a lot about drawing with the wxPython widget set as well.
Some examples:
http://wiki.wxpython.org/RecipesImagesAndGraphics
Mike
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot
On 2007-09-18, W. Watson <wolf_tracks@invalid.com> wrote:
> What would be appropriate? What are the choices? I'm pretty new to Python,
> but am familiar with the XWindow widget set.
There's no such thing as "the XWindow widget set". There are
at least 8-10 different X Windows widget sets. The ones that I
can name off the top of my head:
Tk
Athena
Motif
FLTK
GTK
Qt
XRT
WxWidgets (actually sort of meta-widget-set)
http://en.wikipedia.org/wiki/Widget_toolkit
http://en.wikipedia.org/wiki/List_of..._Window_System
--
Grant Edwards grante Yow! As President I have
at to go vacuum my coin
visi.com collection!
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Producea Plot
Tk is it. I'm really not interested in the others at this point.
Grant Edwards wrote:
> On 2007-09-18, W. Watson <wolf_tracks@invalid.com> wrote:
>
>> What would be appropriate? What are the choices? I'm pretty new to Python,
>> but am familiar with the XWindow widget set.
>
> There's no such thing as "the XWindow widget set". There are
> at least 8-10 different X Windows widget sets. The ones that I
> can name off the top of my head:
>
> Tk
> Athena
> Motif
> FLTK
> GTK
> Qt
> XRT
> WxWidgets (actually sort of meta-widget-set)
>
> http://en.wikipedia.org/wiki/Widget_toolkit
>
> http://en.wikipedia.org/wiki/List_of..._Window_System
>
--
Wayne Watson (Nevada City, CA)
Web Page: <speckledwithStars.net>
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot
On Tue, 18 Sep 2007 13:18:36 -0700, "W. Watson"
<wolf_tracks@invalid.com> wrote:
>Tk is it. I'm really not interested in the others at this point.
>
John Grayson's book 'Python and Tkinter Programming' has a chapter on
plotting Graphs and Charts. You can even download that chapter as a
PDF file:
http://www.manning-source.com/books/...ayson_ch11.pdf
See http://www.manning.com/grayson/ for more info about the book.
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Producea Plot
Thanks. I've arranged for an inter-library loan(ILL), and probably will not
get his book for several days yet. I've had the book before, but was really
unable to get the time to pursue it (the ILL). I have his web site
bookmarked. I do not yet plan to buy his book, web or hardbound yet. Maybe I
can re-examine his site for examples, and find one that is appropriate.
Richard Townsend wrote:
> On Tue, 18 Sep 2007 13:18:36 -0700, "W. Watson"
> <wolf_tracks@invalid.com> wrote:
>
>> Tk is it. I'm really not interested in the others at this point.
>>
>
> John Grayson's book 'Python and Tkinter Programming' has a chapter on
> plotting Graphs and Charts. You can even download that chapter as a
> PDF file:
>
> http://www.manning-source.com/books/...ayson_ch11.pdf
>
> See http://www.manning.com/grayson/ for more info about the book.
>
--
Wayne Watson (Nevada City, CA)
Web Page: <speckledwithStars.net>
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Producea Plot
Ah, I missed your link to Chap 11. That looks very helpful.
W. Watson wrote:
> Thanks. I've arranged for an inter-library loan(ILL), and probably will
> not get his book for several days yet. I've had the book before, but was
> really unable to get the time to pursue it (the ILL). I have his web
> site bookmarked. I do not yet plan to buy his book, web or hardbound
> yet. Maybe I can re-examine his site for examples, and find one that is
> appropriate.
>
>
> Richard Townsend wrote:
>> On Tue, 18 Sep 2007 13:18:36 -0700, "W. Watson"
>> <wolf_tracks@invalid.com> wrote:
>>
>>> Tk is it. I'm really not interested in the others at this point.
>>>
>>
>> John Grayson's book 'Python and Tkinter Programming' has a chapter on
>> plotting Graphs and Charts. You can even download that chapter as a
>> PDF file:
>>
>> http://www.manning-source.com/books/...ayson_ch11.pdf
>>
>> See http://www.manning.com/grayson/ for more info about the book.
>>
>
--
Wayne Watson (Nevada City, CA)
Web Page: <speckledwithStars.net>
-
Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot
On Sep 18, 11:58 pm, Richard Townsend <r...@nospam.com> wrote:
> On Tue, 18 Sep 2007 13:18:36 -0700, "W. Watson"
>
> <wolf_tra...@invalid.com> wrote:
> >Tk is it. I'm really not interested in the others at this point.
>
> John Grayson's book 'Python and Tkinter Programming' has a chapter on
> plotting Graphs and Charts. You can even download that chapter as a
> PDF file:
>
> http://www.manning-source.com/books/...ayson_ch11.pdf
>
> Seehttp://www.manning.com/grayson/for more info about the book.
Also, if the graph is really all you need, matplotlib might be a very
interesting choice:
http://matplotlib.sourceforge.net/
It's got some user-interface facilities as well. But I never used
those so far.
Similar Threads
-
By Application Development in forum ASM x86 ASM 370
Replies: 2
Last Post: 09-15-2007, 07:31 PM
-
By Application Development in forum C
Replies: 0
Last Post: 09-14-2007, 12:35 PM
-
By Application Development in forum Perl
Replies: 1
Last Post: 07-20-2006, 07:15 AM
-
By Application Development in forum Adobe Premiere
Replies: 4
Last Post: 10-30-2005, 11:37 AM
-
By Application Development in forum Adobe Premiere
Replies: 1
Last Post: 02-08-2005, 07:42 PM