Monthly Archives: June 2011

Abstracted Writing: Focusing on the Abstract

During the paper writing process, it is typically recommended to write the abstract last.  Recently I somehow ended up writing the abstract first and the rewriting it as the paper progressed.  This approach is beneficial since it forces you to … Continue reading

Posted in Uncategorized | Leave a comment

matplotlib savefig

gcf().savefig( “X-dense.pdf”, format=’pdf’) Keywords 8:21pm Searched for TypeError: print_figure() takes at least 2 arguments (1 given) pdf  8:21pm Searched for TypeError: print_figure() takes at least 2 arguments (1 given)   8:19pm Searched for ValueError: filename must be a path or a … Continue reading

Posted in Uncategorized | Leave a comment

matplotlib / R: sparse matrix plot

            R library(reshape2) library(ggplot2) set.seed(7) m <- matrix(0, 100, 100) n <- 1000 m[sample(length(m), size = n)] <- rep(-1:1, length=n) m ggplot(melt(m), aes(Var1,Var2, fill=value)) + geom_raster() + scale_fill_gradient2(low=’red’, high=’black’, mid=’white’) + theme_bw() + xlab(“x1”) + … Continue reading

Posted in Uncategorized | Leave a comment