Install gnuplot to show plot in Octave (in Windows)
Step 1:
Download link: https://sourceforge.net/projects/gnuplot/
Step 2:
Open octaverc file present in the directory: C:\Octave\Octave-4.4.0\share\octave\site\m\startup in Notepad.
Step 3:
Add following lines to the end of the file:
gnuplot_binary 'C:\Program Files (x86)\gnuplot\bin\gnuplot.exe' (may be found in C:\Program Files\gnuplot\bin\gnuplot.exe)
graphics_toolkit('gnuplot')
Step 4:
Save the file. Close Octave if open.
Remember: The name plot.m is used (built-in function file) and must not be used!