Closed monroews closed 6 years ago
@monroews when saving a fig if you just give the name you'd like for the figure you can then use the same relative path in displaying the graph in Markdown because it will simply save the image in the same folder as your Markdown file. Below you can see an example that worked to add the graph as an image to my markdown file.
In terms of adding this to the tutorial, I'm not sure what the best place for it would be so I'll leave it to @kevinjuan25
@monroews @fletchapin I've added a section about plotting specifics in the static tutorial wikis, which includes saving the plot as an image. For the interactive tutorial, I've added a single line that asks students to save the plot image to their images folder in their repository.
Could you create an example where you create a graph, save the graph to the images folder, and then display that graph using the file path.
This process is confusing in part because forward slashes and back slashes are confused within Atom. Iif you "Copy Full Path" in the project tab in Atom it gives "C:\Users\mw24.CORNELL\Documents\GitHub\CEE4530\images\alphagraph.png", but the required format for saving the file is plt.savefig('C:/Users/mw24.CORNELL/Documents/GitHub/CEE4530/images/alphagraph.png')
It appears that when saving a figure it is necessary to use the absolute path, but when displaying the graph it is possible to use the relative path.
`
Here is the graph `