NEURON
Graph Class Reference

#include <graph.h>

Inheritance diagram for Graph:
Scene Observable ShapeScene PPShape

Public Types

enum  { CROSSHAIR = Scene::EXTRATOOL , CHANGELABEL , PICK , EXTRAGRAPHTOOL }
 
- Public Types inherited from Scene
enum  {
  NOTOOL = 0 , MOVE , DELETE , CHANGECOLOR ,
  EXTRATOOL
}
 

Public Member Functions

 Graph (bool=true)
 
virtual ~Graph ()
 
void axis (DimensionName, float min, float max, float pos=0., int ntics=-1, int nminor=0, int invert=0, bool number=true)
 
GraphLineadd_var (const char *, const Color *, const Brush *, bool usepointer, int fixtype=1, neuron::container::data_handle< double > p={}, const char *lab=NULL, Object *obj=NULL)
 
void x_expr (const char *, bool usepointer)
 
void add_polyline (GPolyLine *)
 
void add_graphVector (GraphVector *)
 
void begin ()
 
void plot (float)
 
void flush ()
 
void fast_flush ()
 
void begin_line (const char *s=NULL)
 
void begin_line (const Color *, const Brush *, const char *s=NULL)
 
void line (Coord x, Coord y)
 
void mark (Coord x, Coord y, char style='+', float size=12, const Color *=NULL, const Brush *=NULL)
 
void erase ()
 
virtual void erase_all ()
 
void erase_lines ()
 
virtual void delete_label (GLabel *)
 
virtual bool change_label (GLabel *, const char *, GLabel *gl=NULL)
 
virtual void help ()
 
void keep_lines ()
 
void keep_lines_toggle ()
 
void family (bool)
 
void family (const char *)
 
void family_label_chooser ()
 
void new_axis ()
 
void erase_axis ()
 
void view_axis ()
 
void view_box ()
 
void change_prop ()
 
void color (int)
 
void brush (int)
 
const Colorcolor () const
 
const Brushbrush () const
 
void set_cross_action (const char *, Object *, bool vectorcopy=false)
 
void cross_action (char, GPolyLine *, int)
 
void cross_action (char, Coord, Coord)
 
void simgraph ()
 
virtual void draw (Canvas *, const Allocation &) const
 
virtual void pick (Canvas *, const Allocation &, int depth, Hit &)
 
virtual GlyphIndex glyph_index (const Glyph *)
 
virtual void new_size (Coord x1, Coord y1, Coord x2, Coord y2)
 
