Text Scatter Plots?

View: New views
11 Messages — Rating Filter:   Alert me  

Text Scatter Plots?

by Wayne Watson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a text graphics module that does say scatter plots or histograms? I'm thinking of stuff prior to the graphics era of computing. I'm looking for something really simple.
--
Signature.html
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
           "Truth is mighty and will prevail. There is nothing wrong
            with this, except that it ain't so."   -- Mark Twain
            
                    Web Page: <www.speckledwithstars.net/>

_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by Alan Gauld :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


"Wayne Watson" <sierra_mtnview@...> wrote
> Is there a text graphics module that does say scatter plots or
> histograms?
> I'm thinking of stuff prior to the graphics era of computing.

Not that I'm aware of.
The best I can think of is to use curses - see a recent thread.

Other than that you can create a 2D table in memory then
dump that to a text based screen.

Best I can think of.

There wasn't much prior to graphics in computing, even many of the
earliest computer programs produced graphs, it was just that they
did it on paper. Remember the earliest keyboards were attached to
printers so most early graphics programs simply printed a dot matrix
pattern to the printer.

The plot utility can stuill do that today. And Gnuplot - for which
there is a Python interface - is a souped up version that can
display on graphics terminals too.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld





I'm looking for something really simple.

>
> --
>
>           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
>
>             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
>
>           "Truth is mighty and will prevail. There is nothing wrong
>            with this, except that it ain't so."   -- Mark Twain
>
>                    Web Page: <www.speckledwithstars.net/>


--------------------------------------------------------------------------------


> _______________________________________________
> Tutor maillist  -  Tutor@...
> http://mail.python.org/mailman/listinfo/tutor
>


_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by Wayne Watson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I didn't see any posts with curses in the Subject, but my participation here 2/2008 to now with a hole in the middle where I turned to other matters than Python. Is there an archive?

Before GUIs, crude scatter plots and histograms on TTYs and IBM electronic typewriters were used with only the symbols on the keyboard. Some were pretty decent and effective.

I don't really want to dabble with graphics at this point, although I have some months ago, but maybe I can grab something very elementary and use it. At the moment, I don't want to get into all the finery of using GUIs. However, it seems as though there ought to be some really simple set up to just produce a scatter plot. Maybe I'm overestimating the difficulty.

Alan Gauld wrote:

"Wayne Watson" sierra_mtnview@... wrote
Is there a text graphics module that does say scatter plots or histograms?
I'm thinking of stuff prior to the graphics era of computing.

Not that I'm aware of.
The best I can think of is to use curses - see a recent thread.

Other than that you can create a 2D table in memory then
dump that to a text based screen.

Best I can think of.

There wasn't much prior to graphics in computing, even many of the
earliest computer programs produced graphs, it was just that they
did it on paper. Remember the earliest keyboards were attached to
printers so most early graphics programs simply printed a dot matrix
pattern to the printer.

The plot utility can stuill do that today. And Gnuplot - for which
there is a Python interface - is a souped up version that can
display on graphics terminals too.

HTH,


--
Signature.html
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
           "Truth is mighty and will prevail. There is nothing wrong
            with this, except that it ain't so."   -- Mark Twain
            
                    Web Page: <www.speckledwithstars.net/>

_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by W W-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Sep 29, 2008 at 10:33 AM, Wayne Watson <sierra_mtnview@...> wrote:
I didn't see any posts with curses in the Subject, but my participation here 2/2008 to now with a hole in the middle where I turned to other matters than Python. Is there an archive?

Before GUIs, crude scatter plots and histograms on TTYs and IBM electronic typewriters were used with only the symbols on the keyboard. Some were pretty decent and effective. 

I suppose if you really wanted to try your hand at it you could use something like string formatting, along with a monospace font to try and create some sort of ASCII plot... I don't know of any tool that's already built to do such a thing, though.

-a different Wayne

_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by Kent Johnson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Sep 29, 2008 at 11:33 AM, Wayne Watson
<sierra_mtnview@...> wrote:

> I don't really want to dabble with graphics at this point, although I have
> some months ago, but maybe I can grab something very elementary and use it.
> At the moment, I don't want to get into all the finery of using GUIs.
> However, it seems as though there ought to be some really simple set up to
> just produce a scatter plot. Maybe I'm overestimating the difficulty.

Producing a scatterplot with matplotlib and displaying the result in a
window can be pretty simple. Here is an example that displays a sine
curve in eight lines of code:
http://msenux.redwoods.edu/mathdept/python/simple.php

