Python on Windows
Option 1: Google Colaboratory
This is by far the preferred option. Go to google colaboratory to create an interactive python Jupyter notebook.
Option 2: WinPython and Spyder
If you need to run python locally on Windows, you can use an application called Spyder. Download WinPython and install on your PC. It may take a few minutes to download and install, because it is bundled with several Python packages
When you have installed WinPython, run the application called Spyder. This should bring up a window that looks like the following:
The panel on the right is your python script (similar to the program window in Matlab). Press the green arrow button to run the script. The output will appear in the panel on the lower right.
Python plotting example: sin(x)
Use the following code to plot a simple trigonometric function using WinPython:
When the code executes you should see the plot appear in the output window. If you would like to save your figure to a particular location, you can change the "show" line to the following:
(The format of the output file will be automatically determined by the extension. If you call the file "myfile.pdf" it will export in pdf format.)
Python plotting example: singularity brackets
The following script illustrates one way to plot functions using singularity brackets by defining a function called "bracket".