I'm trying to use the command plot(x,y,'rx') in octave. When I use it, a figure window opens up but I don't see any plot. It's just a blank white space. However, if I simply use the command plot(x,y) a figure window opens with a plot. I figured it had something to do with Octave not using the gnuplot toolkit and that I should use the command graphics_toolkit('gnuplot') to make Octave use gnuplot. Here's where the problem arises.
First of all Octave says that "gnuplot toolkit is not available". I very well know that I have it. I have used it before (not with Octave). I even removed the gnuplot and installed it once again after Octave said the toolkit wasn't available.
Searching for some answers on google, I realized I should add the line graphics_toolkit('gnuplot') at the end of the octaverc file. I didn't know where to find the file. Now, there were many answers that said that the octaverc file is in ~/.octaverc. But there is no such file in the ~/ directory. A few other answers suggested that we must create the file in such a scenario. At this point I'm unaware as to how I must 'create' a .octaverc file. So I copied it from /snap/octave/30/share/octave/5.2.0/site/m/startup and pasted in ~/, right clicked it, edited as administrator, added the line at the end of the file and saved the modified .octaverc file. Octave still says that "gnuplot toolkit is not available".
(I tried editing the .octaverc file in /snap/octave/30/share/octave/5.2.0/site/m/startup but it turned out to be a read-only file. I couldn't modify it no matter what I tried. Even as a root user I couldn't modify the file)
What do I do?
gnuplot_binaryfrom octave? - Tasos Papastylianouavailable_graphics_toolkits()output - matzeriapt install octave? I'm guessing that snap isolates programs so its octave installatino won't be able to see the gnuplot program. - carandraug