virtual void wholeplot (Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
 
GLabellabel (float x, float y, const char *s, int fixtype, float scale, float x_align, float y_align, const Color *)
 
GLabellabel (float x, float y, const char *s, float n=0, int fixtype=-1)
 
GLabellabel (const char *s, int fixtype=-1)
 
GLabelnew_proto_label () const
 
void fixed (float scale)
 
void vfixed (float scale)
 
void relative (float scale)
 
void align (float x, float y)
 
void choose_sym ()
 
void name (char *)
 
void change_label_color (GLabel *)
 
void change_line_color (GPolyLine *)
 
virtual void save_phase1 (std::ostream &)
 
virtual void save_phase2 (std::ostream &)
 
int labeltype () const
 
virtual void see_range_plot (GraphVector *)
 
- Public Member Functions inherited from Scene
 Scene (Coord x1, Coord y1, Coord x2, Coord y2, Glyph *background=NULL)
 
virtual ~Scene ()
 
virtual void background (Glyph *bg=NULL)
 
virtual Coord x1 () const
 
virtual Coord y1 () const
 
virtual Coord x2 () const
 
virtual Coord y2 () const
 
virtual int view_count () const
 
virtual XYViewsceneview (int) const
 
virtual void dismiss ()
 
virtual void printfile (const char *)
 
virtual void modified (GlyphIndex)
 
void move (GlyphIndex, Coord x, Coord y)
 
void location (GlyphIndex, Coord &x, Coord &y) const
 
void show (GlyphIndex, bool)
 
bool showing (GlyphIndex) const
 
virtual void damage (GlyphIndex)
 
virtual void damage (Coord x1, Coord y1, Coord x2, Coord y2)
 
virtual void damage_all ()
 
virtual void tool (int)
 
virtual int tool ()
 
virtual void request (Requisition &) const
 
virtual void allocate (Canvas *, const Allocation &, Extension &)
 
virtual void print (Printer *, const Allocation &) const
 
virtual void append (Glyph *)
 
virtual void append_fixed (Glyph *)
 
virtual void append_viewfixed (Glyph *)
 
virtual void prepend (Glyph *)
 
virtual void insert (GlyphIndex, Glyph *)
 
virtual void remove (GlyphIndex)
 
virtual void replace (GlyphIndex, Glyph *)
 
virtual void change (GlyphIndex)
 
virtual void change_to_fixed (GlyphIndex, XYView *)
 
virtual void change_to_vfixed (GlyphIndex, XYView *)
 
virtual GlyphIndex count () const
 
virtual Glyphcomponent (GlyphIndex) const
 
virtual void allotment (GlyphIndex, DimensionName, Allotment &) const
 
bool drawing_fixed_item () const
 
bool mark ()
 
void mark (bool m)
 
virtual Coord mbs () const
 
ScenePickerpicker ()
 
Objecthoc_obj_ptr ()
 
void hoc_obj_ptr (Object *o)
 
bool menu_picked ()
 
- Public Member Functions inherited from Observable
 Observable ()=default
 
virtual ~Observable ()
 
virtual void attach (Observer *)
 
virtual void detach (Observer *)
 
virtual void notify ()
 

Static Public Member Functions

static bool label_chooser (const char *, char *, GLabel *, Coord x=400., Coord y=400.)
 
static void ascii (std::ostream *)
 
static std::ostream * ascii ()
 
- Static Public Member Functions inherited from Scene
static void save_all (std::ostream &)
 
static long scene_list_index (Scene *)
 
static const Colordefault_background ()
 
static const Colordefault_foreground ()
 

Private Member Functions

void extension_start ()
 
void extension_continue ()
 
void ascii_save (std::ostream &o) const
 
void family_value ()
 

Private Attributes

Symlistsymlist_
 
std::vector< GraphLine * > line_list_
 
int loc_
 
DataVecx_
 
bool extension_flushed_
 
SymChoosersc_
 
std::string var_name_
 
GPolyLinecurrent_polyline_
 
const Colorcolor_
 
const Brushbrush_
 
int label_fixtype_
 
float label_scale_
 
float label_x_align_
 
float label_y_align_
 
float label_x_
 
float label_y_
 
float label_n_
 
TelltaleStatekeep_lines_toggle_
 
bool family_on_
 
GLabelfamily_label_
 
double family_val_
 
int family_cnt_
 
HocCommandcross_action_
 
bool vector_copy_
 
Symbolx_expr_
 
neuron::container::data_handle< double > x_pval_
 
GraphVectorrvp_
 

Static Private Attributes

static SymChooserfsc_
 
static std::ostream * ascii_
 

Additional Inherited Members

- Protected Member Functions inherited from Scene
virtual void save_class (std::ostream &, const char *)
 

Detailed Description

Definition at line 54 of file graph.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CROSSHAIR 
CHANGELABEL 
PICK 
EXTRAGRAPHTOOL 

Definition at line 56 of file graph.h.

Constructor & Destructor Documentation

◆ Graph()

Graph::Graph ( bool  = true)

◆ ~Graph()

virtual Graph::~Graph ( )
virtual

Member Function Documentation

◆ add_graphVector()

void Graph::add_graphVector ( GraphVector )

◆ add_polyline()

void Graph::add_polyline ( GPolyLine )

◆ add_var()

GraphLine* Graph::add_var ( const char *  ,
const Color ,
const Brush ,
bool  usepointer,
int  fixtype = 1,
neuron::container::data_handle< double >  p = {},
const char *  lab = NULL,
Object obj = NULL 
)

◆ align()

void Graph::align ( float  x,
float  y 
)

◆ ascii() [1/2]

static std::ostream* Graph::ascii ( )
static

◆ ascii() [2/2]

static void Graph::ascii ( std::ostream *  )
static

◆ ascii_save()

void Graph::ascii_save ( std::ostream &  o) const
private

◆ axis()

void Graph::axis ( DimensionName  ,
float  min,
float  max,
float  pos = 0.,
int  ntics = -1,
int  nminor = 0,
int  invert = 0,
bool  number = true 
)

◆ begin()

void Graph::begin ( )

◆ begin_line() [1/2]

void Graph::begin_line ( const char *  s = NULL)

◆ begin_line() [2/2]

void Graph::begin_line ( const Color ,
const Brush ,
const char *  s = NULL 
)

◆ brush() [1/2]

const Brush* Graph::brush ( ) const
inline

Definition at line 112 of file graph.h.

◆ brush() [2/2]

void Graph::brush ( int  )

◆ change_label()

virtual bool Graph::change_label ( GLabel ,
const char *  ,
GLabel gl = NULL 
)
virtual

◆ change_label_color()

void Graph::change_label_color ( GLabel )
virtual

Reimplemented from Scene.

◆ change_line_color()

void Graph::change_line_color ( GPolyLine )
virtual

Reimplemented from Scene.

◆ change_prop()

void Graph::change_prop ( )

◆ choose_sym()

void Graph::choose_sym ( )

◆ color() [1/2]

const Color* Graph::color ( ) const
inline

Definition at line 109 of file graph.h.

◆ color() [2/2]

void Graph::color ( int  )

◆ cross_action() [1/2]

void Graph::cross_action ( char  ,
Coord  ,
Coord   
)

◆ cross_action() [2/2]

void Graph::cross_action ( char  ,
GPolyLine ,
int   
)

◆ delete_label()

virtual void Graph::delete_label ( GLabel )
virtual

Reimplemented from Scene.

◆ draw()

virtual void Graph::draw ( Canvas ,
const Allocation  
) const
virtual

Reimplemented from Scene.

◆ erase()

void Graph::erase ( )

◆ erase_all()

virtual void Graph::erase_all ( )
virtual

Reimplemented in ShapeScene.

◆ erase_axis()

void Graph::erase_axis ( )

◆ erase_lines()

void Graph::erase_lines ( )

◆ extension_continue()

void Graph::extension_continue ( )
private

◆ extension_start()

void Graph::extension_start ( )
private

◆ family() [1/2]

void Graph::family ( bool  )

◆ family() [2/2]

void Graph::family ( const char *  )

◆ family_label_chooser()

void Graph::family_label_chooser ( )

◆ family_value()

void Graph::family_value ( )
private

◆ fast_flush()

void Graph::fast_flush ( )

◆ fixed()

void Graph::fixed ( float  scale)

◆ flush()

void Graph::flush ( )

◆ glyph_index()

virtual GlyphIndex Graph::glyph_index ( const Glyph )
virtual

Reimplemented from Scene.

◆ help()

virtual void Graph::help ( )
virtual

Reimplemented from Scene.

Reimplemented in ShapeScene.

◆ keep_lines()

void Graph::keep_lines ( )

◆ keep_lines_toggle()

void Graph::keep_lines_toggle ( )

◆ label() [1/3]

GLabel* Graph::label ( const char *  s,
int  fixtype = -1 
)

◆ label() [2/3]

GLabel* Graph::label ( float  x,
float  y,
const char *  s,
float  n = 0,
int  fixtype = -1 
)

◆ label() [3/3]

GLabel* Graph::label ( float  x,
float  y,
const char *  s,
int  fixtype,
float  scale,
float  x_align,
float  y_align,
const Color  
)

◆ label_chooser()

static bool Graph::label_chooser ( const char *  ,
char *  ,
GLabel ,
Coord  x = 400.,
Coord  y = 400. 
)
static

◆ labeltype()

int Graph::labeltype ( ) const
inline

Definition at line 149 of file graph.h.

◆ line()

void Graph::line ( Coord  x,
Coord  y 
)

◆ mark()

void Graph::mark ( Coord  x,
Coord  y,
char  style = '+',
float  size = 12,
const Color = NULL,
const Brush = NULL 
)

◆ name()

void Graph::name ( char *  )

◆ new_axis()

void Graph::new_axis ( )

◆ new_proto_label()

GLabel* Graph::new_proto_label ( ) const

◆ new_size()

virtual void Graph::new_size ( Coord  x1,
Coord  y1,
Coord  x2,
Coord  y2 
)
virtual

Reimplemented from Scene.

◆ pick()

virtual void Graph::pick ( Canvas ,
const Allocation ,
int  depth,
Hit  
)
virtual

Reimplemented from Scene.

◆ plot()

void Graph::plot ( float  )

◆ relative()

void Graph::relative ( float  scale)

◆ save_phase1()

virtual void Graph::save_phase1 ( std::ostream &  )
virtual

Reimplemented from Scene.

◆ save_phase2()

virtual void Graph::save_phase2 ( std::ostream &  )
virtual

Reimplemented from Scene.

Reimplemented in ShapeScene.

◆ see_range_plot()

virtual void Graph::see_range_plot ( GraphVector )
virtual

◆ set_cross_action()

void Graph::set_cross_action ( const char *  ,
Object ,
bool  vectorcopy = false 
)

◆ simgraph()

void Graph::simgraph ( )

◆ vfixed()

void Graph::vfixed ( float  scale)

◆ view_axis()

void Graph::view_axis ( )

◆ view_box()

void Graph::view_box ( )

◆ wholeplot()

virtual void Graph::wholeplot ( Coord x1,
Coord y1,
Coord x2,
Coord y2 
) const
virtual

Reimplemented from Scene.

Reimplemented in ShapeScene.

◆ x_expr()

void Graph::x_expr ( const char *  ,
bool  usepointer 
)

Member Data Documentation

◆ ascii_

std::ostream* Graph::ascii_
staticprivate

Definition at line 193 of file graph.h.

◆ brush_

const Brush* Graph::brush_
private

Definition at line 176 of file graph.h.

◆ color_

const Color* Graph::color_
private

Definition at line 175 of file graph.h.

◆ cross_action_

HocCommand* Graph::cross_action_
private

Definition at line 186 of file graph.h.

◆ current_polyline_

GPolyLine* Graph::current_polyline_
private

Definition at line 173 of file graph.h.

◆ extension_flushed_

bool Graph::extension_flushed_
private

Definition at line 169 of file graph.h.

◆ family_cnt_

int Graph::family_cnt_
private

Definition at line 185 of file graph.h.

◆ family_label_

GLabel* Graph::family_label_
private

Definition at line 183 of file graph.h.

◆ family_on_

bool Graph::family_on_
private

Definition at line 182 of file graph.h.

◆ family_val_

double Graph::family_val_
private

Definition at line 184 of file graph.h.

◆ fsc_

SymChooser* Graph::fsc_
staticprivate

Definition at line 171 of file graph.h.

◆ keep_lines_toggle_

TelltaleState* Graph::keep_lines_toggle_
private

Definition at line 181 of file graph.h.

◆ label_fixtype_

int Graph::label_fixtype_
private

Definition at line 177 of file graph.h.

◆ label_n_

float Graph::label_n_
private

Definition at line 180 of file graph.h.

◆ label_scale_

float Graph::label_scale_
private

Definition at line 178 of file graph.h.

◆ label_x_

float Graph::label_x_
private

Definition at line 180 of file graph.h.

◆ label_x_align_

float Graph::label_x_align_
private

Definition at line 179 of file graph.h.

◆ label_y_

float Graph::label_y_
private

Definition at line 180 of file graph.h.

◆ label_y_align_

float Graph::label_y_align_
private

Definition at line 179 of file graph.h.

◆ line_list_

std::vector<GraphLine*> Graph::line_list_
private

Definition at line 166 of file graph.h.

◆ loc_

int Graph::loc_
private

Definition at line 167 of file graph.h.

◆ rvp_

GraphVector* Graph::rvp_
private

Definition at line 192 of file graph.h.

◆ sc_

SymChooser* Graph::sc_
private

Definition at line 170 of file graph.h.

◆ symlist_

Symlist* Graph::symlist_
private

Definition at line 165 of file graph.h.

◆ var_name_

std::string Graph::var_name_
private

Definition at line 172 of file graph.h.

◆ vector_copy_

bool Graph::vector_copy_
private

Definition at line 187 of file graph.h.

◆ x_

DataVec* Graph::x_
private

Definition at line 168 of file graph.h.

◆ x_expr_

Symbol* Graph::x_expr_
private

Definition at line 189 of file graph.h.

◆ x_pval_

neuron::container::data_handle<double> Graph::x_pval_
private

Definition at line 190 of file graph.h.


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