GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Typedefs | Functions | Variables
graphics.cc File Reference
#include <cctype>
#include <cfloat>
#include <cstdlib>
#include <algorithm>
#include <list>
#include <map>
#include <set>
#include <string>
#include <sstream>
#include "cmd-edit.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-locbuf.h"
#include "oct-time.h"
#include "singleton-cleanup.h"
#include "builtin-defun-decls.h"
#include "defun.h"
#include "display.h"
#include "error.h"
#include "graphics.h"
#include "input.h"
#include "interpreter.h"
#include "ov.h"
#include "ovl.h"
#include "oct-map.h"
#include "ov-fcn-handle.h"
#include "pager.h"
#include "parse.h"
#include "text-renderer.h"
#include "unwind-prot.h"
#include "utils.h"
#include "octave-default-image.h"
#include "graphics-props.cc"
Include dependency graph for graphics.cc:

Go to the source code of this file.

Classes

class  callback_event
 
class  function_event
 
class  set_event
 

Macros

#define CHECK_ARRAY_EQUAL(T, F, A)
 
#define CONVERT_CDATA_1(ARRAY_T, VAL_FN, IS_REAL)
 
#define FIX_LIMITS
 
#define GO_BODY(TYPE)
 

Typedefs

using args.length ) = =0) print_usage(
 

Functions

endfunction addlistener (gcf,"position",@my_listener,"my string") nd group nd example eealso
 
 addproperty ("my_style", gcf,"linelinestyle","--")
 
static void adopt (const graphics_handle &parent_h, const graphics_handle &h)
 
ColumnVector cam2xform (const Array< double > &m)
 
static void check_limit_vals (double &min_val, double &max_val, double &min_pos, double &max_neg, const octave_value &data)
 
static void cleanup_waitfor_id (uint32_t id)
 
static void cleanup_waitfor_postset_listener (const octave_value &listener)
 
static void cleanup_waitfor_predelete_listener (const octave_value &listener)
 
static void close_figure (const graphics_handle &h)
 
static octave_value convert_cdata (const base_properties &props, const octave_value &cdata, bool is_scaled, int cdim)
 
template<typename T >
void convert_cdata_1 (bool is_scaled, bool is_real, double clim_0, double clim_1, const double *cmapv, const T *cv, octave_idx_type lda, octave_idx_type nc, double *av)
 
static void convert_cdata_2 (bool is_scaled, bool is_real, double clim_0, double clim_1, const double *cmapv, double x, octave_idx_type lda, octave_idx_type nc, octave_idx_type i, double *av)
 
static double convert_font_size (double font_size, const caseless_str &from_units, const caseless_str &to_units, double parent_height=0)
 
static ColumnVector convert_label_position (const ColumnVector &p, const text::properties &props, const graphics_xform &xform, const Matrix &bbox)
 
static octave_value convert_linestyleorder_string (const octave_value &val)
 
static Matrix convert_position (const Matrix &pos, const caseless_str &from_units, const caseless_str &to_units, const Matrix &parent_dim)
 
static Matrix convert_text_position (const Matrix &pos, const text::properties &props, const caseless_str &from_units, const caseless_str &to_units)
 
static octave_value convert_ticklabel_string (const octave_value &val)
 
ColumnVector cross (const ColumnVector &v1, const ColumnVector &v2)
 
void cross_product (double x1, double y1, double z1, double x2, double y2, double z2, double &x, double &y, double &z)
 
static Matrix default_axes_outerposition (void)
 
static Matrix default_axes_position (void)
 
static Matrix default_axes_tick (void)
 
static Matrix default_axes_ticklength (void)
 
static Matrix default_axes_view (void)
 
static Matrix default_colororder (void)
 
static Matrix default_control_position (void)
 
static Matrix default_control_sliderstep (void)
 
static Matrix default_data (void)
 
static Matrix default_figure_paperposition (void)
 
static Matrix default_figure_papersize (void)
 
static Matrix default_figure_position (void)
 
static Matrix default_image_cdata (void)
 
static Matrix default_light_position (void)
 
static Matrix default_lim (bool logscale=false)
 
static Matrix default_panel_position (void)
 
static Matrix default_patch_faces (void)
 
static Matrix default_patch_vertices (void)
 
static Matrix default_patch_xdata (void)
 
static Matrix default_patch_ydata (void)
 
static double default_screendepth (void)
 
static double default_screenpixelsperinch (void)
 
static Matrix default_screensize (void)
 
static Matrix default_surface_cdata (void)
 
static Matrix default_surface_xdata (void)
 
static Matrix default_surface_ydata (void)
 
static Matrix default_surface_zdata (void)
 
static void delete_graphics_object (const graphics_handle &h)
 
static void delete_graphics_object (double val)
 
static void delete_graphics_objects (const NDArray vals)
 
static void do_cleanup_waitfor_listener (const octave_value &listener, listener_mode mode=POSTSET)
 
static Matrix do_translate (double x0, double x1, const Matrix &lims, bool is_logscale)
 
static Matrix do_zoom (double val, double factor, const Matrix &lims, bool is_logscale)
 
double dot (const ColumnVector &v1, const ColumnVector &v2)
 
static OCTAVE_NORETURN void err_set_invalid (const std::string &pname)
 
OCTAVE_EXPORT octave_value_list F__is_handle_visible__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__zoom__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Favailable_graphics_toolkits (const octave_value_list &, int) register_graphics_toolkit}nd deftypefn */)
 
