OriginPro
 
Loading...
Searching...
No Matches
originpro.graph.Axis Class Reference

Public Member Functions

def __init__ (self, obj, ax)
 
def sfrom (self)
 
def sfrom (self, value)
 
def sto (self)
 
def sto (self, value)
 
def sstep (self)
 
def sstep (self, value)
 
int scale (self)
 
def scale (self, value)
 
def limits (self)
 
def limits (self, limits)
 
def set_limits (self, begin=None, end=None, step=None)
 
def title (self)
 
def title (self, value)
 

Public Attributes

 layer
 
 type
 
 ax
 
 scale
 
 sfrom
 
 sto
 
 sstep
 

Detailed Description

This class represents an instance of Axis on a GLayer.

Member Function Documentation

◆ limits() [1/2]

def originpro.graph.Axis.limits (   self)
axis scale limits

Parameters:

Returns:
    (tuple) from, to, increment

Examples:
    from, to, inc = ax.limits

◆ limits() [2/2]

def originpro.graph.Axis.limits (   self,
  limits 
)
Property setter returns the scale limits (from` and `to) for the axis.

Parameters:
    limits (tuple): (from, to)

Returns:
    None

Examples:
    ax.limits = (1, 10, 1)

◆ scale() [1/2]

int originpro.graph.Axis.scale (   self)
get axis scale type
Parameters:
    none
Returns:
    scale type:int value for a type
    1:'linear', 2: 'log10', 3: 'probability', 4: 'probit', 5: 'reciprocal',
    6:'offset_reciprocal', 7: 'logit', 8: 'ln', 9: 'log2'.
Examples,
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    print(ax.scale)

◆ scale() [2/2]

def originpro.graph.Axis.scale (   self,
  value 
)
set axis scale type
Parameters:
    value(int or str): if int, it is a value between 1 to 9, if string, it can be one of belew:
    'linear', 'log10', 'probability', 'probit', 'reciprocal', 'offset_reciprocal', 'logit', 'ln', 'log2'
Returns:
    return scale type as int val
Examples:
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    ax.scale="log10"
    ax.scale=3

◆ set_limits()

def originpro.graph.Axis.set_limits (   self,
  begin = None,
  end = None,
  step = None 
)
Sets scale from and to values for the axis

Parameters:
    begin (float, tuple, list): The From value of limits, or specify [begin,end], or [begin,end,step]
    end (float): The To value of limits. None leaves the value unchanged.
    step (float): The Increment of the limits. None leaves the value unchanged.

Returns:
    (tuple) from, to, increment

Examples:
    ax.set_limits(step=0.3)
    ax.set_limits(5, 15)

◆ sfrom() [1/2]

def originpro.graph.Axis.sfrom (   self)
get scale limit from value
Parameters:
    none
Returns:
    scale.from val
Examples:
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    print(ax.sfrom)

◆ sfrom() [2/2]

def originpro.graph.Axis.sfrom (   self,
  value 
)
set scale limit from value
Parameters:
    value(float):
Returns:
    scale.from val
Examples:
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    ax.sfrom=0.7

◆ sstep() [1/2]

def originpro.graph.Axis.sstep (   self)
get scale limit increment
Parameters:
    none
Returns:
    scale limit increment val
Examples:
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    print(ax.sstep)

◆ sstep() [2/2]

def originpro.graph.Axis.sstep (   self,
  value 
)
set scale limit increment
Parameters:
    value(float):
Returns:
    none
Examples:
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    ax.sstep=0.7

◆ sto() [1/2]

def originpro.graph.Axis.sto (   self)
get scale limit to value
Parameters:
    none
Returns:
    scale.to val
Examples:
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    print(ax.sto)

◆ sto() [2/2]

def originpro.graph.Axis.sto (   self,
  value 
)
set scale limit to value
Parameters:
    value(float):
Returns:
    none
Examples:
    gl=op.find_graph()[0]
    ax=gl.axis('x')
    ax.sto=7

◆ title() [1/2]

def originpro.graph.Axis.title (   self)
Property getter for axis title.

Parameters:

Returns:
    (str) Title

Examples:
    txt = ax.title

◆ title() [2/2]

def originpro.graph.Axis.title (   self,
  value 
)
Property setter for axis title.

Parameters:
    value (str): Title text

Returns:
    (str) Title

Examples:
    ax.title = 'X Axis'

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