Kent
_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by Alan Gauld :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


"Wayne Watson" <sierra_mtnview@...> wrote

> Before GUIs, crude scatter plots and histograms on TTYs
> and IBM electronic typewriters were used with only the
> symbols on the keyboard. Some were pretty decent and
> effective.

Basioc charts can be done that way but usually they are
just produceed by print statements with no special charting
or plotting software. The earliest plotting software that I'm
aware of all used bitmap imaging to the dot matrix printers
of the time

> I don't really want to dabble with graphics at this point

The point of the graphics libraries like gnuplot is that they
make it easier to produce real graphics than it is to try fancy
printing techniques.

> I don't want to get into all the finery of using GUIs.

The plotting libraries can usually throw up a window for you.
It won't be a full GUI application just a floating window in
screen with a graph drawn in it. Check out the screenshots.
Alternatively they can save the image to a file which you
can display in any graopghics program or web browser
of your choice.

> However, it seems as though there ought to be some
> really simple set up to just produce a scatter plot.
> Maybe I'm overestimating the difficulty.

One way to find out would be to try writing one yourself.
You could then make it available to the community.
Sounds like a useful project...

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld

_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by R. Alan Monroe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Is there a text graphics module that does say scatter plots or
> histograms? I'm thinking of stuff prior to the graphics era of
> computing. I'm looking for something really simple.

Here's a quick and dirty way to do basic histogram of dice rolls:


import random

rolls={}

for x in range(10000):
    a = [random.randint(1,10) for x in range(2)]
    v = sum(a)
   
    try:
        rolls[v] += 1
    except KeyError:
        rolls[v] = 1

m = max(rolls.values())
stretch = (m/70.0)

for x in rolls.keys():
    print x, rolls[x], '*' * ( int(rolls[x] / stretch)  )

_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by OmerT :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You could check out Google Visualization API. supposed to be fairly nifty; haven't had time to check it out myself though.

On Wed, Oct 1, 2008 at 4:49 PM, R. Alan Monroe <amonroe@...> wrote:
> Is there a text graphics module that does say scatter plots or
> histograms? I'm thinking of stuff prior to the graphics era of
> computing. I'm looking for something really simple.



_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by Wayne Watson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I'm finally in a position where I might want to use matplotlib. I looked at the site but I'm not sure there's a download for 2.4. There seems to be one ( matplotlib-0.98.1.win32-py2.5.exe)download for Win XP (and other Win OSes). I did see that it requires python 2.3 as a min. Any idea?

Kent Johnson wrote:
On Mon, Sep 29, 2008 at 11:33 AM, Wayne Watson
sierra_mtnview@... wrote:

  
I don't really want to dabble with graphics at this point, although I have
some months ago, but maybe I can grab something very elementary and use it.
At the moment, I don't want to get into all the finery of using GUIs.
However, it seems as though there ought to be some really simple set up to
just produce a scatter plot. Maybe I'm overestimating the difficulty.
    

Producing a scatterplot with matplotlib and displaying the result in a
window can be pretty simple. Here is an example that displays a sine
curve in eight lines of code:
http://msenux.redwoods.edu/mathdept/python/simple.php

Kent

  

--
Signature.html
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
           "Truth is mighty and will prevail. There is nothing wrong
            with this, except that it ain't so."   -- Mark Twain
            
                    Web Page: <www.speckledwithstars.net/>

_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by Kent Johnson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Oct 11, 2008 at 2:03 AM, Wayne Watson
<sierra_mtnview@...> wrote:
> Hi, I'm finally in a position where I might want to use matplotlib. I looked
> at the site but I'm not sure there's a download for 2.4.

This page shows matplotlib-0.98.3.win32-py2.4.exe:
http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194

Kent
_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor

Re: Text Scatter Plots?

by Kent Johnson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Sep 29, 2008 at 6:34 AM, Wayne Watson
<sierra_mtnview@...> wrote:
> Is there a text graphics module that does say scatter plots or histograms?
> I'm thinking of stuff prior to the graphics era of computing. I'm looking
> for something really simple.

Not simple but maybe helpful:
http://www-rcf.usc.edu/~kaizhu/work/asciiporn/

Despite the name it has nothing to do with porn, AFAICT.

Kent
_______________________________________________
Tutor maillist  -  Tutor@...
http://mail.python.org/mailman/listinfo/tutor
LightInTheBox - Buy quality products at wholesale price!