OCTAVE_EXPORT octave_value_list Fdrawnow (const octave_value_list &args, int) only graphic objects are updated and no other events or callbacks are processed.The third calling form of ode
 
OCTAVE_EXPORT octave_value_list Fget (const octave_value_list &args, int) return the complete property list for ar
 
static void finalize_r (const graphics_handle &h)
 
OCTAVE_EXPORT octave_value_list Fishandle (const octave_value_list &args, int) isfigure}nd deftypefn */)
 
OCTAVE_EXPORT octave_value_list Floaded_graphics_toolkits (const octave_value_list &, int)
 
 for (octave_idx_type n=0;n< hcv.numel();n++)
 
static void force_close_figure (const graphics_handle &h)
 
double force_in_range (double x, double lower, double upper)
 
OCTAVE_EXPORT octave_value_list Fregister_graphics_toolkit (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Freset (const octave_value_list &args, int) the properties code
 
OCTAVE_EXPORT octave_value_list Fwaitfor (const octave_value_list &args, int) allowing callbacks to modify the state of graphics objects.This function is reentrant and can be called from a callback
 
graphics_handle gca (void)
 
graphics_handle gcf (void)
 
template<typename T >
static void get_array_limits (const Array< T > &m, double &emin, double &emax, double &eminp, double &emaxp)
 
void get_children_limits (double &min_val, double &max_val, double &min_pos, double &max_neg, const Matrix &kids, char limit_type)
 
static std::string get_graphics_object_type (double val)
 
 if (nargin==0) print_usage() = args(0).class_name ()
 
 if (request_drawnow) Vdrawnow_requested
 
 if (nargin< 3||nargin > 4) print_usage()
 
 if (!gh.ok()) error("addlistener
 
 if (args.length() > 1)
 
 if (timeout_index< 0 &&args.length() >(max_arg_index+1))
 
 if (timeout_index >=0)
 
 if (timeout > 0) start.stamp()
 
static void initialize_r (const graphics_handle &h)
 
static bool is_figure (double val)
 
static bool is_handle (const graphics_handle &h)
 
static bool is_handle (double val)
 
static octave_value is_handle (const octave_value &val)
 
static bool is_handle_visible (const graphics_handle &h)
 
static bool is_handle_visible (double val)
 
static octave_value is_handle_visible (const octave_value &val)
 
static bool lookup_object_name (const caseless_str &name, caseless_str &go_name, caseless_str &rest)
 
static void magform (double x, double &a, int &b)
 
static base_graphics_objectmake_graphics_object_from_type (const caseless_str &type, const graphics_handle &h=graphics_handle(), const graphics_handle &p=graphics_handle())
 
static double make_handle_fraction (void)
 
static void max_axes_scale (double &s, Matrix &limits, const Matrix &kids, double pbfactor, double dafactor, char limit_type, bool tight)
 
double norm (const ColumnVector &v)
 
void normalize (ColumnVector &v)
 
static void normalized_aspectratios (Matrix &aspectratios, const Matrix &scalefactors, double xlength, double ylength, double zlength)
 
return ovl ()
 
static Matrix papersize_from_type (const caseless_str punits, const caseless_str ptype)
 
static graphics_handle reparent (const octave_value &ov, const std::string &who, const std::string &pname, const graphics_handle &new_parent, bool adopt=true)
 
void scale (Matrix &m, double x, double y, double z)
 
void scale (ColumnVector &v, double x, double y, double z)
 
static Matrix screen_size_pixels (void)
 
 set (hf,"paperorientation") esult
 
ColumnVector transform (const Matrix &m, double x, double y, double z)
 
void translate (Matrix &m, double x, double y, double z)
 
void translate (ColumnVector &v, double x, double y, double z)
 
Matrix unit_cube (void)
 
static caseless_str validate_property_name (const std::string &who, const std::string &what, const std::set< std::string > &pnames, const caseless_str &pname)
 
static Matrix viridis_colormap (void)
 
static octave_value_list waitfor_del_listener (const octave_value_list &args, int)
 
static octave_value_list waitfor_listener (const octave_value_list &args, int)
 
 while (true)
 
static void xcreatefcn (const graphics_handle &h)
 
void xform (ColumnVector &v, const Matrix &m)
 
RowVector xform2cam (const ColumnVector &v)
 
Matrix xform_matrix (void)
 
Matrix xform_scale (double x, double y, double z)
 
Matrix xform_translate (double x, double y, double z)
 
ColumnVector xform_vector (void)
 
ColumnVector xform_vector (double x, double y, double z)
 
static octave_value xget (const graphics_handle &h, const caseless_str &name)
 
static void xinitialize (const graphics_handle &h)
 
static void xreset_default_properties (graphics_handle h, property_list::pval_map_type factory_pval)
 
static void xset (const graphics_handle &h, const caseless_str &pname, const octave_value &val)
 
static void xset (const graphics_handle &h, const octave_value_list &args)
 
static void xset_gcbo (const graphics_handle &h)
 

Variables

paperorientation __pad0__
 
If ar {h} is a vector
 
 code {"units"}
 
static bool delete_executing = false
 
static std::map< caseless_str,
graphics_object
dprop_obj_map
 
If return a cell array
including the property values
or lists respectively 
eealso
 
static bool executing_callback = false
 
OCTAVE_EXPORT
octave_value_list while
another program execution is
suspended until the graphics
object the function returns
immediately In the second 
form
 
octave::unwind_protect frame
 
graphics_handle gh = gh_manager::lookup (h)
 
double h = args(0).xdouble_value ("addlistener: invalid handle H")
 
ColumnVector hcv = args(0).xvector_value ("set: H must be a graphics handle")
 
uint32_t id = 0
 
static uint32_t id_counter = 0
 
int max_arg_index = 0
 
int nargin = args.length ()
 
OCTAVE_EXPORT
octave_value_list while
another 
ode {waitfor} call is pending at the top-level. In the first form
 
std::string pname = args(1).xstring_value ("addlistener: PROP must be a string")
 
bool request_drawnow = false
 
octave_value retval
 
octave::sys::time start
 
double timeout = 0
 
int timeout_index = -1
 
static std::set< doubleupdating_aspectratios
 
static bool updating_axes_layout = false
 
static std::set< doubleupdating_axis_limits
 
static bool updating_hggroup_limits = false
 
static bool updating_patch_data = false
 
static bool updating_title_position = false
 
static bool updating_xlabel_position = false
 
static bool updating_ylabel_position = false
 
static bool updating_zlabel_position = false
 
nd group nd example bool waitfor_results
 

Macro Definition Documentation

#define CHECK_ARRAY_EQUAL (   T,
  F,
  A 
)
Value:
{ \
if (data.numel () == 1) \
return data.F ## scalar_value () == \
v.F ## scalar_value (); \
{ \
/* Keep copy of array_value to allow */ \
/* sparse/bool arrays that are converted, to */ \
/* not be deallocated early */ \
const A m1 = data.F ## array_value (); \
const T* d1 = m1.data (); \
const A m2 = v.F ## array_value (); \
const T* d2 = m2.data (); \
\
bool flag = true; \
for (int i = 0; flag && i < data.numel (); i++) \
if (d1[i] != d2[i]) \
flag = false; \
\
return flag; \
} \
}
for(octave_idx_type n=0;n< hcv.numel();n++)
Definition: graphics.cc:10128
if(nargin==0) print_usage()
Definition: symtab.cc:1734
=val(i)}if ode{val(i)}occurs in table i
Definition: lookup.cc:239
else
Definition: cellfun.cc:437
F77_RET_T const F77_INT F77_CMPLX * A

