[comp.sys.handhelds] HP48: connecting SCATTER: the easy way.

jurjen@cwi.nl (Jurjen NE Bos) (02/18/91)

There was a discussion about making a SCATTER plot with connected lines.
Here is a simple way to do this without programming whatsoever.
First, do the regular preparations for a scatter plot, and press SCATTER.
This sets all parameters for us.
Then, leave the graphic environment, go to the PLOT menu, select plot type
PARAMETRIC, give 'LINESCAT' STEQ, go to the PLOTR menu, set the resolution
to 1, and press DRAW.
That's all.
For this to work, you need a very tiny equation LINESCAT.
The variable LINESCAT must contain:
'\GSDAT(X;\GSPAR(1))+\GSDAT(X;\GSPAR(2))*i'

Is this simple, or what?

grue@batserver.cs.uq.oz.au (Frobozz) (02/19/91)

In <2957@charon.cwi.nl> jurjen@cwi.nl (Jurjen NE Bos) writes:
>There was a discussion about making a SCATTER plot with connected lines.

I have also written a program to do this, it isn't as neat as the mentioned
method but it doesn't leave any fluff hanging around (i.e. it doesn't require
setting an equation).  You'll have to bear with me since I haven't downloaded
it yet, this means that the program at the end has been typed by myself and
might contain errors.  (I think that what I have typed is actually correct).


My program is a combination of machine code and RPL and works reasonably
quickly.

LPLOT Checksum = # F2FCh, size = 93.5 (when RCLed to the stack)
<<
  SCATRPLOT
  # 2C9FEh SYSEVAL GETC
  # 2C9EAh SYSEVAL GETC
  R->C ARRY-> LIST-> - 1 SWAP
    START
      OVER LINE
    NEXT
  DROP {} PVIEW
>>


This routine makes use of the following routine that extracts a column from
a matrix.  It works quite quickly too (has anybody looked at the column extract
routine from the HP28 statistics application book?  It does a transpose and
then repeated Sigma-'s to extract the row of intertest!  This is much neater
and faster.  Don't run this routine by itself since it does NOT include
aduquate error checking.

GETC Checksum = # 5CB6, size = 88 (when RCLed to the stack)
"D9D20881309A5309FF306B65044230DEE324B2A22443033F06CCD20470008F14
6608FB9760147134169169146D7CF164146D5F118A136F0CA17414713517E179
1301567C0155717FCF5DE8F2D760174E7142164808CB21306BC5"

I just re-typed the above string into my hp and it was the same as the
original, so I would expect it to be correct.


To run the program just press the LPLOT soft key and your statistics
data matrix (sigmaDAT) will be plotted (first the points and the the lines
joining them up).


I should note that this program works fine on my 48 (revision E roms), it
may not work on earlier versions.  If you have any problems and you have
revision E roms, I'd be willing to help fix them.  If you have problems
and you have earlier revision roms, you can still send me a message but I
may not be able to help.

As usual, this program is copyright myself, 1991 all rights reserved but
as usual, any non-profit usage of this program is ok by me (if you want
to include it in your commercial software or publish it in a book/journal
then you require my permission first --- it is usually given).


Enjoy...

							Pauli
seeya

Paul Dale               | Internet/CSnet:            grue@batserver.cs.uq.oz.au
Dept of Computer Science| Bitnet:       grue%batserver.cs.uq.oz.au@uunet.uu.net
Uni of Qld              | JANET:           grue%batserver.cs.uq.oz.au@uk.ac.ukc
Australia, 4072         | EAN:                          grue@batserver.cs.uq.oz
                        | UUCP:           uunet!munnari!batserver.cs.uq.oz!grue
f4e6g4Qh4++             | JUNET:                     grue@batserver.cs.uq.oz.au
--

grue@batserver.cs.uq.oz.au (Frobozz) (02/19/91)

In <7338@uqcspe.cs.uq.oz.au> grue@batserver.cs.uq.oz.au (Frobozz) writes:


>GETC Checksum = # 5CB6, size = 88 (when RCLed to the stack)
>"D9D20881309A5309FF306B65044230DEE324B2A22443033F06CCD20470008F14
>6608FB9760147134169169146D7CF164146D5F118A136F0CA17414713517E179
>1301567C0155717FCF5DE8F2D760174E7142164808CB21306BC5"


oops, fogot to mention that you have to run this string through ASC->
before anything can be done.


							Pauli
seeya

Paul Dale               | Internet/CSnet:            grue@batserver.cs.uq.oz.au
Dept of Computer Science| Bitnet:       grue%batserver.cs.uq.oz.au@uunet.uu.net
Uni of Qld              | JANET:           grue%batserver.cs.uq.oz.au@uk.ac.ukc
Australia, 4072         | EAN:                          grue@batserver.cs.uq.oz
                        | UUCP:           uunet!munnari!batserver.cs.uq.oz!grue
f4e6g4Qh4++             | JUNET:                     grue@batserver.cs.uq.oz.au
--

rrd@hpfcso.FC.HP.COM (Ray Depew) (02/22/91)

Jurjen writes:

>There was a discussion about making a SCATTER plot with connected lines.
>Here is a simple way to do this without programming whatsoever.
[description of method]
>Is this simple, or what?

Hmm.  Why didn't I think of that?

-- Ray