FAQ: Difference between revisions

426 bytes added ,  27 July 2017
→‎Graphics: backends and toolkits: Overhaul section add answer how to change the current toolkit.
(→‎GUI: Overhaul section and some historical research. If I am wrong, please correct me.)
(→‎Graphics: backends and toolkits: Overhaul section add answer how to change the current toolkit.)
Line 1,004: Line 1,004:
==What are the supported graphics backends?==
==What are the supported graphics backends?==


The current default is OpenGL, through the "qt" graphics toolkit.  The "ftlk" toolkit also relies on OpenGL.
* [https://www.opengl.org/ OpenGL] via the graphics toolkits '''[https://www.qt.io/ qt]''' (current default) and '''[http://www.fltk.org/ fltk]'''
* [http://www.gnuplot.info/ gnuplot] via the '''gnuplot''' graphics toolkit


Alternatively, Gnuplot can be used as a graphics backend by selecting the "gnuplot" graphics toolkit.
==How do I change my graphics toolkit?==


==Why did you replace Gnuplot with an OpenGL backend?==
There are three commands to deal with graphics toolkits:


The development of Octave is committed to being both compatible with Matlab and adding additional features. Toward those ends, the development community has chosen to introduce a native OpenGL backend that supports Matlab handle graphics and its uicontrols. Starting with the 3.8 release, Octave uses OpenGL graphics by default (with FLTK widgets in Octave 3.8 and Qt widgets in Octave 4.0 and later).
{| class="wikitable"
| <code>available_graphics_toolkits</code>
| lists all available graphics toolkits
|-
| <code>graphics_toolkit</code>
| displays the currently used graphics toolkit
|-
| <code>graphics_toolkit ("qt/fltk/gnuplot")</code>
| sets the graphics toolkit to either of [https://www.qt.io/ qt], [http://www.fltk.org/ fltk], or [http://www.gnuplot.info/ gnuplot], if available
|}
 
==Why did you replace gnuplot with an OpenGL backend?==
 
The development of Octave is committed to being both compatible with Matlab and adding additional features. Toward those ends, the developers decided to introduce a native OpenGL backend that supports Matlab handle graphics and its uicontrols. Starting with the 3.8 release, Octave uses OpenGL graphics by default (with [http://www.fltk.org/ FLTK widgets] in Octave 3.8 and [https://www.qt.io/ Qt widgets] in Octave 4.0 and later).


==Are there any plans to remove the gnuplot backend?==
==Are there any plans to remove the gnuplot backend?==


There are no plans to remove the gnuplot backend. Even though the default graphics toolkit is now "qt", which uses OpenGL graphics with Qt widgets, the gnuplot backend will still be available as long as our users find it useful.
'''No.''' There are no plans to remove the gnuplot backend. It will be available as long as our users find it useful.


==How can I implement a new graphics backend/toolkit?==
==How can I implement a new graphics backend/toolkit?==


This is one of those times where the best documentation is to read the existing code. We have three different toolkits in Octave now, so there are some examples to draw from.
This is one of those times where the best documentation is to read the existing code. We have three different toolkits in Octave now, so there are some examples to draw from.