Referenced by array_property::is_equal().

#define CONVERT_CDATA_1 (   ARRAY_T,
  VAL_FN,
  IS_REAL 
)
Value:
do \
{ \
ARRAY_T tmp = cdata. VAL_FN ## array_value (); \
convert_cdata_1 (is_scaled, IS_REAL, clim_0, clim_1, cmapv, \
tmp.data (), lda, nc, av); \
} \
while (0)
void convert_cdata_1(bool is_scaled, bool is_real, double clim_0, double clim_1, const double *cmapv, const T *cv, octave_idx_type lda, octave_idx_type nc, double *av)
Definition: graphics.cc:892
while(true)
Definition: graphics.cc:11736
double tmp
Definition: data.cc:6300

Referenced by convert_cdata().

#define FIX_LIMITS
Value:
if (limits.numel () == 4) \
{ \
val = limits(0); \
min_val = val; \
val = limits(1); \
max_val = val; \
val = limits(2); \
min_pos = val; \
val = limits(3); \
max_neg = val; \
} \
{ \
limits.resize (4, 1); \
limits(0) = min_val; \
limits(1) = max_val; \
limits(2) = min_pos; \
limits(3) = max_neg; \
}
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
if(nargin==0) print_usage()
Definition: symtab.cc:1734
bool finite(double x)
Definition: lo-mappers.cc:367
else
Definition: cellfun.cc:437

Referenced by axes::update_axis_limits().

#define GO_BODY (   TYPE)
Value:
if (args.length () == 0) \
\
return octave_value (make_graphics_object (#TYPE, false, args)); \
OCTINTERP_API void print_usage(void)
Definition: defun.cc:52
if(nargin==0) print_usage()
Definition: symtab.cc:1734
JNIEnv void * args
Definition: ov-java.cc:67
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))

Typedef Documentation

