Octave – Grafici – XI – 75

btf4

Continuo da qui, copio qui.


Manipolare i grafici

Command: pan
Command: pan on
Command: pan off
Command: pan xon
Command: pan yon
Function File: pan (hfig, option)

Control the interactive panning mode of a figure in the GUI.
Given the option "on" or "off", set the interactive pan mode on or off.
With no arguments, toggle the current pan mode on or off.
Given the option "xon" or "yon", enable pan mode for the x or y axis only.
If the first argument hfig is a figure, then operate on the given figure rather than the current figure as returned by gcf.

Function File: rotate (h, dir, alpha)
Function File: rotate (..., origin)

Rotate the plot object h through alpha degrees around the line with direction dir and origin origin.
The default value of origin is the center of the axes object that is the parent of h.
If h is a vector of handles, they must all have the same parent axes object.
Graphics objects that may be rotated are lines, surfaces, patches, and images.

o384

da così

o385

a così

o386

Command: rotate3d
Command: rotate3d on
Command: rotate3d off
Function File: rotate3d (hfig, option)

Control the interactive 3-D rotation mode of a figure in the GUI.
Given the option "on" or "off", set the interactive rotate mode on or off.
With no arguments, toggle the current rotate mode on or off.
If the first argument hfig is a figure, then operate on the given figure rather than the current figure as returned by gcf.

Command: zoom
Command: zoom (factor)
Command: zoom on
Command: zoom off
Command: zoom xon
Command: zoom yon
Command: zoom out
Command: zoom reset
Command: zoom (hfig, option)

Zoom the current axes object or control the interactive zoom mode of a figure in the GUI.
Given a numeric argument greater than zero, zoom by the given factor. If the zoom factor is greater than one, zoom in on the plot. If the factor is less than one, zoom out. If the zoom factor is a two- or three-element vector, then the elements specify the zoom factors for the x, y, and z axes respectively.
Given the option "on" or "off", set the interactive zoom mode on or off.
With no arguments, toggle the current zoom mode on or off.
Given the option "xon" or "yon", enable zoom mode for the x or y-axis only.
Given the option "out", zoom to the initial zoom setting.
Given the option "reset", store the current zoom setting so that zoom out will return to this zoom level.
If the first argument hfig is a figure, then operate on the given figure rather than the current figure as returned by gcf.

Cose che si possono fare meglio (imho) interattivamente da menu.

Avanti, passo qui.

Manipolare le finestre
By default, Octave refreshes the plot window when a prompt is printed, or when waiting for input. The drawnow function is used to cause a plot window to be updated.

Built-in Function: drawnow ()
Built-in Function: drawnow ("expose")
Built-in Function: drawnow (term, file, mono, debug_file)

Update figure windows and their children.
The event queue is flushed and any callbacks generated are executed.
With the optional argument "expose", only graphic objects are updated and no other events or callbacks are processed.
The third calling form of drawnow is for debugging and is undocumented.

Only figures that are modified will be updated. The refresh function can also be used to cause an update of the current figure, even if it is not modified.

Function File: refresh ()
Function File: refresh (h)

Refresh a figure, forcing it to be redrawn.
When called without an argument the current figure is redrawn. Otherwise, the figure with graphic handle h is redrawn.

Normally, high-level plot functions like plot or mesh call newplot to initialize the state of the current axes so that the next plot is drawn in a blank window with default property settings. To have two plots superimposed over one another, use the hold function. For example,

hold on;
x = -10:0.1:10;
plot (x, sin (x));
plot (x, cos (x));
hold off;

displays sine and cosine waves on the same axes. If the hold state is off, consecutive plotting commands like this will only display the last plot.

o387

Function File: newplot ()
Function File: newplot (hfig)
Function File: newplot (hax)
Function File: hax = newplot (...)

