Plot output of plus42 is streched.

118 views
Skip to first unread message

S. u. P. L

unread,
Dec 3, 2023, 9:53:33 AM12/3/23
to Free42 & Plus42
If I run the 'plot' program from the HP-42s Owners' Manuel (page 158ff), the plot output on the free42 calculator looks as in the manual (p. 165). However the output from the plus42 calculator looks stretched.
I used the latest program version (free42 v3.1.1 f. Linux and iPhone and plus42 v1.1.1 f. Linux and iPhone). The output on DM42 looks correct too.

Is this a configuration setting in plus42 or a bug?

plus42_plot_output.jpg
hp42s-om-en-plot.f42
hp42s-om-en-plot.p42
fre42_plot_output_linux.png
plus42_plot_output_linux.png
free42_plot_output.jpg

Thomas Okken

unread,
Dec 3, 2023, 8:15:35 PM12/3/23
to Free42 & Plus42
The PLOT program assumes that the display is 131x16 pixels, but the display of Plus42 is 131x64 by default. The result is that the lower 3/4 of the screen are not used, which results in the chopped-up look in your print-out.

Note that the axis does get drawn across the full height of the screen. This is done by using PIXEL with a negative value for Y; this draws a vertical line spanning the full height of the screen at the given X coordinate, and that works regardless of the screen size.

(The DM42 is a separate story. If I remember correctly, it handles PIXEL and PRLCD by pretending that the screen is only 131x16, even though the physical screen is of course much larger. But it's been a long time since I've used one, so I'm not completely sure.)

It is possible to make the PLOT and DPLOT programs work with larger screen sizes, using a few simple code changes. Basically, you need to find all places where the screen width and height are hard-coded, and replace those with the WIDTH and HEIGHT functions, which return the current screen width and height in pixels.

The PLOT and DPLOT programs on my web site don't have those changes. I should probably fix that. I guess I didn't do it sooner because I figured Plus42 users would prefer the built-in PLOT, but the programs from the manuals can still be useful.

Thomas Okken

unread,
Dec 3, 2023, 8:23:25 PM12/3/23
to Free42 & Plus42
Also note that you can use the programs from the manuals, without any modifications, if you set the screen size to 2 rows and 22 columns (the smallest supported size) before running them. I'm not recommending that, because using a bigger screen is half the fun of using Plus42. But you could.

S. u. P. L

unread,
Dec 6, 2023, 8:38:16 AM12/6/23
to Free42 & Plus42
Hi

thank you for clarification. I wasn't aware, that the screen size corresponds with the plot.
HP-42s(DM42, fre42,...) is a reasonably upgrade from the HP-15c. I'm just trying to get used to it.

I tried your "suggestion" with a 2x22 screen size. Program produces an output as expected. Of course, no one want's to decrease the screen to tow rows.
I also changed the plot program. The output looks clean without the chopped-up look.

replaced line 34: 130 => with:
    WIDTH
    1
    -


replaced line 47: 1.016 => with:
HEIGHT
1E-3
x
1
+



replaced line 54: 16 => with:
    HEIGHT

However, the distances between the (XINC) marks are still further apart as from the free42. Not sure, what further changes to the program are needed, but this is no big deal.

regards
plot_plus42_out2.png
PLOT2_plus_en.raw
Message has been deleted

Thomas Okken

unread,
Dec 6, 2023, 5:59:42 PM12/6/23
to Free42 & Plus42

You could get the original look of the print-out by making the program switch to the small screen size before it starts plotting, and switch back when it's done, by inserting

GETDS
RCOMPLX
LSTO "DS"
2
22
SETDS

at the beginning, and

RCL "DS"
RCOMPLX
SETDS

at the end.

S. u. P. L

unread,
Dec 7, 2023, 4:14:09 AM12/7/23
to Free42 & Plus42
This is a smart change.
The only issue, it was hard to find "LSTO" but I could not find "RCOMPLX(Re:Im)" ;-)

Thomas Okken

unread,
Dec 7, 2023, 6:07:14 AM12/7/23
to Free42 & Plus42
LSTO is in CATALOG -> PRGM
RCOMPLX is in CATALOG -> MISC

S. u. P. L

unread,
Dec 7, 2023, 9:07:10 AM12/7/23
to Free42 & Plus42
great, thanks.
Reply all
Reply to author
Forward
0 new messages