cgv
Loading...
Searching...
No Matches
cgv::plot::plot2d Class Reference

The plot2d class draws 2d plots with potentially several sub plots of different chart types. More...

#include <plot2d.h>

Inheritance diagram for cgv::plot::plot2d:
cgv::plot::plot_base cgv::render::drawable cgv::base::traverse_policy

Public Member Functions

 plot2d (const std::string &title, unsigned nr_attributes=0)
 construct 2D plot with given number of additional attributes and default parameters
 
plot2doperator= (const plot2d &)=delete
 prevent copy and assignment for now until properly implemented
 
 plot2d (const plot2d &)=delete
 
management of sub plots
unsigned add_sub_plot (const std::string &name)
 add sub plot and return sub plot index
 
void delete_sub_plot (unsigned i)
 delete the i-th sub plot
 
plot2d_configref_sub_plot2d_config (unsigned i=0)
 return a reference to the plot1d configuration of the i-th plot
 
std::vector< vec2 > & ref_sub_plot_samples (unsigned i=0)
 return the samples of the i-th sub plot
 
std::vector< unsigned > & ref_sub_plot_strips (unsigned i=0)
 return the strip definition of the i-th sub plot
 
bool init (cgv::render::context &ctx)
 construct shader programs
 
void draw (cgv::render::context &ctx)
 draw plot
 
void clear (cgv::render::context &ctx)
 destruct shader programs
 
void create_point_config_gui (cgv::base::base *bp, cgv::gui::provider &p, plot_base_config &pbc)
 create the gui for a point subplot
 
void create_stick_config_gui (cgv::base::base *bp, cgv::gui::provider &p, plot_base_config &pbc)
 create the gui for a stick subplot
 
void create_bar_config_gui (cgv::base::base *bp, cgv::gui::provider &p, plot_base_config &pbc)
 create the gui for a bar subplot
 
void create_config_gui (cgv::base::base *bp, cgv::gui::provider &p, unsigned i)
 create the gui for a subplot configuration
 
void create_gui (cgv::base::base *bp, cgv::gui::provider &p)
 create a gui for the plot with gui for all configs
 
- Public Member Functions inherited from cgv::plot::plot_base
void set_label_font (float font_size, cgv::media::font::FontFaceAttributes ffa=cgv::media::font::FFA_REGULAR, const std::string &font_name="")
 configure the label font
 
const domain_configget_domain_config_ptr () const
 return const pointer to domain configuration
 
domain_configget_domain_config_ptr ()
 return pointer to domain configuration
 
void set_domain_config_ptr (domain_config *_new_ptr)
 set the domain configuration to an external configuration in order to synch several plots, if set to null, the internal domain config is used again
 
const box2 get_domain () const
 return 2d domain shown in plot
 
const box3 get_domain3 () const
 return 3d domain shown in plot
 
void set_domain (const box2 &dom)
 set the domain for 2d plots
 
void set_domain3 (const box3 &dom)
 set the domain for 3d plots
 
void set_extent (const vecn &new_extent)
 set the plot extend in 2D coordinates
 
vecn get_extent () const
 query the plot extend in 2D coordinates
 
void set_extent_scaling (float x_scale, float y_scale, float z_scale=0)
 set extent_scaling values for all axes
 
void set_width (float new_width, bool constrained=true)
 set the plot width to given value and if constrained == true the height, such that the aspect ration is the same as the aspect ratio of the domain
 
void set_height (float new_height, bool constrained=true)
 set the plot height to given value and if constrained == true the width, such that the aspect ration is the same as the aspect ratio of the domain
 
void set_orientation (const quat &_orientation)
 set new orientation quaternion
 
void place_origin (const vec3 &new_origin_location)
 place the origin of the plot in 3D to the given location
 
void place_center (const vec3 &new_center_location)
 place the plot extent center in 3D to the given location (this might can change the current origin location)
 