Prepare graphics engine to produce a new plot.
This function is called at the beginning of all high-level plotting functions. It is not normally required in user programs. newplot queries the "NextPlot" field of the current figure and axis to determine what to do.
Tabella che non riporto, mi sembra piuttosto specifica, chissà se…

Command: hold
Command: hold on
Command: hold off
Command: hold all
Function File: hold (hax, ...)

Toggle or set the "hold" state of the plotting engine which determines whether new graphic objects are added to the plot or replace the existing objects.
hold on retain plot data and settings so that subsequent plot commands are displayed on a single graph.
hold all retain plot line color, line style, data, and settings so that subsequent plot commands are displayed on a single graph with the next line color and style.
hold off restore default graphics settings which clear the graph and reset axis properties before each new plot command. (default).
hold toggle the current hold state.
When given the additional argument hax, the hold state is modified for this axis rather than the current axes returned by gca.
To query the current hold state use the ishold function.

Command: ishold
Function File: ishold (hax)
Function File: ishold (hfig)

Return true if the next plot will be added to the current plot, or false if the plot device will be cleared before drawing the next plot.
If the first argument is an axes handle hax or figure handle hfig then operate on this plot rather than the current one.

To clear the current figure, call the clf function. To clear the current axis, call the cla function. To bring the current figure to the top of the window stack, call the shg function. To delete a graphics object, call delete on its index. To close the figure window, call the close function.

Command: clf
Command: clf reset
Function File: clf (hfig)
Function File: clf (hfig, "reset")
Function File: h = clf (...)

Clear the current figure window.
clf operates by deleting child graphics objects with visible handles (HandleVisibility = "on").
If the optional argument "reset" is specified, delete all child objects including those with hidden handles and reset all figure properties to their defaults. However, the following properties are not reset: Position, Units, PaperPosition, PaperUnits.
If the first argument hfig is a figure handle, then operate on this figure rather than the current figure returned by gcf.
The optional return value h is the graphics handle of the figure window that was cleared.

Command: cla
Command: cla reset
Function File: cla (hax)
Function File: cla (hax, "reset")

Clear the current axes.
cla operates by deleting child graphic objects with visible handles (HandleVisibility = "on").
If the optional argument "reset" is specified, delete all child objects including those with hidden handles and reset all axis properties to their defaults. However, the following properties are not reset: Position, Units.
If the first argument hax is an axes handle, then operate on this axis rather than the current axes returned by gca.

Command: shg
Show the graph window.
Currently, this is the same as executing drawnow.

Function File: delete (file)
Function File: delete (file1, file2, ...)
Function File: delete (handle)

Delete the named file or graphics handle.
file may contain globbing patterns such as ‘*’. Multiple files to be deleted may be specified in the same function call.
handle may be a scalar or vector of graphic handles to delete.
Programming Note: Deleting graphics objects is the proper way to remove features from a plot without clearing the entire figure.

Command: close
Command: close (h)
Command: close h
Command: close all
Command: close all hidden
Command: close all force

Close figure window(s).
When called with no arguments, close the current figure. This is equivalent to close (gcf). If the input h is a graphic handle, or vector of graphics handles, then close each figure in h.
If the argument "all" is given then all figures with visible handles (HandleVisibility = "on") are closed.
If the argument "all hidden" is given then all figures, including hidden ones, are closed.
If the argument "all force" is given then all figures are closed even when "closerequestfcn" has been altered to prevent closing the window.
Implementation Note: close operates by calling the function specified by the "closerequestfcn" property for each figure. By default, the function closereq is used. It is possible that the function invoked will delay or abort removing the figure. To remove a figure without executing any callback functions use delete. When writing a callback function to close a window do not use close to avoid recursion.

Function File: closereq ()
Close the current figure and delete all graphics objects associated with it.
By default, the "closerequestfcn" property of a new plot figure points to this function.

Chissà se si usano queste funzioni? 😳
:mrgreen:

Posta un commento o usa questo indirizzo per il trackback.

Trackback

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

%d blogger hanno fatto clic su Mi Piace per questo: