How do you save a high resolution image of a trajectory to disk?
57 views
Skip to first unread message
Ian Bowns
unread,
Aug 11, 2018, 10:08:53 AM8/11/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simmer-devel
Hi.
It seems that using printing devices such as png("file.png") doesn't print out a plot of a trajectory. Saving the plot from the Viewer pane results in a low-res image being saved.
So, how can I save a high resolution image of a trajectory plot?
Thanks in anticipation,
Ian
Iñaki Úcar
unread,
Aug 11, 2018, 2:27:29 PM8/11/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simmer-devel
The png() function has a "res" argument (resolution, in ppi), which by
default is 72 ppi (too low). Try to increase it to 150 or 300 ppi.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simmer-devel
El sáb., 11 ago. 2018 a las 22:09, Ian Bowns (<ianb...@gmail.com>) escribió:
>
> I don't get a file when I use png() is blank file on the plot(.traj). Other plots are fine.
If you manage to save the SVG (I think I used DiagrammeRsvg or rsvg at
some point), then you can convert it to PNG with any resolution you
may need.
Iñaki
ianb...@gmail.com
unread,
Aug 11, 2018, 4:51:16 PM8/11/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simmer...@googlegroups.com
Thanks.
I'll take a look.
It is particularly important for me to get a reasonable resolution representation of the trajectory, as it is a care pathway for patients. A grainy image is no use when explaining this to the clinical team.
P.S. I'm still having problems getting a realistic simulation of a pathway when events may take a while (several hours), and teams include part-time staff. Will do a separate post on this.