I've imported ggplot into python and am running the following script with the hopes that ggsave() will actually save my plot somewhere, however it does not seem to actually be writing anything to a .png file for use later. The plot is returned when I return it as p in my interpreter, but I'm having to manually save it.
import ggplot
#d as some pandas dataframe
k = [2,3,4,5]
for i in k:
p = ggplot(d, aes(x='x', y='y', color='cluster'+str(i))) + geom_point(size=75) + ggtitle("Cluster Result: "+str(i))
file_name = "Clusters_"+str(i)+'.png'
#this is not saving to any directory
ggsave(p,file=file_name)
This is the output in the interpreter... but no file saved to any directory.
Saving 11.0 x 8.0 in image.
Saving 11.0 x 8.0 in image.
Saving 11.0 x 8.0 in image.
Saving 11.0 x 8.0 in image.
Saving 11.0 x 8.0 in image.
Saving 11.0 x 8.0 in image.