I'm using Debian Jessie and GNU Octave, version 3.8.1
If I run octave with the --no-line-editing switch on, to avoid using readline
$ octave --no-line-editing
and execute this command,
>> t=0:1; plot(t);
then the plot window hangs. Without the line editing switch it's ok.
Does anyone know how to work around this, or how to report the bug?
This has already been reported as Debian Bug #675509 and Octave bug #37795 so you don't to report this bug again.
You can use gnuplot: just execute graphics_toolkit gnuplot before any plotting or add it to your .octaverc to get it eexecuted everytime you start octave.
Related
I have TeXmacs and Octave installed, both working properly otherwise. I have also added the path to octave executable (i.e. C:\Octave\Octave-5.1.0.0\mingw64\bin) to the Windows environment variables and octave runs in cmd/PowerShell terminals and Jupyter with no hassle. However, when running Octave inside TeXmacs through Toolbar > insert > session > octave it gets stuck on Busy..., the same reaction for any other commands as well:
Octave gets stuk on Busy... inside TeXmacs.
This is my environment:
TeXmacs 1.99.9
Octave 5.1.0 (installed through Chocolatey)
Windows 10 version 1809
I would appreciate if you could help me know what is the problem and how I can solve it.
P.S. I have reported this issue in the TeXmacs repo.
#Foad. I wrote an updated Octave plugin for Texmacs. I tried it on Windows, OSX and Linux, works on the systems I have access to. If you are interested to test it, you can download the zipped archive from here https://lists.gnu.org/archive/html/texmacs-dev/2019-12/msg00005.html.
To install it, unzip the archive and copy the octaveX directory in the application plugins folder, alongside all the plugins that come with the standard Texmacs installation. Won’t work if installed in ~/.Texmacs/plugins. If everything goes fine, you should find a new Insert/Session/OctaveX menu (note: I changed the session name). If not, try to refresh the plugin system with the menu Tools/Update/Plugins. If you try it, please let me know, especially if you find troubles. In case I will do my best to fix them.
A fundamental prerequisite is a working octave-cli command in a operating system shell. Should be standard on Linux, may require some additional setup on Windows (environmental variables) or OSX (.bash_profile). You can find some help and more details under the menu Help/Plug-ins/OctaveX.
Concerning the error you found, as far I understand there are some issues with the standard distributed plugin: first, a .octaverc file is missing, so several variables are not initialized, in addition the Windows version calls a not existent file. Moreover the plotting functions are quite old and are not compatibile with Octave newer than version 2 (or maybe 3, anyway a quite old version).
You could try to run the command in
%TEXMACS_PATH%/plugins/octave/bin/tm_octave.bat
from the terminal to see what happens. There is a problem with this plugin and it does not work also on Mac but I do not know enough Octave to fix it. Somehow it does not manage to find the files which are in
%TEXMACS_PATH%/plugins/octave/octave
Please try to modify tm-start.m to look like
d=getenv("TEXMACS_PATH");
if (length(d) > 0)
addpath("tm:polynomial:plot")
tmrepl
endif
In windows, octave should be run using the scripts octave.bat (in the mingw64\bin directory of the octave install) or octave.vbs (in the install directory) for the GUI
You should not run octave.exe directly.
I have a problem:
installed octave and do not know why, every time I type octave in the terminal opens the GUI interface (gui --force-octave) Octave and not the terminal octave as is right. how can I fix this?
If you have Octave 4.0, the GUI is the default:
** A graphical user interface is now the default when running Octave interactively. The start-up option --no-gui will run the familiar command line interface...
https://www.gnu.org/software/octave/NEWS-4.0.html
You can add this alias octave='octave --no-gui' to your ~/.bashrc file and every time you type octave, it opens in your terminal.
Good luck
After upgrading to Octave 4.0.0 from 3.8.2 using brew upgrade on a Mac OS X, I'm now getting this error when trying to use wavread:
error: sndfile not found on your system and thus audioinfo is not functional
error: called from
wavread at line 91 column 8
I tried re-installing libsndfile, port audio, and even octave but still could not resolve this.
It's because the homebrew formula for Octave doesn't list portaudio and libsndfile as dependencies. Homebrew appears to run a special version of pkg-config during installation, which only has access to libraries that are explicitly listed as dependencies in the formula.
I managed to get it to work by doing
brew edit octave
then adding these lines somewhere near the top of the formula:
depends_on "libsndfile"
depends_on "portaudio"
and these lines a bit lower down, where the args string to the configure command is being constructed
args << "--with-portaudio"
args << "--with-sndfile"
Then install octave and ensure that it builds from source. Something like
brew install octave --build-from-source --with-gui
Ideally portaudio and sndfile would be enabled with a switch like --with-audio or something. If I get a chance I'll submit a pull request to homebrew with the necessary changes.
Edit: 12th October 2015
This is now the subject of a pull request in the homebrew-science tap
https://github.com/Homebrew/homebrew-science/pull/2875
I used homebrew to install octave, rebooted machine. I can run plots successfully and see the graphs render normally. When I go to print them, the document saves with the legend and axes, but the body of the graph is solid black. I have tried this with png, pdf and jpg formats - all the same.
I do get a message that fig2dev binary is not available. I have searched for what I am missing but seem to have everything installed from homebrew that octave needs.
Any help would be appreciated.
It seems there is a problem with gnuplot 5 and Macs (see the bug report). I was able to solve this by doing as suggested in the link and downgrading to gunplot version 4.6.6
brew switch gnuplot 4.6.6
This answer has lots of good info on installing specific versions of software in homebrew.
I'm writing a script in the octave programming language that calls plot. When I open the octave console in interactive mode and paste the script in, gnuplot appears correctly. However, when I run the script from a command line via
octave ./myscript.m
all printf work, but no gnuplot window appears. This happens with as simple a script as
plot([0 1; 2 3])
Any ideas why this might be happening?
Thanks.
Try running the script with the --persist flag. This flag tells Octave to "go to interactive mode after
--eval or reading from a file named on the command line."
> octave --persist ./myscript.m