using args.length = = 0) print_usage (

Definition at line 11578 of file graphics.cc.

Function Documentation

endfunction addlistener ( gcf  ,
"position"  ,
my_listener,
"my string  
)

Definition at line 11196 of file graphics.cc.

References octave_value_list::length(), and print_usage().

addproperty ( "my_style"  ,
gcf  ,
"linelinestyle"  ,
"--"   
)
static void adopt ( const graphics_handle parent_h,
const graphics_handle h 
)
static

Definition at line 2765 of file graphics.cc.

References graphics_object::adopt(), and gh_manager::get_object().

ColumnVector cam2xform ( const Array< double > &  m)
inline

Definition at line 5236 of file graphics.cc.

References double, Array< T >::fortran_vec(), and retval.

Referenced by axes::properties::update_camera().

static void check_limit_vals ( double min_val,
double max_val,
double min_pos,
double max_neg,
const octave_value data 
)
static
static void cleanup_waitfor_id ( uint32_t  id)
static

Definition at line 11444 of file graphics.cc.

Referenced by if().

static void cleanup_waitfor_postset_listener ( const octave_value listener)
static

Definition at line 11482 of file graphics.cc.

References do_cleanup_waitfor_listener(), and POSTSET.

Referenced by if().

static void cleanup_waitfor_predelete_listener ( const octave_value listener)
static

Definition at line 11486 of file graphics.cc.

References do_cleanup_waitfor_listener(), and PREDELETE.

Referenced by if().

static void close_figure ( const graphics_handle h)
static

Definition at line 2701 of file graphics.cc.

References gh_manager::execute_callback(), OCTAVE_SAFE_CALL, and xget().

Referenced by gh_manager::do_close_all_figures().

static octave_value convert_cdata ( const base_properties props,
const octave_value cdata,
bool  is_scaled,
int  cdim 
)
static
template<typename T >
void convert_cdata_1 ( bool  is_scaled,
bool  is_real,
double  clim_0,
double  clim_1,
const double cmapv,
const T *  cv,
octave_idx_type  lda,
octave_idx_type  nc,
double av 
)

Definition at line 892 of file graphics.cc.

References convert_cdata_2().

static void convert_cdata_2 ( bool  is_scaled,
bool  is_real,
double  clim_0,
double  clim_1,
const double cmapv,
double  x,
octave_idx_type  lda,
octave_idx_type  nc,
octave_idx_type  i,
double av 
)
static

Definition at line 860 of file graphics.cc.

References octave::math::fix(), octave::math::isnan(), and x.

Referenced by convert_cdata_1().

static double convert_font_size ( double  font_size,
const caseless_str from_units,
const caseless_str to_units,
double  parent_height = 0 
)
static
static ColumnVector convert_label_position ( const ColumnVector p,
const text::properties props,
const graphics_xform xform,
const Matrix bbox 
)
static
static octave_value convert_linestyleorder_string ( const octave_value val)
static
static Matrix convert_position ( const Matrix pos,
const caseless_str from_units,
const caseless_str to_units,
const Matrix parent_dim 
)
static
static Matrix convert_text_position ( const Matrix pos,
const text::properties props,
const caseless_str from_units,
const caseless_str to_units 
)
static
static octave_value convert_ticklabel_string ( const octave_value val)
static
ColumnVector cross ( const ColumnVector v1,
const ColumnVector v2 
)
inline

Definition at line 5203 of file graphics.cc.

References v2, and xform_vector().

Referenced by axes::properties::update_camera().

void cross_product ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double x,
double y,
double z 
)
inline

Definition at line 8375 of file graphics.cc.

Referenced by surface::properties::update_vertex_normals().

static Matrix default_axes_outerposition ( void  )
static

Definition at line 420 of file graphics.cc.

References m.

Referenced by axes::properties::factory_defaults(), and axes::properties::set_defaults().

static Matrix default_axes_position ( void  )
static
static Matrix default_axes_tick ( void  )
static

Definition at line 444 of file graphics.cc.

References m.

Referenced by axes::properties::factory_defaults().

static Matrix default_axes_ticklength ( void  )
static

Definition at line 459 of file graphics.cc.

References m.

Referenced by axes::properties::factory_defaults(), and axes::properties::set_defaults().

static Matrix default_axes_view ( void  )
static

Definition at line 433 of file graphics.cc.

References m.

Referenced by axes::properties::factory_defaults().

static Matrix default_colororder ( void  )
static

Definition at line 241 of file graphics.cc.

References retval.

Referenced by axes::properties::factory_defaults(), and axes::properties::set_defaults().

static Matrix default_control_position ( void  )
static

Definition at line 507 of file graphics.cc.

References retval.

Referenced by uicontrol::properties::factory_defaults().

static Matrix default_control_sliderstep ( void  )
static

Definition at line 520 of file graphics.cc.

References retval.

Referenced by uicontrol::properties::factory_defaults().

static Matrix default_data ( void  )
static

Definition at line 295 of file graphics.cc.

References retval.

Referenced by line::properties::factory_defaults().

static Matrix default_figure_paperposition ( void  )
static

Definition at line 494 of file graphics.cc.

References m.

Referenced by figure::properties::factory_defaults().

static Matrix default_figure_papersize ( void  )
static

Definition at line 483 of file graphics.cc.

References m.

Referenced by figure::properties::factory_defaults().

static Matrix default_figure_position ( void  )
static
static Matrix default_image_cdata ( void  )
static

Definition at line 306 of file graphics.cc.

References default_im_data, m, and row.

Referenced by image::properties::factory_defaults().

static Matrix default_light_position ( void  )
static

Definition at line 544 of file graphics.cc.

References m.

Referenced by light::properties::factory_defaults().

static Matrix default_lim ( bool  logscale = false)
static

Definition at line 276 of file graphics.cc.

References m.

Referenced by axes::properties::factory_defaults(), and axes::properties::get_axis_limits().

static Matrix default_panel_position ( void  )
static
static Matrix default_patch_faces ( void  )
static

Definition at line 363 of file graphics.cc.

References m.

Referenced by patch::properties::factory_defaults().

static Matrix default_patch_vertices ( void  )
static

Definition at line 375 of file graphics.cc.

