Post Reply 
saving a graph on the hp prime
12-23-2016, 11:23 PM
Post: #1
saving a graph on the hp prime
I plotted a graph in the geometry app and I wish to save it to use at a later time. If I take a screen shot and save it to my Mac, I don't know if or how to bring it back to the calculator. Is the HP Prime capable of saving my work? Tech support has no idea how to do this. In fact they said I was the first to ask this question. I am new to HP Prime and would be shocked if my work will be lost. Thanks to anyone who can help.
Find all posts by this user
Quote this message in a reply
12-23-2016, 11:55 PM
Post: #2
RE: saving a graph on the hp prime
If all you need is to save it for later:

To save and restore a graphic screen within the HP Prime filesystem you can use the AFiles command.

An example of this is included in the SCR_GET and SCR_PUT procedures in my Accesibility: Fingerspelling demo program in the HP Prime library.

How you get that file to/from a Mac filesystem I don't know.

If you want to look at it on the Mac without using HP Prime emulator:
I believe you can also load/save as a jpeg/png but cannot confirm since I use Android and its not yet available on that.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
12-24-2016, 02:30 AM (This post was last modified: 12-24-2016 02:36 AM by Han.)
Post: #3
RE: saving a graph on the hp prime
You can use AFiles("name"):=<object>

There are several graphics buffers, and G0 is the "current screen" buffer. So as an example:

AFiles("currentscreen.png"):=G0;

This will save the current screen into a file named currentscreen.png. This file can be found using the connectivity kit within whatever app was current when executing the command above. (For example, if you were in the Function app, then look within the Function app folder in the connectivity kit.) The file will be stored within the "Files" subfolder. Simply double click it (in the conn. kit) to open and view the image.

You can also "load" a screenshot in a similar manner. Use:

G0:=AFiles("currentscreen.png");

to load the current screen with the image. You may additionally need:

FREEZE; WAIT(-1);

to actually see the image (to prevent screen refreshes until a key is pressed or until WAIT(-1) times out).

NOTE: This must be done in Home view (if typed manually) or via a non-CAS program.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
12-26-2016, 05:39 PM
Post: #4
RE: saving a graph on the hp prime
Very interesting Han!
I did not know these possibilities of Afiles.

May I ask you: has it a special advantage to create a png file, instead of a file without extention or e.g. jpg?

Some remarks.
When you do these things in Home view you will not get the image you want because in Home view G0 contains the History of Home view and not the Plot view of the Geometry app, which we are interested in.

So we can only assign G0, which contains the Plot view of the geometry app, to the file: currentscreen.png, inside a program.

This program would look like:
Code:

EXPORT savescreen()
BEGIN
   STARTAPP(“Geometry”); // starts the geometry app
   STARTVIEW(1,1);    //starts the Plot view of the geometry app
   Geometry.AFiles("currentscreen.png"):=G0;
END;

We can make the stored image visible with this program:
Code:

EXPORT showimage()
BEGIN
   G0:=Geometry.AFiles("currentscreen.png");
   FREEZE;
END;

But I think a better way to save the results is simply to make a copy of the Geometry app:
Press Apps.
Long press the Geometry app.
Press save, give it a name and you have a copy of it.

This has the advantage that you do not only have saved the graph but also the instructions and formulas which created it, so that you can easily modify it.
Find all posts by this user
Quote this message in a reply
01-02-2017, 05:56 AM
Post: #5
RE: saving a graph on the hp prime
Hello,

png are lossless compressed files. but are larger.
jpg do loose data, but are 'normally' smaller.

jpg is much better for pictures, png are more adapted to 'graphs'.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
01-02-2017, 05:33 PM
Post: #6
RE: saving a graph on the hp prime
Thank you Cyrille.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)