Hey, I am still working on my heat map (for those who are read my previous post about row.names)… Now, I would like to save my heat map.2 in .png or .tiff in order being able to work on the picture in photoshop, but it doesn't work. I'am using (as I have found on some forum)> png("heatmap.2.png) # and it just doesn't work. when I try doing it with:: >jpeg("heatmap.2.jpeg) # it works once every 10 times, but it's a 22kb file. completely use less !!!I really need to have high quality image, as I will have to work on photoshop and also I will have to cut and zoom in just some lines of my heatmap. #here is the code I use for my heatmap.2 :>heatmap.2(a_matrix, Rowv=NA, Colv =NA, col=greenred(60), scale="column", margins=c(7,10), trace="none", density.info=c("none"))Does someone know what I have to do in order to get my heatmap.2.png ??? Do I need some other package (I only use gplots, to allow the heatpmap.2) THANKS for your help Fred [[alternative HTML version deleted]]
Normally the workflow is: png("heatmap.png") # don't forget the second quote, as you did below my.plot.code # whatever you need to draw the heatmap dev.off() # people often forget this step - did you? You'll probably want to adjust the size and resolution settings for png() to get the desired high-resolution output; see ?png for details. Sarah On Sun, Sep 9, 2012 at 10:04 AM, STADLER Frederic <frederic.stadler at unifr.ch> wrote:> Hey, I am still working on my heat map (for those who are read my previous post about row.names)? > Now, I would like to save my heat map.2 in .png or .tiff in order being able to work on the picture in photoshop, but it doesn't work. > I'am using (as I have found on some forum) >> png("heatmap.2.png) # and it just doesn't work. when I try doing it with:: >>jpeg("heatmap.2.jpeg) # it works once every 10 times, but it's a 22kb file. completely use less !!! > > I really need to have high quality image, as I will have to work on photoshop and also I will have to cut and zoom in just some lines of my heatmap. > > #here is the code I use for my heatmap.2 : >>heatmap.2(a_matrix, Rowv=NA, Colv =NA, col=greenred(60), scale="column", margins=c(7,10), trace="none", density.info=c("none")) > > Does someone know what I have to do in order to get my heatmap.2.png ??? Do I need some other package (I only use gplots, to allow the heatpmap.2) > > THANKS for your help > Fred >-- Sarah Goslee functionaldiversity.org
"It just doesn't work" could mean anything... and for those of us for whom it does work, that leaves a lot of possible differences between your case and ours. This is your cue to read the Posting Guide. Some issues I have encountered: If you are using Windows, and you have opened a graphics file in an editor, and you try to write a new version out with R, the editor will prevent this change in most cases. You have to remember to close the graphics file first. Also, you need to remember to close the file in R using dev.off() when you are done writing to it for similar reasons. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. STADLER Frederic <frederic.stadler at unifr.ch> wrote:>Hey, I am still working on my heat map (for those who are read my >previous post about row.names)? >Now, I would like to save my heat map.2 in .png or .tiff in order being >able to work on the picture in photoshop, but it doesn't work. >I'am using (as I have found on some forum) >> png("heatmap.2.png) # and it just doesn't work. when I try doing it >with:: >>jpeg("heatmap.2.jpeg) # it works once every 10 times, but it's a 22kb >file. completely use less !!! > >I really need to have high quality image, as I will have to work on >photoshop and also I will have to cut and zoom in just some lines of my >heatmap. > >#here is the code I use for my heatmap.2 : >>heatmap.2(a_matrix, Rowv=NA, Colv =NA, col=greenred(60), >scale="column", margins=c(7,10), trace="none", density.info=c("none")) > >Does someone know what I have to do in order to get my heatmap.2.png >??? Do I need some other package (I only use gplots, to allow the >heatpmap.2) > >THANKS for your help >Fred > > [[alternative HTML version deleted]] > > > >------------------------------------------------------------------------ > >______________________________________________ >R-help at r-project.org mailing list >stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.
On Sep 9, 2012, at 7:04 AM, STADLER Frederic wrote:> Hey, I am still working on my heat map (for those who are read my previous post about row.names)? > Now, I would like to save my heat map.2 in .png or .tiff in order being able to work on the picture in photoshop, but it doesn't work. > I'am using (as I have found on some forum) >> png("heatmap.2.png) # and it just doesn't work. when I try doing it with:: >> jpeg("heatmap.2.jpeg) # it works once every 10 times, but it's a 22kb file. completely use less !!!Neither of those should have _ever_ "worked", since they both are missing closing quotes. Furthermore, just emitting the command jpeg("filename.jpg") even with proper closing quotes will be completely useless, as you say, unless you follow the plot() command with dev.off(). ?Devices ?jpeg # and please DO the examples> > I really need to have high quality image, as I will have to work on photoshop and also I will have to cut and zoom in just some lines of my heatmap. > > #here is the code I use for my heatmap.2 : >> heatmap.2(a_matrix, Rowv=NA, Colv =NA, col=greenred(60), scale="column", margins=c(7,10), trace="none", density.info=c("none")) > > Does someone know what I have to do in order to get my heatmap.2.png ??? Do I need some other package (I only use gplots, to allow the heatpmap.2) >Pleaese include complete code. What you have provided so far should, as you say, be "completely useless!!!". David Winsemius, MD Alameda, CA, USA