References m.

Referenced by patch::properties::factory_defaults().

static Matrix default_patch_xdata ( void  )
static

Definition at line 387 of file graphics.cc.

References m.

Referenced by patch::properties::factory_defaults().

static Matrix default_patch_ydata ( void  )
static

Definition at line 397 of file graphics.cc.

References m.

Referenced by patch::properties::factory_defaults().

static double default_screendepth ( void  )
static

Definition at line 216 of file graphics.cc.

References display_info::depth().

Referenced by root_figure::properties::factory_defaults().

static double default_screenpixelsperinch ( void  )
static

Definition at line 235 of file graphics.cc.

References display_info::x_dpi(), and display_info::y_dpi().

Referenced by root_figure::properties::factory_defaults().

static Matrix default_screensize ( void  )
static
static Matrix default_surface_cdata ( void  )
static

Definition at line 357 of file graphics.cc.

References default_surface_zdata().

Referenced by surface::properties::factory_defaults().

static Matrix default_surface_xdata ( void  )
static

Definition at line 322 of file graphics.cc.

References m, and row.

Referenced by surface::properties::factory_defaults().

static Matrix default_surface_ydata ( void  )
static

Definition at line 334 of file graphics.cc.

References m, and row.

Referenced by surface::properties::factory_defaults().

static Matrix default_surface_zdata ( void  )
static

Definition at line 346 of file graphics.cc.

References m, and row.

Referenced by default_surface_cdata(), and surface::properties::factory_defaults().

static void delete_graphics_object ( const graphics_handle h)
static
static void delete_graphics_object ( double  val)
static

Definition at line 2680 of file graphics.cc.

References delete_graphics_object(), and gh_manager::lookup().

static void delete_graphics_objects ( const NDArray  vals)
static
static void do_cleanup_waitfor_listener ( const octave_value listener,
listener_mode  mode = POSTSET 
)
static
static Matrix do_translate ( double  x0,
double  x1,
const Matrix lims,
bool  is_logscale 
)
static

Definition at line 7704 of file graphics.cc.

References pow(), and tmp.

Referenced by axes::properties::translate_view().

static Matrix do_zoom ( double  val,
double  factor,
const Matrix lims,
bool  is_logscale 
)
static

Definition at line 7565 of file graphics.cc.

References pow(), tmp, and val.

Referenced by axes::properties::zoom_about_point().

double dot ( const ColumnVector v1,
const ColumnVector v2 
)
inline

Definition at line 5191 of file graphics.cc.

References v2.

Referenced by norm(), and axes::properties::update_camera().

static OCTAVE_NORETURN void err_set_invalid ( const std::string pname)
static
OCTAVE_EXPORT octave_value_list F__is_handle_visible__ ( const octave_value_list args,
int   
)

Definition at line 9889 of file graphics.cc.

References is_handle_visible(), ovl(), and print_usage().

Referenced by install_graphics_fcns().

OCTAVE_EXPORT octave_value_list F__zoom__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Favailable_graphics_toolkits ( const octave_value_list ,
int   
)

Definition at line 10979 of file graphics.cc.

References gtk_manager::available_toolkits_list(), and ovl().

Referenced by install_graphics_fcns().

OCTAVE_EXPORT octave_value_list Fdrawnow ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fget ( const octave_value_list args,
int   
)
static void finalize_r ( const graphics_handle h)
static
OCTAVE_EXPORT octave_value_list Fishandle ( const octave_value_list args,
int   
)

Definition at line 9841 of file graphics.cc.

References is_handle(), ovl(), and print_usage().

Referenced by install_graphics_fcns().

OCTAVE_EXPORT octave_value_list Floaded_graphics_toolkits ( const octave_value_list ,
int   
)

Definition at line 11010 of file graphics.cc.

References gtk_manager::loaded_toolkits_list(), and ovl().

Referenced by install_graphics_fcns().

for ( )
static void force_close_figure ( const graphics_handle h)
static

Definition at line 2709 of file graphics.cc.

References delete_graphics_object(), and xset().

Referenced by gh_manager::do_close_all_figures().

double force_in_range ( double  x,
double  lower,
double  upper 
)
inline

Definition at line 7554 of file graphics.cc.

References x.

OCTAVE_EXPORT octave_value_list Fregister_graphics_toolkit ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Freset ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fwaitfor ( const octave_value_list args,
int   
)

Referenced by install_graphics_fcns().

graphics_handle gca ( void  )

Definition at line 2642 of file graphics.cc.

References octave_value::double_value(), gcf(), octave_value::is_empty(), NaN(), val, and xget().

graphics_handle gcf ( void  )

Definition at line 2632 of file graphics.cc.

References octave_value::double_value(), octave_value::is_empty(), NaN(), val, and xget().

Referenced by Fdrawnow(), and gca().

template<typename T >
static void get_array_limits ( const Array< T > &  m,
double emin,
double emax,
double eminp,
double emaxp 
)
static
void get_children_limits ( double min_val,
double max_val,
double min_pos,
double max_neg,
const Matrix kids,
char  limit_type 
)
static std::string get_graphics_object_type ( double  val)
static

Definition at line 10200 of file graphics.cc.

References error(), gh_manager::get_object(), retval, string, and graphics_object::type().

Referenced by Fget().

if ( nargin  = =0) = args(0).class_name ()

Definition at line 1734 of file symtab.cc.

if ( request_drawnow  )
if ( nargin< 3||nargin 4)
if ( !gh.  ok())

Definition at line 11211 of file graphics.cc.

if ( args.  length(),
 
)
if ( timeout_index< 0 &&args.  length) >(max_arg_index+1)

Definition at line 11692 of file graphics.cc.

References caseless_str::compare(), error(), and s.

if ( timeout_index >=  0)

Definition at line 11702 of file graphics.cc.

References error(), octave_value_list::length(), and warning().

if ( timeout  ,
 
)
static void initialize_r ( const graphics_handle h)
static
static bool is_figure ( double  val)
static

Definition at line 2808 of file graphics.cc.

References gh_manager::get_object(), and graphics_object::isa().

static bool is_handle ( const graphics_handle h)
static
static bool is_handle ( double  val)
static

Definition at line 2778 of file graphics.cc.

References h, gh_manager::lookup(), and octave_handle::ok().

static octave_value is_handle ( const octave_value val)
static
static bool is_handle_visible ( const graphics_handle h)
static
static bool is_handle_visible ( double  val)
static

Definition at line 9858 of file graphics.cc.

References is_handle_visible(), and gh_manager::lookup().

static octave_value is_handle_visible ( const octave_value val)
static
static bool lookup_object_name ( const caseless_str name,
caseless_str go_name,
caseless_str rest 
)
static

Definition at line 1023 of file graphics.cc.

References caseless_str::compare(), and result.

Referenced by property::create().

static void magform ( double  x,
double a,
int b 
)
static

Definition at line 6725 of file graphics.cc.

References abs(), octave::math::floor(), and pow().

Referenced by axes::properties::calc_tick_sep().

static base_graphics_object* make_graphics_object_from_type ( const caseless_str type,
const graphics_handle h = graphics_handle (),
const graphics_handle p = graphics_handle () 
)
static

Definition at line 1102 of file graphics.cc.

References caseless_str::compare(), h, and p.

Referenced by property::create(), and gh_manager::do_make_graphics_handle().

static double make_handle_fraction ( void  )
static
static void max_axes_scale ( double s,
Matrix limits,
const Matrix kids,
double  pbfactor,
double  dafactor,
char  limit_type,
bool  tight 
)
static
double norm ( const ColumnVector v)
inline
void normalize ( ColumnVector v)
inline

Definition at line 5184 of file graphics.cc.

References scale().

Referenced by axes::properties::update_camera().

static void normalized_aspectratios ( Matrix aspectratios,
const Matrix scalefactors,
double  xlength,
double  ylength,
double  zlength 
)
static

Definition at line 6111 of file graphics.cc.

References octave::math::min().

Referenced by axes::properties::update_aspectratios().

return ovl ( )
static Matrix papersize_from_type ( const caseless_str  punits,
const caseless_str  ptype 
)
static
static graphics_handle reparent ( const octave_value ov,
const std::string who,
const std::string pname,
const graphics_handle new_parent,
bool  adopt = true 
)
static
void scale ( Matrix m,
double  x,
double  y,
double  z 
)
inline
void scale ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5168 of file graphics.cc.

References x, and y.

static Matrix screen_size_pixels ( void  )
static
set ( hf  ,
"paperorientation"   
)
ColumnVector transform ( const Matrix m,
double  x,
double  y,
double  z 
)
inline
void translate ( Matrix m,
double  x,
double  y,
double  z 
)
inline
void translate ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5176 of file graphics.cc.

References x, and y.

Matrix unit_cube ( void  )
inline

Definition at line 5215 of file graphics.cc.

References double, Array< T >::fortran_vec(), and m.

Referenced by axes::properties::update_camera().

static caseless_str validate_property_name ( const std::string who,
const std::string what,
const std::set< std::string > &  pnames,
const caseless_str pname 
)
static

Definition at line 78 of file graphics.cc.

References caseless_str::compare(), error(), string_vector::list_in_columns(), string, and warning_with_id().

Referenced by root_figure::properties::get(), figure::properties::get(), axes::properties::get(), line::properties::get(), text::properties::get(), image::properties::get(), light::properties::get(), patch::properties::get(), surface::properties::get(), hggroup::properties::get(), uimenu::properties::get(), uicontextmenu::properties::get(), uicontrol::properties::get(), uibuttongroup::properties::get(), uipanel::properties::get(), uitoolbar::properties::get(), uipushtool::properties::get(), uitoggletool::properties::get(), root_figure::properties::get_property(), figure::properties::get_property(), axes::properties::get_property(), line::properties::get_property(), text::properties::get_property(), image::properties::get_property(), light::properties::get_property(), patch::properties::get_property(), surface::properties::get_property(), hggroup::properties::get_property(), uimenu::properties::get_property(), uicontextmenu::properties::get_property(), uicontrol::properties::get_property(), uibuttongroup::properties::get_property(), uipanel::properties::get_property(), uitoolbar::properties::get_property(), uipushtool::properties::get_property(), uitoggletool::properties::get_property(), root_figure::properties::set(), figure::properties::set(), axes::properties::set(), line::properties::set(), text::properties::set(), image::properties::set(), light::properties::set(), patch::properties::set(), surface::properties::set(), hggroup::properties::set(), uimenu::properties::set(), uicontextmenu::properties::set(), uicontrol::properties::set(), uibuttongroup::properties::set(), uipanel::properties::set(), uitoolbar::properties::set(), uipushtool::properties::set(), and uitoggletool::properties::set().

