SofieVG / FlowSOM

Using self-organizing maps for visualization and interpretation of cytometry data
61 stars 26 forks source link

Save PlotStars command #25

Closed fbenedett closed 5 years ago

fbenedett commented 5 years ago

Hello,

I am trying to save a "PlotStars" on a png file but to do that I need the command more than the GUI way. Is there a way to do that?

SofieVG commented 5 years ago

Hi Fabrizio,

You can make use of the png function of R (see https://www.rdocumentation.org/packages/grDevices/versions/3.4.1/topics/png) The code would look something like png("my_file_name.png", width = 2000, height = 1000) PlotStars(fsom, ...) dev.off()

In general, I might recommend saving the tree to pdf, because this way you keep high quality to zoom in (or edit colors / position of the legend etc in other editors like inkscape). This works the same way, only note that the width and height should then be given in inches instead of pixels (so maybe 12 by 8 instead of thousands).

I hope this helps! Kind regards, Sofie

On Thu, 23 May 2019 at 15:41, Fabrizio Benedetti notifications@github.com wrote:

Hello,

I am trying to save a "PlotStars" on a png file but to do that I need the command more than the GUI way. Is there a way to do that?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SofieVG/FlowSOM/issues/25?email_source=notifications&email_token=AAOS723ACA4YU5BQCOXWJ3DPW2NJTA5CNFSM4HPEUA7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GVO5AKQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOS727MH4X27GE6QUMS4RDPW2NJTANCNFSM4HPEUA7A .

fbenedett commented 5 years ago

Thank you for your reply. I tried what you suggested but it doesn't work... I am currently using Rmarkdown in my Rstudio and when I try that command there is an error. Please, see the image in attachment. In the image is also possible to see the "PlotStars" without the png, and in this case it shows what it should. Screenshot from 2019-05-23 15-56-24 Maybe I should bang my head in the Rmarkdown git hub instead of bothering you here.

SofieVG commented 5 years ago

Are you running the whole codeblock at once? If you do it line by line, the notebook itself will call something like dev.off() after every line, so then indeed it won't work. So you should either click on the green arrow or select the three lines at once and press ctrl enter.

On Thu, 23 May 2019 at 16:09, Fabrizio Benedetti notifications@github.com wrote:

Closed #25 https://github.com/SofieVG/FlowSOM/issues/25.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SofieVG/FlowSOM/issues/25?email_source=notifications&email_token=AAOS7237QSW7CUN37MPUDQ3PW2QSHA5CNFSM4HPEUA7KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGORTJHV3I#event-2362604269, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOS72Y6SFWUWRWLE3263MLPW2QSHANCNFSM4HPEUA7A .

fbenedett commented 5 years ago

Thank you, with the arrow it worked :) And sorry for bothering for a rmarkdown problem.