GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
graphics.cc File Reference
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <limits>
#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-private.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  callback_props
 
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 std::string default_graphics_toolkit (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__get_frame__ (const octave_value_list &args, int)
 
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 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 Fishghandle (const octave_value_list &args, int) isaxes
 
 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 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)
 
OCTAVE_EXPORT octave_value_list ishandle nd deftypefn * if (args.length() !=1) print_usage()
 
 if (nargin==0) print_usage()
 
 if (request_drawnow) Vdrawnow_requested
 
 if (nargin< 3||nargin > 4) print_usage()
 
 if (! gh.ok()) error("addlistener
 
 if (args(0).isempty()) return ovl()
 
 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_visible (const graphics_handle &h)
 
static bool is_handle_visible (double val)
 
static octave_value is_handle_visible (const octave_value &val)
 
static bool is_hghandle (const graphics_handle &h)
 
static bool is_hghandle (double val)
 
static octave_value is_hghandle (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 (is_hghandle(args(0)))
 
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
 
static int toggle_warn (std::string id, bool on, int state=-1)
 
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_objectdprop_obj_map
 
If return a cell array including the property values or lists respectively eealso
 
static callback_props executing_callbacks
 
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
 
OCTAVE_EXPORT octave_value_list isfigure
 
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

◆ CHECK_ARRAY_EQUAL

#define CHECK_ARRAY_EQUAL (   T,
  F,
  A 
)
Value:
{ \
if (data.numel () == 1) \
return data.F ## scalar_value () == \
v.F ## scalar_value (); \
else \
{ \
/* 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:10831
F77_RET_T const F77_INT F77_CMPLX * A
for i
Definition: data.cc:5264

Referenced by array_property::is_equal().

◆ CONVERT_CDATA_1

#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:905
double tmp
Definition: data.cc:6252

Referenced by convert_cdata().

◆ FIX_LIMITS

#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; \
} \
else \
{ \
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:4986
bool isfinite(double x)
Definition: lo-mappers.h:201

Referenced by axes::update_axis_limits().

◆ GO_BODY

#define GO_BODY (   TYPE)
Value:
if (args.length () == 0) \
\
return octave_value (make_graphics_object (#TYPE, false, args)); \
OCTAVE_EXPORT octave_value_list ishandle nd deftypefn * if(args.length() !=1) print_usage()
OCTINTERP_API void print_usage(void)
Definition: defun.cc:54
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))

Typedef Documentation

◆ args.length

using args.length = = 0) print_usage ()

Definition at line 12180 of file graphics.cc.

Function Documentation

◆ addlistener()

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

Definition at line 11799 of file graphics.cc.

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

◆ addproperty()

addproperty ( "my_style"  ,
gcf  ,
"linelinestyle"  ,
"--"   
)

◆ adopt()

static void adopt ( const graphics_handle parent_h,
const graphics_handle h 
)
static

Definition at line 2909 of file graphics.cc.

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

◆ cam2xform()

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

Definition at line 5528 of file graphics.cc.

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

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

◆ check_limit_vals()

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

◆ cleanup_waitfor_id()

static void cleanup_waitfor_id ( uint32_t  id)
static

Definition at line 12048 of file graphics.cc.

References waitfor_results.

Referenced by if().

◆ cleanup_waitfor_postset_listener()

static void cleanup_waitfor_postset_listener ( const octave_value listener)
static

Definition at line 12086 of file graphics.cc.

References do_cleanup_waitfor_listener(), and POSTSET.

Referenced by if().

◆ cleanup_waitfor_predelete_listener()

static void cleanup_waitfor_predelete_listener ( const octave_value listener)
static

Definition at line 12090 of file graphics.cc.

References do_cleanup_waitfor_listener(), and PREDELETE.

Referenced by if().

◆ close_figure()

static void close_figure ( const graphics_handle h)
static

Definition at line 2845 of file graphics.cc.

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

Referenced by gh_manager::do_close_all_figures().

◆ convert_cdata()

◆ convert_cdata_1()

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 905 of file graphics.cc.

References convert_cdata_2(), and i.

◆ 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 873 of file graphics.cc.

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

Referenced by convert_cdata_1().

◆ convert_font_size()

◆ convert_label_position()

◆ convert_linestyleorder_string()

static octave_value convert_linestyleorder_string ( const octave_value val)
static

Definition at line 6806 of file graphics.cc.

References string_vector::append(), octave_value(), retval, string, and val.

◆ convert_position()

◆ convert_text_position()

◆ convert_ticklabel_string()

static octave_value convert_ticklabel_string ( const octave_value val)
static

Definition at line 6708 of file graphics.cc.

References string_vector::append(), i, octave_value(), retval, string, and val.

◆ cross()

ColumnVector cross ( const ColumnVector v1,
const ColumnVector v2 
)
inline

Definition at line 5495 of file graphics.cc.

References v2, and xform_vector().

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

◆ cross_product()

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 9069 of file graphics.cc.

References x, and y.

◆ default_axes_outerposition()

static Matrix default_axes_outerposition ( void  )
static

Definition at line 424 of file graphics.cc.

◆ default_axes_position()

static Matrix default_axes_position ( void  )
static

Definition at line 411 of file graphics.cc.

◆ default_axes_tick()

static Matrix default_axes_tick ( void  )
static

Definition at line 448 of file graphics.cc.

◆ default_axes_ticklength()

static Matrix default_axes_ticklength ( void  )
static

Definition at line 463 of file graphics.cc.

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

◆ default_axes_view()

static Matrix default_axes_view ( void  )
static

Definition at line 437 of file graphics.cc.

◆ default_colororder()

static Matrix default_colororder ( void  )
static

Definition at line 245 of file graphics.cc.

References retval.

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

◆ default_control_position()

static Matrix default_control_position ( void  )
static

Definition at line 520 of file graphics.cc.

References retval.

◆ default_control_sliderstep()

static Matrix default_control_sliderstep ( void  )
static

Definition at line 533 of file graphics.cc.

References retval.

◆ default_data()

static Matrix default_data ( void  )
static

Definition at line 299 of file graphics.cc.

References retval.

◆ default_figure_paperposition()

static Matrix default_figure_paperposition ( void  )
static

Definition at line 498 of file graphics.cc.

◆ default_figure_papersize()

static Matrix default_figure_papersize ( void  )
static

Definition at line 487 of file graphics.cc.

◆ default_figure_position()

static Matrix default_figure_position ( void  )
static

◆ default_graphics_toolkit()

static std::string default_graphics_toolkit ( void  )
static

◆ default_image_cdata()

static Matrix default_image_cdata ( void  )
static

Definition at line 310 of file graphics.cc.

References default_im_data, i, and row.

◆ default_light_position()

static Matrix default_light_position ( void  )
static

Definition at line 557 of file graphics.cc.

◆ default_lim()

static Matrix default_lim ( bool  logscale = false)
static

◆ default_panel_position()

static Matrix default_panel_position ( void  )
static

Definition at line 544 of file graphics.cc.

References retval.

◆ default_patch_faces()

static Matrix default_patch_faces ( void  )
static

Definition at line 367 of file graphics.cc.

◆ default_patch_vertices()

static Matrix default_patch_vertices ( void  )
static

Definition at line 379 of file graphics.cc.

◆ default_patch_xdata()

static Matrix default_patch_xdata ( void  )
static

Definition at line 391 of file graphics.cc.

◆ default_patch_ydata()

static Matrix default_patch_ydata ( void  )
static

Definition at line 401 of file graphics.cc.

◆ default_screendepth()

static double default_screendepth ( void  )
static

Definition at line 220 of file graphics.cc.

References octave::display_info::depth().

◆ default_screenpixelsperinch()

static double default_screenpixelsperinch ( void  )
static

Definition at line 239 of file graphics.cc.

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

◆ default_screensize()

static Matrix default_screensize ( void  )
static

◆ default_surface_cdata()

static Matrix default_surface_cdata ( void  )
static

Definition at line 361 of file graphics.cc.

References default_surface_zdata().

◆ default_surface_xdata()

static Matrix default_surface_xdata ( void  )
static

Definition at line 326 of file graphics.cc.

References row.

◆ default_surface_ydata()

static Matrix default_surface_ydata ( void  )
static

Definition at line 338 of file graphics.cc.

References row.

◆ default_surface_zdata()

static Matrix default_surface_zdata ( void  )
static

Definition at line 350 of file graphics.cc.

References row.

Referenced by default_surface_cdata().

◆ delete_graphics_object() [1/2]

◆ delete_graphics_object() [2/2]

static void delete_graphics_object ( double  val)
static

Definition at line 2824 of file graphics.cc.

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

◆ delete_graphics_objects()

static void delete_graphics_objects ( const NDArray  vals)
static

◆ do_cleanup_waitfor_listener()

◆ do_translate()

static Matrix do_translate ( double  x0,
double  x1,
const Matrix lims,
bool  is_logscale 
)
static

Definition at line 8365 of file graphics.cc.

References pow(), and tmp.

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

◆ do_zoom()

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

Definition at line 8220 of file graphics.cc.

References pow(), tmp, and val.

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

◆ dot()

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

Definition at line 5483 of file graphics.cc.

References v2.

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

◆ err_set_invalid()

static OCTAVE_NORETURN void err_set_invalid ( const std::string pname)
static

Definition at line 72 of file graphics.cc.

References error(), and pname.

◆ F__get_frame__()

◆ F__is_handle_visible__()

OCTAVE_EXPORT octave_value_list F__is_handle_visible__ ( const octave_value_list args,
int   
)

Definition at line 10592 of file graphics.cc.

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

◆ F__zoom__()

◆ Fget()

◆ finalize_r()

◆ Fishghandle()

OCTAVE_EXPORT octave_value_list Fishghandle ( const octave_value_list args,
int   
)

◆ for()

◆ force_close_figure()

static void force_close_figure ( const graphics_handle h)
static

Definition at line 2853 of file graphics.cc.

References delete_graphics_object(), h, and xset().

Referenced by gh_manager::do_close_all_figures().

◆ force_in_range()

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

Definition at line 8209 of file graphics.cc.

References x.

◆ Freset()

OCTAVE_EXPORT octave_value_list Freset ( const octave_value_list args,
int   
)

◆ Fwaitfor()

OCTAVE_EXPORT octave_value_list Fwaitfor ( const octave_value_list args,
int   
)

◆ gca()

graphics_handle gca ( void  )

Definition at line 2786 of file graphics.cc.

References gcf(), NaN(), val, and xget().

◆ gcf()

graphics_handle gcf ( void  )

Definition at line 2776 of file graphics.cc.

References NaN(), val, and xget().

Referenced by gca().

◆ get_array_limits()

template<typename T >
static void get_array_limits ( const Array< T > &  m,
double emin,
double emax,
double eminp,
double emaxp 
)
static

Definition at line 1002 of file graphics.cc.

References Array< T >::data(), e, i, octave::math::isinf(), and Array< T >::numel().

Referenced by array_property::get_data_limits().

◆ get_children_limits()

◆ get_graphics_object_type()

static std::string get_graphics_object_type ( double  val)
static

Definition at line 10905 of file graphics.cc.

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

Referenced by Fget().

◆ if() [1/10]

OCTAVE_EXPORT octave_value_list ishandle nd deftypefn* if ( args.length() !  = 1)

◆ if() [2/10]

if ( nargin  = =0)

Definition at line 598 of file file-io.cc.

◆ if() [3/10]

if ( request_drawnow  )

◆ if() [4/10]

if ( nargin< 3||nargin 4)

◆ if() [5/10]

if ( ! gh.  ok())

Definition at line 11814 of file graphics.cc.

◆ if() [6/10]

if ( args(0).isempty()  )

◆ if() [7/10]

◆ if() [8/10]

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

Definition at line 12298 of file graphics.cc.

References error(), max_arg_index, s, and timeout_index.

◆ if() [9/10]

if ( timeout_index >=  0)

Definition at line 12308 of file graphics.cc.

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

◆ if() [10/10]

if ( timeout  ,
 
)

◆ initialize_r()

◆ is_figure()

static bool is_figure ( double  val)
static

Definition at line 2952 of file graphics.cc.

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

◆ is_handle_visible() [1/3]

static bool is_handle_visible ( const graphics_handle h)
static

◆ is_handle_visible() [2/3]

static bool is_handle_visible ( double  val)
static

Definition at line 10561 of file graphics.cc.

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

◆ is_handle_visible() [3/3]

static octave_value is_handle_visible ( const octave_value val)
static

Definition at line 10567 of file graphics.cc.

References Array< T >::dims(), i, is_handle_visible(), Array< T >::numel(), result, retval, and val.

◆ is_hghandle() [1/3]

static bool is_hghandle ( const graphics_handle h)
static

Definition at line 2916 of file graphics.cc.

References h.

Referenced by is_hghandle().

◆ is_hghandle() [2/3]

static bool is_hghandle ( double  val)
static

Definition at line 2922 of file graphics.cc.

References h, gh_manager::lookup(), and val.

◆ is_hghandle() [3/3]

static octave_value is_hghandle ( const octave_value val)
static

Definition at line 2930 of file graphics.cc.

References Array< T >::dims(), i, is_hghandle(), Array< T >::numel(), result, retval, and val.

◆ lookup_object_name()

static bool lookup_object_name ( const caseless_str name,
caseless_str go_name,
caseless_str rest 
)
static

Definition at line 1031 of file graphics.cc.

References caseless_str::compare(), name, and result.

Referenced by property::create().

◆ magform()

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

Definition at line 7039 of file graphics.cc.

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

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

◆ make_graphics_object_from_type()

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 1110 of file graphics.cc.

References h, p, and type.

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

◆ make_handle_fraction()

static double make_handle_fraction ( void  )
static

◆ max_axes_scale()

static void max_axes_scale ( double s,
Matrix limits,
const Matrix kids,
double  pbfactor,
double  dafactor,
char  limit_type,
bool  tight 
)
static

◆ norm()

◆ normalize()

void normalize ( ColumnVector v)
inline

Definition at line 5476 of file graphics.cc.

References scale().

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

◆ normalized_aspectratios()

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

Definition at line 6403 of file graphics.cc.

References octave::math::min().

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

◆ ovl() [1/2]

◆ ovl() [2/2]

return ovl ( )

◆ papersize_from_type()

static Matrix papersize_from_type ( const caseless_str  punits,
const caseless_str  ptype 
)
static

Definition at line 4077 of file graphics.cc.

References caseless_str::compare(), and retval.

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

◆ reparent()

◆ scale() [1/2]

◆ scale() [2/2]

void scale ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5460 of file graphics.cc.

References x, and y.

◆ screen_size_pixels()

◆ set()

set ( hf  ,
"paperorientation"   
)

Definition at line 10814 of file graphics.cc.

◆ toggle_warn()

static int toggle_warn ( std::string  id,
bool  on,
int  state = -1 
)
static

◆ transform()

◆ translate() [1/2]

void translate ( Matrix m,
double  x,
double  y,
double  z 
)
inline

Definition at line 5448 of file graphics.cc.

References x, xform_translate(), and y.

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

◆ translate() [2/2]

void translate ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5468 of file graphics.cc.

References x, and y.

◆ unit_cube()

Matrix unit_cube ( void  )
inline

Definition at line 5507 of file graphics.cc.

References Array< T >::fortran_vec().

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

◆ validate_property_name()

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 82 of file graphics.cc.

References error(), string_vector::list_in_columns(), os, pname, string, and warning_with_id().

◆ viridis_colormap()

static Matrix viridis_colormap ( void  )
static

Definition at line 136 of file graphics.cc.

References Array< T >::fortran_vec().

◆ waitfor_del_listener()

static octave_value_list waitfor_del_listener ( const octave_value_list args,
int   
)
static

Definition at line 12125 of file graphics.cc.

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

Referenced by if().

◆ waitfor_listener()

static octave_value_list waitfor_listener ( const octave_value_list args,
int   
)
static

◆ while()

◆ xcreatefcn()

static void xcreatefcn ( const graphics_handle h)
static

Definition at line 2960 of file graphics.cc.

References gh_manager::get_object(), graphics_object::get_properties(), and h.

◆ xform()

◆ xform2cam()

RowVector xform2cam ( const ColumnVector v)
inline

Definition at line 5538 of file graphics.cc.

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

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

◆ xform_matrix()

Matrix xform_matrix ( void  )
inline

Definition at line 5377 of file graphics.cc.

References i.

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

◆ xform_scale()

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

Definition at line 5416 of file graphics.cc.

References x, and y.

Referenced by scale().

◆ xform_translate()

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

Definition at line 5429 of file graphics.cc.

References x, xform_matrix(), and y.

Referenced by translate().

◆ xform_vector() [1/2]

ColumnVector xform_vector ( void  )
inline

◆ xform_vector() [2/2]

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

Definition at line 5398 of file graphics.cc.

References x, and y.

◆ xget()

◆ xinitialize()

static void xinitialize ( const graphics_handle h)
static

Definition at line 2967 of file graphics.cc.

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

Referenced by axes::initialize().

◆ xreset_default_properties()

◆ xset() [1/2]

◆ xset() [2/2]

static void xset ( const graphics_handle h,
const octave_value_list args 
)
static

◆ xset_gcbo()

static void xset_gcbo ( const graphics_handle h)
static

Variable Documentation

◆ __pad0__

paperorientation __pad0__

Definition at line 10816 of file graphics.cc.

◆ ar

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 10929 of file graphics.cc.

◆ code

and the properties code {"units"}

Definition at line 10613 of file graphics.cc.

◆ delete_executing

bool delete_executing = false
static

Definition at line 2830 of file graphics.cc.

Referenced by delete_graphics_objects().

◆ dprop_obj_map

std::map<caseless_str, graphics_object> dprop_obj_map
static

Definition at line 1827 of file graphics.cc.

Referenced by property::create().

◆ eealso

nd group nd example eealso

Definition at line 10929 of file graphics.cc.

◆ executing_callbacks

callback_props executing_callbacks
static

Definition at line 1804 of file graphics.cc.

Referenced by callback_property::execute(), and base_properties::is_handle_visible().

◆ form

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 12177 of file graphics.cc.

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

◆ frame

Definition at line 12190 of file graphics.cc.

Referenced by QtHandles::ButtonGroup::ButtonGroup(), octave_mex_function::call(), octave_builtin::call(), octave_user_script::call(), octave_user_function::call(), call_mex(), QtHandles::ButtonGroup::create(), delete_graphics_objects(), do_edit_history(), gh_manager::do_execute_callback(), do_history(), do_rand(), do_run_history(), 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__(), Fdaspk(), Fdasrt(), Fdassl(), Flsode(), octave::flush_stdout(), Fquad(), octave::curl_transfer::ftp_file_or_dir_action(), G__delaunayn__(), G__eigs__(), G__voronoi__(), Gaudioread(), Gconvhulln(), generate_struct_completions(), get_data_and_bytesize(), octave::gl2ps_print(), octave::sys::glob(), octave::file_editor_tab::handle_context_menu_break_condition(), if(), octave_fcn_handle::load_ascii(), octave_fcn_handle::load_binary(), octave_fcn_handle::load_hdf5(), octave::dynamic_loader::load_mex(), octave::dynamic_loader::load_oct(), looks_like_struct(), make_stack_frame_list(), octave::tree_evaluator::make_value_list(), maybe_enter_debugger(), octave::tree_evaluator::maybe_push_echo_state_cleanup(), octave::tree::meets_bp_condition(), mexGetVariable(), mexPutVariable(), octave::base_url_transfer::mget_directory(), octave::base_url_transfer::mput_directory(), QtHandles::Panel::Panel(), pr_where(), octave_struct::print_raw(), octave_class::print_raw(), octave_scalar_struct::print_raw(), octave::tree_evaluator::push_echo_state(), octave::tree_evaluator::push_echo_state_cleanup(), 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(), octave::jit_convert::resolve(), run_command_and_return_output(), save_mat_binary_data(), octave::load_path::set(), 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(), 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(), octave::jit_convert::visit(), octave::tree_evaluator::visit_cell(), octave::tree_evaluator::visit_complex_for_command(), octave::jit_convert::visit_do_until_command(), octave::tree_evaluator::visit_do_until_command(), octave::tree_evaluator::visit_index_expression(), octave::tree_evaluator::visit_multi_assignment(), octave::tree_evaluator::visit_simple_assignment(), octave::jit_convert::visit_simple_for_command(), octave::tree_evaluator::visit_simple_for_command(), octave::tree_evaluator::visit_try_catch_command(), octave::jit_convert::visit_while_command(), octave::tree_evaluator::visit_while_command(), warning_1(), octave::sys::windows_glob(), and octave_oncleanup::~octave_oncleanup().

◆ gh

◆ h

double h = args(0).xdouble_value ("addlistener: invalid handle H")

Definition at line 11808 of file graphics.cc.

Referenced by base_properties::adopt(), adopt(), figure::properties::adopt(), close_figure(), octave::opengl_texture::create(), property::create(), graphics_event::create_callback_event(), graphics_event::create_set_event(), delete_graphics_object(), axes::properties::delete_text_child(), do_cleanup_waitfor_listener(), gh_manager::do_close_all_figures(), gh_manager::do_execute_callback(), gh_manager::do_execute_listener(), gh_manager::do_free(), gh_manager::do_make_figure_handle(), gh_manager::do_make_graphics_handle(), do_mgorth(), gh_manager::do_pop_figure(), gh_manager::do_post_callback(), gh_manager::do_post_set(), gh_manager::do_push_figure(), octave::opengl_renderer::draw_image(), drawLineChar(), QtHandles::ContextMenu::executeAt(), F__ftp_close__(), F__get_frame__(), F__zoom__(), base_graphics_toolkit::finalize(), graphics_toolkit::finalize(), finalize_r(), Fmgorth(), force_close_figure(), octave::url_handle_manager::free(), G__osmesa_print__(), octave::url_handle_manager::get_object(), H_insert(), H_remove_min(), octave::url_handle_manager::handle_list(), if(), hess< T >::init(), chol< T >::init(), base_graphics_toolkit::initialize(), graphics_toolkit::initialize(), initialize_r(), octave_fcn_handle::is_equal_to(), is_handle_visible(), is_hghandle(), make_graphics_object_from_type(), octave::url_handle_manager::make_url_handle(), QtHandles::Utils::makeImageFromCData(), handle_property::operator=(), QtHandles::Utils::properties(), octave::ft_text_renderer::push_new_line(), base_properties::remove_child(), root_figure::properties::remove_child(), figure::properties::remove_child(), axes::properties::remove_child(), reparent(), octave::set_interrupt_handler(), base_property::set_parent(), property::set_parent(), octave::opengl_renderer::set_viewport(), QUnixTerminalImpl::setSize(), QtHandles::ButtonGroup::update(), base_graphics_toolkit::update(), graphics_toolkit::update(), base_properties::update_axis_limits(), base_graphics_object::update_axis_limits(), axes::update_axis_limits(), hggroup::update_axis_limits(), octave::file_editor_tab::update_lexer_settings(), octave::ft_text_renderer::visit(), waitfor_listener(), while(), xcreatefcn(), xget(), xinitialize(), xreset_default_properties(), xset(), and xset_gcbo().

◆ hcv

ColumnVector hcv = args(0).xvector_value ("set: H must be a graphics handle")

Definition at line 10826 of file graphics.cc.

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

◆ id

◆ id_counter

uint32_t id_counter = 0
static

Definition at line 12192 of file graphics.cc.

Referenced by if().

◆ isfigure

OCTAVE_EXPORT octave_value_list isfigure

Definition at line 10525 of file graphics.cc.

◆ max_arg_index

int max_arg_index = 0

Definition at line 12195 of file graphics.cc.

Referenced by if().

◆ nargin

nd deftypefn* int nargin = args.length ()

Definition at line 10818 of file graphics.cc.

Referenced by graphics_object::set().

◆ ode

OCTAVE_EXPORT octave_value_list while another ode {waitfor} call is pending at the top-level. In the first form

Definition at line 12177 of file graphics.cc.

◆ pname

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

Definition at line 11810 of file graphics.cc.

Referenced by octave::load_path::add(), base_properties::add_listener(), base_graphics_object::build_user_defaults_map(), octave_fcn_handle::call(), base_properties::delete_listener(), do_cleanup_waitfor_listener(), pval_vector::erase(), err_set_invalid(), pval_vector::find(), cdef_object::get(), cdef_object_scalar::get(), base_properties::get(), base_graphics_object::get_default(), axes::get_default(), uitoolbar::get_default(), base_properties::get_dynamic(), cdef_object::get_property(), mxArray_octave_value::get_property(), cdef_object_array::get_property(), mxArray::get_property(), cdef_object_scalar::get_property(), base_properties::get_property_dynamic(), base_properties::has_dynamic_property(), if(), pval_vector::lookup(), property_list::lookup(), octave::load_path::move(), octave_set_program_name_wrapper(), caseless_str::operator=(), pval_vector::operator[](), cdef_object::put(), cdef_object_scalar::put(), octave::load_path::remove(), reparent(), property_list::set(), graphics_object::set(), base_properties::set_dynamic(), base_properties::set_from_list(), cdef_object::set_property(), mxArray_octave_value::set_property(), cdef_object_array::set_property(), cdef_object_scalar::set_property(), mxArray::set_property(), graphics_object::set_value_or_default(), octave::split_name_with_package(), validate_property_name(), base_graphics_object::values_as_string(), base_graphics_object::values_as_struct(), waitfor_listener(), while(), xget(), xreset_default_properties(), and xset().

◆ request_drawnow

bool request_drawnow = false

Definition at line 10828 of file graphics.cc.

Referenced by for().

◆ retval

◆ start

◆ timeout

◆ timeout_index

int timeout_index = -1

Definition at line 12196 of file graphics.cc.

Referenced by if().

◆ updating_aspectratios

std::set<double> updating_aspectratios
static

◆ updating_axes_layout

bool updating_axes_layout = false
static

Definition at line 5757 of file graphics.cc.

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

◆ updating_axis_limits

std::set<double> updating_axis_limits
static

Definition at line 7778 of file graphics.cc.

Referenced by axes::update_axis_limits().

◆ updating_hggroup_limits

bool updating_hggroup_limits = false
static

Definition at line 9201 of file graphics.cc.

Referenced by hggroup::update_axis_limits().

◆ updating_patch_data

bool updating_patch_data = false
static

Definition at line 8872 of file graphics.cc.

◆ updating_title_position

bool updating_title_position = false
static

Definition at line 6337 of file graphics.cc.

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

◆ updating_xlabel_position

bool updating_xlabel_position = false
static

Definition at line 6002 of file graphics.cc.

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

◆ updating_ylabel_position

bool updating_ylabel_position = false
static

Definition at line 6103 of file graphics.cc.

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

◆ updating_zlabel_position

bool updating_zlabel_position = false
static

Definition at line 6213 of file graphics.cc.

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

◆ waitfor_results

nd group nd example bool waitfor_results

Definition at line 11965 of file graphics.cc.

Referenced by cleanup_waitfor_id(), if(), waitfor_del_listener(), waitfor_listener(), and while().