static Matrix viridis_colormap ( void  )
static

Definition at line 132 of file graphics.cc.

References Array< T >::fortran_vec().

Referenced by figure::properties::factory_defaults().

static octave_value_list waitfor_del_listener ( const octave_value_list args,
int   
)
static

Definition at line 11523 of file graphics.cc.

References id, octave_value_list::length(), and ovl().

Referenced by if().

static octave_value_list waitfor_listener ( const octave_value_list args,
int   
)
static
while ( true  )
static void xcreatefcn ( const graphics_handle h)
static
void xform ( ColumnVector v,
const Matrix m 
)
inline
RowVector xform2cam ( const ColumnVector v)
inline

Definition at line 5246 of file graphics.cc.

References ColumnVector::extract_n(), and ColumnVector::transpose().

Referenced by axes::properties::update_camera().

Matrix xform_matrix ( void  )
inline

Definition at line 5085 of file graphics.cc.

References m.

Referenced by axes::properties::update_camera(), graphics_xform::xform_eye(), and xform_translate().

Matrix xform_scale ( double  x,
double  y,
double  z 
)
inline

Definition at line 5124 of file graphics.cc.

References m, x, and y.

Referenced by scale().

Matrix xform_translate ( double  x,
double  y,
double  z 
)
inline

Definition at line 5137 of file graphics.cc.

References m, x, xform_matrix(), and y.

Referenced by translate().

ColumnVector xform_vector ( void  )
inline
ColumnVector xform_vector ( double  x,
double  y,
double  z 
)
inline

Definition at line 5106 of file graphics.cc.

References x, and y.

static octave_value xget ( const graphics_handle h,
const caseless_str name 
)
static
static void xinitialize ( const graphics_handle h)
static

Definition at line 2823 of file graphics.cc.

References gh_manager::get_object(), and graphics_object::initialize().

Referenced by axes::initialize().

static void xreset_default_properties ( graphics_handle  h,
property_list::pval_map_type  factory_pval 
)
static
static void xset ( const graphics_handle h,
const caseless_str pname,
const octave_value val 
)
static
static void xset ( const graphics_handle h,
const octave_value_list args 
)
static
static void xset_gcbo ( const graphics_handle h)
static

Variable Documentation

paperorientation __pad0__

Definition at line 10113 of file graphics.cc.

OCTAVE_EXPORT octave_value_list while another program execution is suspended until the graphics object the function returns immediately In the second execution is suspended until the graphics object is destroyed or the property named the function returns immediately In the third execution is suspended until the graphics object is destroyed or the property named the property does not exist or the property is already set to ar {h} is a vector

Definition at line 10224 of file graphics.cc.

and the properties code {"units"}

Definition at line 9910 of file graphics.cc.

bool delete_executing = false
static

Definition at line 2686 of file graphics.cc.

std::map<caseless_str, graphics_object> dprop_obj_map
static

Definition at line 1703 of file graphics.cc.

nd group nd example eealso

Definition at line 10224 of file graphics.cc.

bool executing_callback = false
static

Definition at line 1675 of file graphics.cc.

OCTAVE_EXPORT octave_value_list while another program execution is suspended until the graphics object the function returns immediately In the second execution is suspended until the graphics object is destroyed or the property named the function returns immediately In the third form

Definition at line 11575 of file graphics.cc.

Referenced by qrp< T >::init(), and qr< T >::init().

Definition at line 11584 of file graphics.cc.

Referenced by call_mex(), QtHandles::ButtonGroup::create(), DEFUN(), delete_graphics_objects(), do_edit_history(), gh_manager::do_execute_callback(), do_history(), octave_dynamic_loader::do_load_mex(), octave_dynamic_loader::do_load_oct(), octave_builtin::do_multi_index_op(), octave_mex_function::do_multi_index_op(), octave_user_script::do_multi_index_op(), octave_user_function::do_multi_index_op(), do_rand(), do_run_history(), load_path::do_set(), octave::tree_evaluator::do_unwind_protect_cleanup_code(), do_who(), QtHandles::Panel::eventFilter(), QtHandles::ButtonGroup::eventFilter(), callback_property::execute(), execute_pkg_add_or_del(), F__ftp_mget__(), F__magick_read__(), Fdrawnow(), octave::base_parser::finish_array_list(), octave::base_parser::finish_colon_expression(), flush_octave_stdout(), octave::curl_transfer::ftp_file_or_dir_action(), G__delaunayn__(), G__eigs__(), G__voronoi__(), Gaudioread(), Gconvhulln(), generate_struct_completions(), get_debug_input(), octave::gl2ps_print(), octave::sys::glob(), file_editor_tab::handle_context_menu_break_condition(), octave_fcn_handle::load_ascii(), octave_fcn_handle::load_binary(), load_fcn_from_file(), octave_fcn_handle::load_hdf5(), looks_like_struct(), make_stack_frame_list(), maybe_enter_debugger(), tree::meets_bp_condition(), mexGetVariable(), mexPutVariable(), octave::base_url_transfer::mget_directory(), octave::base_url_transfer::mput_directory(), parse_fcn_file(), pr_where(), octave_struct::print_raw(), octave_class::print_raw(), octave_scalar_struct::print_raw(), octave::curl_transfer::pwd(), read_images(), read_indexed_images(), read_mat5_binary_element(), octave_class::reconstruct_exemplar(), QtHandles::Figure::redraw(), base_graphics_object::remove_all_listeners(), octave::curl_transfer::rename(), jit_convert::resolve(), run_command_and_return_output(), save_mat_binary_data(), sparse(), octave_class::subsasgn_common(), QtHandles::Panel::update(), QtHandles::ButtonGroup::update(), axes::properties::update_aspectratios(), axes::properties::update_axes_layout(), axes::update_axis_limits(), hggroup::update_axis_limits(), patch::properties::update_data(), patch::properties::update_fvc(), axes::properties::update_title_position(), axes::properties::update_xlabel_position(), axes::properties::update_ylabel_position(), axes::properties::update_zlabel_position(), QtHandles::Panel::updateLayout(), QtHandles::ButtonGroup::updateLayout(), jit_convert::visit(), octave::tree_evaluator::visit_complex_for_command(), octave::tree_evaluator::visit_do_until_command(), jit_convert::visit_do_until_command(), octave::tree_evaluator::visit_simple_for_command(), jit_convert::visit_simple_for_command(), octave::tree_evaluator::visit_try_catch_command(), octave::tree_evaluator::visit_while_command(), jit_convert::visit_while_command(), warning_1(), octave::sys::windows_glob(), and octave_oncleanup::~octave_oncleanup().

double h = args(0).xdouble_value ("addlistener: invalid handle H")
ColumnVector hcv = args(0).xvector_value ("set: H must be a graphics handle")

Definition at line 10123 of file graphics.cc.

Referenced by Fget(), for(), and Freset().

uint32_t id = 0
uint32_t id_counter = 0
static

Definition at line 11586 of file graphics.cc.

int max_arg_index = 0

Definition at line 11589 of file graphics.cc.

nd deftypefn *int nargin = args.length ()
OCTAVE_EXPORT octave_value_list while another ode {waitfor} call is pending at the top-level. In the first form

Definition at line 11575 of file graphics.cc.

caseless_str pname = args(1).xstring_value ("addlistener: PROP must be a string")

Definition at line 11207 of file graphics.cc.

Referenced by base_graphics_object::build_user_defaults_map(), octave_fcn_handle::do_multi_index_op(), cdef_object::get(), cdef_object_scalar::get(), base_properties::get(), base_graphics_object::get(), root_figure::properties::get(), figure::properties::get(), axes::properties::get(), line::properties::get(), text::properties::get(), image::properties::get(), light::properties::get(), patch::properties::get(), surface::properties::get(), hggroup::properties::get(), uimenu::properties::get(), uicontextmenu::properties::get(), uicontrol::properties::get(), uibuttongroup::properties::get(), uipanel::properties::get(), uitoolbar::properties::get(), uipushtool::properties::get(), uitoggletool::properties::get(), root_figure::properties::get_property(), figure::properties::get_property(), axes::properties::get_property(), line::properties::get_property(), text::properties::get_property(), image::properties::get_property(), light::properties::get_property(), patch::properties::get_property(), surface::properties::get_property(), hggroup::properties::get_property(), uimenu::properties::get_property(), uicontextmenu::properties::get_property(), uicontrol::properties::get_property(), uibuttongroup::properties::get_property(), uipanel::properties::get_property(), uitoolbar::properties::get_property(), uipushtool::properties::get_property(), uitoggletool::properties::get_property(), if(), property_list::lookup(), property_list::set(), graphics_object::set(), root_figure::properties::set(), figure::properties::set(), axes::properties::set(), line::properties::set(), text::properties::set(), image::properties::set(), light::properties::set(), patch::properties::set(), surface::properties::set(), hggroup::properties::set(), uimenu::properties::set(), uicontextmenu::properties::set(), uicontrol::properties::set(), uibuttongroup::properties::set(), uipanel::properties::set(), uitoolbar::properties::set(), uipushtool::properties::set(), uitoggletool::properties::set(), base_properties::set_from_list(), and xreset_default_properties().

bool request_drawnow = false

Definition at line 10125 of file graphics.cc.

return retval
double timeout = 0
int timeout_index = -1

Definition at line 11590 of file graphics.cc.

std::set<double> updating_aspectratios
static

Definition at line 6147 of file graphics.cc.

bool updating_axes_layout = false
static

Definition at line 5471 of file graphics.cc.

std::set<double> updating_axis_limits
static

Definition at line 7187 of file graphics.cc.

bool updating_hggroup_limits = false
static

Definition at line 8507 of file graphics.cc.

bool updating_patch_data = false
static

Definition at line 8178 of file graphics.cc.

bool updating_title_position = false
static

Definition at line 6045 of file graphics.cc.

bool updating_xlabel_position = false
static

Definition at line 5710 of file graphics.cc.

bool updating_ylabel_position = false
static

Definition at line 5811 of file graphics.cc.

bool updating_zlabel_position = false
static

Definition at line 5921 of file graphics.cc.

nd group nd example bool waitfor_results

Definition at line 11361 of file graphics.cc.