void place_corner (unsigned corner_index, const vec3 &new_corner_location)
 place a corner (0 .. lower left, 1 .. lower right, 2 .. upper left, 3 .. upper right) to a given 3D location ((this might can change the current origin / center location)
 
vec3 get_origin () const
 return the current origin in 3D coordinates
 
const quatget_orientation () const
 get current orientation quaternion
 
const vec3get_center () const
 return the current plot center in 3D coordinates
 
vec3 get_corner (unsigned i) const
 return the i-th plot corner in 3D coordinates
 
const vec3 get_axis_direction (unsigned ai) const
 return true world direction of x, y or z axis
 
bool determine_axis_extent_from_subplot (unsigned ai, unsigned i, float &sample_min, float &sample_max)
 adjust the domain with respect to ai th axis to the i-th subplot
 
void adjust_domain_axis_to_data (unsigned ai, bool adjust_min=true, bool adjust_max=true, bool only_visible=true)
 adjust the domain with respect to ai th axis to the visible or all data depending on last parameter
 
void adjust_domain_to_data (bool only_visible=true)
 adjust selected axes of domain to the visible or all data depending on last parameter
 
void include_axis_to_domain (unsigned ai)
 extend domain such that given axis is included
 
void adjust_tick_marks (unsigned max_nr_secondary_ticks=20, bool adjust_to_attribute_ranges=true)
 adjust tick marks of all axes based on maximum number of secondary ticks and domain min and max in coordinate of axis
 
void adjust_extent_to_domain_aspect_ratio (int preserve_ai=0)
 adjust the extent such that it has same aspect ration as domain
 
unsigned get_nr_sub_plots () const
 return current number of sub plots
 
plot_base_configref_sub_plot_config (unsigned i)
 return a reference to the plot base configuration of the i-th plot
 
void set_samples_out_of_date (unsigned i)
 notify plot that samples of given subplot are out of date
 
void set_sub_plot_colors (unsigned i, const rgb &base_color)
 set the colors for all plot features of the i-th sub plot as variation of the given color
 
void set_sub_plot_attribute (unsigned i, unsigned ai, int subplot_index, size_t aj)
 define a sub plot attribute ai from coordinate aj of the i-th internal sample container
 
void set_sub_plot_attribute (unsigned i, unsigned ai, const float *_pointer, size_t count, size_t stride)
 define a sub plot attribute from an external pointer
 
void set_sub_plot_attribute (unsigned i, unsigned ai, const cgv::render::vertex_buffer *_vbo_ptr, size_t _offset, size_t _count, size_t _stride)
 define a sub plot attribute from a vbo (attribute must be stored in float type in vbo)
 
bool init (cgv::render::context &ctx)
 build legend prog and create aab
 
void clear (cgv::render::context &ctx)
 destruct shader programs
 
 plot_base (unsigned dim, unsigned nr_attributes=0)
 construct from plot dimension and number of additional attributes with default parameters
 
unsigned get_dim () const
 return nr dimensions of plot
 
void set_view_ptr (cgv::render::view *_view_ptr)
 set the view ptr
 
void ensure_font_names ()
 ensure that font names have been enumerate
 
virtual void create_plot_gui (cgv::base::base *bp, cgv::gui::provider &p)
 create the gui for the plot without gui for sub plots
 
virtual void create_base_config_gui (cgv::base::base *bp, cgv::gui::provider &p, unsigned i)
 create the gui for base subplot settings
 
virtual void create_line_config_gui (cgv::base::base *bp, cgv::gui::provider &p, plot_base_config &pbc)
 create the gui for a line subplot
 
- Public Member Functions inherited from cgv::render::drawable
 drawable ()
 default construction
 
void hide ()
 hide the drawable
 
void show ()
 show the drawable
 
bool is_visible () const
 check whether the drawable is visible
 
contextget_context () const
 access the current context. The context will be available latestly in the init method but not in the contructor.
 
void set_context (context *_ctx)
 set the current focus context, this should only be called by the context itself
 
viewfind_view_as_node (size_t view_idx=0) const
 convenience function to find the view control in the current hierarchy
 
bool get_world_location (int x, int y, const view &V, dvec3 &world_location, double *window_z_ptr=0) const
 use given view together with depth buffer of context in order to compute the world location of the point at mouse pointer location (x,y)
 
void post_redraw ()
 posts a redraw event to the current context if one is available
 
void force_redraw ()
 forces a redraw right now. This cannot be called from init, init_frame, draw, finish_draw, finish_frame and clear
 
virtual void resize (unsigned int w, unsigned int h)
 callback to announce resizing of the output window
 
virtual void init_frame (context &)
 this method is called in one pass over all drawables before the draw method
 
virtual void finish_draw (context &)
 this method is called when the current drawable is left in a tree traversal that calls the draw method
 
virtual void finish_frame (context &)
 this method is called in one pass over all drawables after drawing
 
virtual void after_finish (context &)
 this method is called in one pass over all drawables after finish frame
 
- Public Member Functions inherited from cgv::base::traverse_policy
 traverse_policy (int _policy=TP_ALL+TP_STOP_ON_SUCCESS, bool _active=true, int _focus=-1)
 construct default traverse policy that visits everything
 
int get_policy () const
 return the policy without the stop on success flag
 
bool stop_on_success () const
 return whether to stop on success
 
bool stop_on_failure () const
 return whether to stop on failure
 
void set_policy (int _policy)
 set a new policy, always add stop on success flag if needed
 
int get_focused_child () const
 return the focused child or -1 if none is focused
 
void set_focused_child (int _focused_child)
 set the focused child
 
bool get_active () const
 return whether the current node is active
 
void set_active (bool _active)
 set the active flag of the current node
 

Public Attributes

bool disable_depth_mask
 
bool * multi_axis_modes
 whether to manage separate axes for each sub plot
 
vec3 sub_plot_delta
 offset in between sub plots in x, y and z direction
 
- Public Attributes inherited from cgv::plot::plot_base
LegendComponent legend_components
 whether to show legend
 
vec3 legend_location
 center location of legend in domain coordinates
 
vec2 legend_extent
 width of legend
 
int legend_axis
 coordinate direction along which to draw legend
 
rgba legend_color
 color and opacity of legend
 
ivec4 out_of_range_mode
 handling of values that are out of range
 
int color_mapping [MAX_NR_COLOR_MAPPINGS]
 index of attribute mapped to primary and secondary color
 
cgv::media::ColorScale color_scale_index [MAX_NR_COLOR_MAPPINGS]
 color scale indices of primary and secondary color mapping
 
float color_scale_gamma [MAX_NR_COLOR_MAPPINGS]
 gamma adjustments for primary and secondary color mapping
 
float window_zero_position [MAX_NR_COLOR_MAPPINGS]
 window space position of zero for primary and secondary color mapping
 
int opacity_mapping [MAX_NR_OPACITY_MAPPINGS]
 index of attribute mapped to primary and secondary opacity
 
float opacity_gamma [MAX_NR_OPACITY_MAPPINGS]
 gamma adjustments for primary and secondary opacity mapping
 
bool opacity_is_bipolar [MAX_NR_OPACITY_MAPPINGS]
 flag whether opacity mapping is bipolar for primary and secondary opacity mapping
 
float opacity_window_zero_position [MAX_NR_OPACITY_MAPPINGS]
 window space position of zero for primary and secondary opacity mapping
 
float opacity_min [MAX_NR_OPACITY_MAPPINGS]
 minimum opacity value for primary and secondary opacity mapping
 
float opacity_max [MAX_NR_OPACITY_MAPPINGS]
 maximum opacity value for primary and secondary opacity mapping
 
int size_mapping [MAX_NR_SIZE_MAPPINGS]
 index of attribute mapped to size
 
float size_gamma [MAX_NR_SIZE_MAPPINGS]
 and independent gamma adjustments
 
float size_min [MAX_NR_SIZE_MAPPINGS]
 min and max of mapped size
 
float size_max [MAX_NR_SIZE_MAPPINGS]
 

Protected Member Functions

bool draw_point_plot (cgv::render::context &ctx, int si, int layer_idx)
 
bool draw_line_plot (cgv::render::context &ctx, int si, int layer_idx)
 
bool draw_stick_plot (cgv::render::context &ctx, int si, int layer_idx)
 
void configure_bar_plot (cgv::render::context &ctx)
 
bool draw_bar_plot (cgv::render::context &ctx, int si, int layer_idx)
 
int draw_sub_plots_jointly (cgv::render::context &ctx, int layer_idx)
 
void extract_domain_rectangles (std::vector< box2 > &R, std::vector< rgb > &C, std::vector< float > &D)
 
void extract_domain_tick_rectangles_and_tick_labels (std::vector< box2 > &R, std::vector< rgb > &C, std::vector< float > &D, std::vector< label_info > &tick_labels, std::vector< tick_batch_info > &tick_batches)
 
void draw_domain (cgv::render::context &ctx, int si=-1, bool no_fill=false)
 
bool compute_sample_coordinate_interval (int i, int ai, float &samples_min, float &samples_max)
 
- Protected Member Functions inherited from cgv::plot::plot_base
vec3 world_space_from_plot_space (const vecn &pnt_plot) const
 
vec3 transform_to_world (const vecn &pnt_attr) const
 transform from attribute space to world space
 
void on_legend_axis_change (cgv::gui::provider &p, cgv::gui::control< int > &ctrl)
 
void on_font_selection ()
 callback to change fonts
 
void on_font_face_selection ()
 callback to change font face
 
void prepare_extents ()
 prepare extents for drawing
 
void set_plot_uniforms (cgv::render::context &ctx, cgv::render::shader_program &prog)
 set the uniforms for plot configurations
 
void set_mapping_uniforms (cgv::render::context &ctx, cgv::render::shader_program &prog)
 set the uniforms for defining the mappings to visual variables
 
void draw_rectangles (cgv::render::context &ctx, cgv::render::attribute_array_manager &aam, std::vector< box2 > &R, std::vector< rgb > &C, std::vector< float > &D, size_t offset=0)
 
void draw_tick_labels (cgv::render::context &ctx, cgv::render::attribute_array_manager &aam_ticks, std::vector< label_info > &tick_labels, std::vector< tick_batch_info > &tick_batches, float depth)
 
size_t enable_attributes (cgv::render::context &ctx, int i, const std::vector< std::vector< vec2 > > &samples)
 set vertex shader input attributes based on attribute source information
 
size_t enable_attributes (cgv::render::context &ctx, int i, const std::vector< std::vector< vec3 > > &samples)
 set vertex shader input attributes based on attribute source information
 
void disable_attributes (cgv::render::context &ctx, int i)
 
void update_samples_out_of_date_flag ()
 
void draw_sub_plot_samples (int count, const plot_base_config &spc, bool strip=false)
 
void draw_title (cgv::render::context &ctx, vec2 pos, float depth, int si=-1)
 
void draw_legend (cgv::render::context &ctx, int layer_idx=0, bool is_first=true, bool *multi_axis_modes=0)
 
bool extract_tick_rectangles_and_tick_labels (std::vector< box2 > &R, std::vector< rgb > &C, std::vector< float > &D, std::vector< label_info > &tick_labels, int ai, int ci, int ti, float he, float z_plot, float plot_scale=1.0f, vec2 plot_offset=vec2(0.0f, 0.0f), float d=0.0f, bool multi_axis=true)
 
void extract_legend_tick_rectangles_and_tick_labels (std::vector< box2 > &R, std::vector< rgb > &C, std::vector< float > &D, std::vector< label_info > &tick_labels, std::vector< tick_batch_info > &tick_batches, float d, bool clear_cache=false, bool is_first=true, bool *multi_axis_modes=0)
 
void update_ref_opacity (unsigned i, cgv::gui::provider &p)
 
void update_ref_opacity_index (unsigned i, cgv::gui::provider &p)
 
void update_ref_size (unsigned i, cgv::gui::provider &p)
 
void update_ref_size_index (unsigned i, cgv::gui::provider &p)
 
void update_ref_color (unsigned i, cgv::gui::provider &p)
 
void update_ref_color_index (unsigned i, cgv::gui::provider &p)
 

Protected Attributes

cgv::render::shader_program line_prog
 
cgv::render::shader_program point_prog
 
cgv::render::shader_program rectangle_prog
 
std::vector< std::vector< vec2 > > samples
 store 2d samples for data series
 
std::vector< std::vector< unsigned > > strips
 allow to split series into connected strips that are represented by the number of contained samples
 
cgv::render::attribute_array_manager aam_domain
 attribute managers for domain rectangles and domain tick labels
 
cgv::render::attribute_array_manager aam_domain_tick_labels
 
- Protected Attributes inherited from cgv::plot::plot_base
unsigned dim
 dimension of plot
 
unsigned nr_attributes
 number of additional attributes
 
domain_config dom_cfg
 domain configuration
 
domain_configdom_cfg_ptr
 pointer to currently used domain config
 
std::vector< plot_base_config * > configs
 store one configuration per sub plot
 
cgv::render::viewview_ptr
 
std::vector< label_infotick_labels
 all tick labels
 
std::vector< label_infolegend_tick_labels
 
std::vector< tick_batch_infotick_batches
 twice number of axis pairs with index of first tick label and number of tick labels for primary and secondary ticks
 
std::vector< tick_batch_infolegend_tick_batches
 
float layer_depth
 depth offset of a single layer
 
quat orientation
 orientiation quaternion mapping from domain to world coordinates
 
vec3 center_location
 center location of domain in world coordinates
 
cgv::media::font::font_ptr label_font
 store pointer to label font
 
cgv::media::font::font_face_ptr label_font_face
 store pointer to label font face
 
cgv::media::font::font_ptr title_font
 store pointer to title font
 
cgv::media::font::font_face_ptr title_font_face
 store pointer to title font face
 
cgv::render::vertex_buffer vbo_legend
 vbo for legend drawing
 
cgv::render::attribute_array_binding aab_legend
 manage attributes for legend drawing
 
std::vector< attribute_source_arrayattribute_source_arrays
 attribute sources
 
vec3 extent
 extents used for drawing current
 
cgv::render::rectangle_render_style rrs
 render style of rectangles
 
cgv::render::rectangle_render_style font_rrs
 
cgv::render::attribute_array_manager aam_legend
 
cgv::render::attribute_array_manager aam_legend_ticks
 
cgv::render::attribute_array_manager aam_title
 
- Protected Attributes inherited from cgv::base::traverse_policy
TraversePolicy policy
 
bool active
 
int focus
 

Additional Inherited Members

- Static Public Attributes inherited from cgv::plot::plot_base
static const unsigned MAX_NR_COLOR_MAPPINGS = 2
 define maximum number of color mappings
 
static const unsigned MAX_NR_OPACITY_MAPPINGS = 2
 define maximum number of opacity mappings
 
static const unsigned MAX_NR_SIZE_MAPPINGS = 2
 define maximum number of size mappings
 
- Static Protected Attributes inherited from cgv::plot::plot_base
static std::vector< const char * > font_names
 store a vector with all fonts on the system
 
static std::string font_name_enum_def
 concatenate font names to enum definition for dropdown control
 

Detailed Description

The plot2d class draws 2d plots with potentially several sub plots of different chart types.

Definition at line 25 of file plot2d.h.

Constructor & Destructor Documentation

◆ plot2d()

cgv::plot::plot2d::plot2d ( const std::string &  title,
unsigned  nr_attributes = 0 
)

construct 2D plot with given number of additional attributes and default parameters

construct empty plot with default domain [0..1,0..1]

Definition at line 24 of file plot2d.cxx.

References cgv::plot::domain_config::axis_configs, cgv::plot::plot_base::get_domain_config_ptr(), multi_axis_modes, cgv::plot::plot_base::nr_attributes, sub_plot_delta, cgv::plot::domain_config::title, and cgv::utils::to_string().

◆ ~plot2d()

cgv::plot::plot2d::~plot2d ( )

Definition at line 39 of file plot2d.cxx.

Member Function Documentation

◆ add_sub_plot()

unsigned cgv::plot::plot2d::add_sub_plot ( const std::string &  name)
virtual

◆ clear()

void cgv::plot::plot2d::clear ( cgv::render::context ctx)
virtual

destruct shader programs

Reimplemented from cgv::render::drawable.

Definition at line 142 of file plot2d.cxx.

◆ compute_sample_coordinate_interval()

bool cgv::plot::plot2d::compute_sample_coordinate_interval ( int  i,
int  ai,
float &  samples_min,
float &  samples_max 
)
protectedvirtual

Implements cgv::plot::plot_base.

Definition at line 44 of file plot2d.cxx.

◆ configure_bar_plot()

void cgv::plot::plot2d::configure_bar_plot ( cgv::render::context ctx)
protected

Definition at line 276 of file plot2d.cxx.

◆ create_bar_config_gui()

void cgv::plot::plot2d::create_bar_config_gui ( cgv::base::base bp,
cgv::gui::provider p,
plot_base_config pbc 
)
virtual

create the gui for a bar subplot

Reimplemented from cgv::plot::plot_base.

Definition at line 660 of file plot2d.cxx.

◆ create_config_gui()

void cgv::plot::plot2d::create_config_gui ( cgv::base::base bp,
cgv::gui::provider p,
unsigned  i 
)
virtual

create the gui for a subplot configuration

Reimplemented from cgv::plot::plot_base.

Definition at line 666 of file plot2d.cxx.

◆ create_gui()

void cgv::plot::plot2d::create_gui ( cgv::base::base bp,
cgv::gui::provider p 
)
virtual

create a gui for the plot with gui for all configs

Reimplemented from cgv::plot::plot_base.

Definition at line 671 of file plot2d.cxx.

References cgv::gui::provider::add_member_control(), cgv::gui::provider::align(), cgv::gui::provider::begin_tree_node(), and cgv::gui::provider::end_tree_node().

◆ create_point_config_gui()

void cgv::plot::plot2d::create_point_config_gui ( cgv::base::base bp,
cgv::gui::provider p,
plot_base_config pbc 
)
virtual

create the gui for a point subplot

Reimplemented from cgv::plot::plot_base.

Definition at line 646 of file plot2d.cxx.

◆ create_stick_config_gui()

void cgv::plot::plot2d::create_stick_config_gui ( cgv::base::base bp,
cgv::gui::provider p,
plot_base_config pbc 
)
virtual

create the gui for a stick subplot

Reimplemented from cgv::plot::plot_base.

Definition at line 653 of file plot2d.cxx.

◆ delete_sub_plot()

void cgv::plot::plot2d::delete_sub_plot ( unsigned  i)
virtual

delete the i-th sub plot

Implements cgv::plot::plot_base.

Definition at line 91 of file plot2d.cxx.

References cgv::plot::plot_base::configs, samples, and strips.

◆ draw()

◆ draw_bar_plot()

bool cgv::plot::plot2d::draw_bar_plot ( cgv::render::context ctx,
int  si,
int  layer_idx 
)
protected

Definition at line 292 of file plot2d.cxx.

◆ draw_domain()

void cgv::plot::plot2d::draw_domain ( cgv::render::context ctx,
int  si = -1,
bool  no_fill = false 
)
protected

Definition at line 518 of file plot2d.cxx.

◆ draw_line_plot()

bool cgv::plot::plot2d::draw_line_plot ( cgv::render::context ctx,
int  si,
int  layer_idx 
)
protected

Definition at line 191 of file plot2d.cxx.

◆ draw_point_plot()

bool cgv::plot::plot2d::draw_point_plot ( cgv::render::context ctx,
int  si,
int  layer_idx 
)
protected

Definition at line 152 of file plot2d.cxx.

◆ draw_stick_plot()

bool cgv::plot::plot2d::draw_stick_plot ( cgv::render::context ctx,
int  si,
int  layer_idx 
)
protected

Definition at line 240 of file plot2d.cxx.

◆ draw_sub_plots_jointly()

int cgv::plot::plot2d::draw_sub_plots_jointly ( cgv::render::context ctx,
int  layer_idx 
)
protected

Definition at line 330 of file plot2d.cxx.

◆ extract_domain_rectangles()

void cgv::plot::plot2d::extract_domain_rectangles ( std::vector< box2 > &  R,
std::vector< rgb > &  C,
std::vector< float > &  D 
)
protected

Definition at line 356 of file plot2d.cxx.

◆ extract_domain_tick_rectangles_and_tick_labels()

void cgv::plot::plot2d::extract_domain_tick_rectangles_and_tick_labels ( std::vector< box2 > &  R,
std::vector< rgb > &  C,
std::vector< float > &  D,
std::vector< label_info > &  tick_labels,
std::vector< tick_batch_info > &  tick_batches 
)
protected

Definition at line 494 of file plot2d.cxx.

◆ init()

bool cgv::plot::plot2d::init ( cgv::render::context ctx)
virtual

construct shader programs

Reimplemented from cgv::render::drawable.

Definition at line 117 of file plot2d.cxx.

References aam_domain, and cgv::render::shader_program::build_program().

◆ ref_sub_plot2d_config()

plot2d_config & cgv::plot::plot2d::ref_sub_plot2d_config ( unsigned  i = 0)

return a reference to the plot1d configuration of the i-th plot

return a reference to the plot base configuration of the i-th plot

Definition at line 101 of file plot2d.cxx.

References cgv::plot::plot_base::ref_sub_plot_config().

Referenced by add_sub_plot().

◆ ref_sub_plot_samples()

std::vector< vec2 > & cgv::plot::plot2d::ref_sub_plot_samples ( unsigned  i = 0)

return the samples of the i-th sub plot

Definition at line 106 of file plot2d.cxx.

References samples.

◆ ref_sub_plot_strips()

std::vector< unsigned > & cgv::plot::plot2d::ref_sub_plot_strips ( unsigned  i = 0)

return the strip definition of the i-th sub plot

Definition at line 112 of file plot2d.cxx.

References strips.

Member Data Documentation

◆ aam_domain

cgv::render::attribute_array_manager cgv::plot::plot2d::aam_domain
protected

attribute managers for domain rectangles and domain tick labels

Definition at line 51 of file plot2d.h.

Referenced by init().

◆ aam_domain_tick_labels

cgv::render::attribute_array_manager cgv::plot::plot2d::aam_domain_tick_labels
protected

Definition at line 51 of file plot2d.h.

◆ disable_depth_mask

bool cgv::plot::plot2d::disable_depth_mask

Definition at line 53 of file plot2d.h.

◆ line_prog

cgv::render::shader_program cgv::plot::plot2d::line_prog
protected

Definition at line 28 of file plot2d.h.

◆ multi_axis_modes

bool* cgv::plot::plot2d::multi_axis_modes

whether to manage separate axes for each sub plot

Definition at line 55 of file plot2d.h.

Referenced by plot2d().

◆ point_prog

cgv::render::shader_program cgv::plot::plot2d::point_prog
protected

Definition at line 29 of file plot2d.h.

◆ rectangle_prog

cgv::render::shader_program cgv::plot::plot2d::rectangle_prog
protected

Definition at line 30 of file plot2d.h.

◆ samples

std::vector<std::vector<vec2> > cgv::plot::plot2d::samples
protected

store 2d samples for data series

Definition at line 47 of file plot2d.h.

Referenced by add_sub_plot(), delete_sub_plot(), and ref_sub_plot_samples().

◆ strips

std::vector<std::vector<unsigned> > cgv::plot::plot2d::strips
protected

allow to split series into connected strips that are represented by the number of contained samples

Definition at line 49 of file plot2d.h.

Referenced by add_sub_plot(), delete_sub_plot(), and ref_sub_plot_strips().

◆ sub_plot_delta

vec3 cgv::plot::plot2d::sub_plot_delta

offset in between sub plots in x, y and z direction

Definition at line 57 of file plot2d.h.

Referenced by plot2d().


The documentation for this class was generated from the following files: