Dear SAS users,
I am relatively new to EG and I cannot figure out how to download a plot to my local machine form EG server.
Here is the code I use to produce a plot, not sure it is the best one. The plot is saved under the "figs" folder on the server, but then I see no way to download it on Windows except sending it to Word (but I want to save it as a .png file on a Windows machine).
ods html path='/sasdata/user/mes515/sasuser.v94/NORSTENT/figs'(url=NONE) image_dpi=250; ods graphics on /attrpriority=none imagename="image01" imagefmt=jpeg noborder; proc sgplot data=sashelp.class; vbar sex; run; ods graphics off; ods html close;
I would appreciate any help!
Thank you,
Hello @marina_unn
Going by the paths you have posted in the forum, it appears that SAS is installed on a Linux server and users are using SAS EG as their client. Users home directory is on the Linux server and not accessible /mounted on the Windows client (Laptop/Desktop).
If this is indeed the case, one can use SCP/SFTP clients such as Filezilla to download files from the home directory to the local machine (laptop/desktop).
For files of smaller size one can always write SAS code to email the file to themselves.
In your situation, if I have issues, I would not hesitate to seek help from peers/seniors /SAS Admin/Local IT support whichever is feasible.
Use the Copy Files task.
If /sasdata/user/mes515 is your home directory, it is found in the navigation pane under servername (e.g. SASApp) - Files.
Hi @Kurt_Bremser ,
I can move the plot to /sasdata/user/mes515 directory, but I still cannot download or open it with Windows. When I try to open it, there is only a text file, and there is no option "download" of "save image as". I mean I still cannot get the plot on my local machine, reagardless in which directory of SAS EG it is.
Is there any other solution I can try?
Marina
So you download image01.jpg to your PC?
What does a right-click reveal about its size on the server and after the download?
Hey @Kurt_Bremser ,
No, I cannot download an image from EG. If i right-click on in the image in my Home/sasuser.v94/NORSTENT/figs folder, I can choose from "Open, Delete, Link to, Rename, Copy or Properties". No option to download it. If I click on "Open", I get a text file opening on Windows (in the Notepad), so Windows does not see this file as an image at all.
As you suggest, I can check the size of the file under "Properties", it is 13.1 KB.
Do you think something is wrong in the way a plot is saved? Here is the code I tried, using a sashelp dataset:
title "Example figure"; ods listing gpath="/sasdata/user/mes515/sasuser.v94/NORSTENT/figs"; goptions reset=all gsfname=grafout gsfmode=replace device=png; ods graphics on /attrpriority=none imagename="heart_data" imagefmt=png noborder; proc sgpanel data=sashelp.heart; panelby weight_status / onepanel layout=columnlattice norvarname; vbar chol_status / group=sex groupdisplay=cluster; rowaxis grid; run;
I would appreciate any more advice, I still cannot figure out how to save a plot as a file on Windows.
Thank you!
Hello @marina_unn
Going by the paths you have posted in the forum, it appears that SAS is installed on a Linux server and users are using SAS EG as their client. Users home directory is on the Linux server and not accessible /mounted on the Windows client (Laptop/Desktop).
If this is indeed the case, one can use SCP/SFTP clients such as Filezilla to download files from the home directory to the local machine (laptop/desktop).
For files of smaller size one can always write SAS code to email the file to themselves.
In your situation, if I have issues, I would not hesitate to seek help from peers/seniors /SAS Admin/Local IT support whichever is feasible.
Hey @Sajid01 ,
Thanks for the explanation! Yes, I agree that in my case I should reach to SAS support at my organisation.
But I will also check how to send an email with the plot form within SAS EG.
Marina
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.