RobWorkProject  23.9.11-
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ListPlot Class Reference

Representation of the Mathematica ListPlot function. More...

#include <ListPlot.hpp>

Inherits Mathematica::FunctionBase.

Public Types

typedef rw::core::Ptr< ListPlotPtr
 Smart pointer type.
 
- Public Types inherited from Mathematica::FunctionBase
typedef rw::core::Ptr< FunctionBasePtr
 Smart pointer type.
 
- Public Types inherited from Mathematica::Expression
enum  Type {
  String , Integer , Real , Symbol ,
  Function , Array
}
 Type of expression. More...
 
typedef rw::core::Ptr< ExpressionPtr
 Smart pointer type.
 
typedef enum rwlibs::mathematica::Mathematica::Expression::Type Type
 Type of expression.
 

Public Member Functions

 ListPlot (const Mathematica::Expression &data)
 Construct a ListPlot expression. More...
 
 ListPlot (const Mathematica::Expression &data, const std::list< Mathematica::Expression::Ptr > &options)
 Construct a ListPlot expression. More...
 
 ListPlot (const std::vector< double > &x, const std::vector< double > &y, const std::list< Mathematica::Expression::Ptr > &options=std::list< Mathematica::Expression::Ptr >())
 Construct a ListPlot expression. More...
 
template<typename... Option>
 ListPlot (const std::initializer_list< std::initializer_list< double >> &data, const Option &... options)
 Construct a ListPlot expression. More...
 
virtual ~ListPlot ()
 Destructor.
 
virtual std::list< rw::core::Ptr< const Mathematica::Expression > > getArguments () const
 Get a list of arguments for this function. More...
 
virtual Mathematica::Expression::Ptr clone () const
 Make a copy of the expression. More...
 
void option (const std::string &name, const Mathematica::Expression &value)
 Set an option. More...
 
void setImageSize (int width, int height)
 Set the image size option. More...
 
- Public Member Functions inherited from Mathematica::FunctionBase
 FunctionBase (const std::string &name)
 Construct new function. More...
 
std::string getName () const
 Get the name of the function. More...
 
Type getType () const
 Get the type of expression. More...
 
virtual void out (std::ostream &stream) const
 Print to output stream. More...
 
virtual void out (std::ostream &stream, std::size_t indent) const
 Print function by using indentations. More...
 

Static Public Member Functions

static ListPlot fromExpression (const Mathematica::Expression &expression)
 Construct ListPlot from existing expression. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Mathematica::Expression
template<typename Type >
static void toList (std::list< rw::core::Ptr< Type >> &)
 Helper function for extracting a list of arguments when given as a variable number of arguments. More...
 
template<typename Type , typename Exp , typename... T>
static void toList (std::list< rw::core::Ptr< Type >> &list, const Exp &r, T... t)
 Helper function for extracting a list of arguments when given as a variable number of arguments. More...
 
- Protected Attributes inherited from Mathematica::FunctionBase
std::string _name
 Name of the function.
 

Detailed Description

Representation of the Mathematica ListPlot function.

Constructor & Destructor Documentation

◆ ListPlot() [1/4]

ListPlot ( const Mathematica::Expression data)

Construct a ListPlot expression.

Parameters
data[in] the data expression (e.g. a variable name, table/list expression, or data array).

◆ ListPlot() [2/4]

ListPlot ( const Mathematica::Expression data,
const std::list< Mathematica::Expression::Ptr > &  options 
)

Construct a ListPlot expression.

Parameters
data[in] the data expression (e.g. a variable name, table/list expression, or data array).
options[in] the options to use (such as PlotRange, AxesLabels etc.)

◆ ListPlot() [3/4]

ListPlot ( const std::vector< double > &  x,
const std::vector< double > &  y,
const std::list< Mathematica::Expression::Ptr > &  options = std::list< Mathematica::Expression::Ptr >() 
)

Construct a ListPlot expression.

Parameters
x[in] a list of x-values.
y[in] a list of y-values.
options[in] (optional) the options to use (such as PlotRange, AxesLabels etc.)

◆ ListPlot() [4/4]

ListPlot ( const std::initializer_list< std::initializer_list< double >> &  data,
const Option &...  options 
)
inline

Construct a ListPlot expression.

Parameters
data[in] the data expression (e.g. a variable name, table/list expression, or data array).
options[in] the options to use (such as PlotRange, AxesLabels etc.)
Note
Only available for C++-11

Member Function Documentation

◆ clone()

virtual Mathematica::Expression::Ptr clone ( ) const
virtual

Make a copy of the expression.

Returns
a new copy.

Implements Mathematica::Expression.

◆ fromExpression()

static ListPlot fromExpression ( const Mathematica::Expression expression)
static

Construct ListPlot from existing expression.

Parameters
expression[in] the expression to parse as ListPlot.
Returns
the parsed ListPlot expression.
Exceptions
rw::core::Exceptionif parsing fails.

◆ getArguments()

virtual std::list<rw::core::Ptr<const Mathematica::Expression> > getArguments ( ) const
virtual

Get a list of arguments for this function.

Returns
list of arguments.

Implements Mathematica::FunctionBase.

◆ option()

void option ( const std::string &  name,
const Mathematica::Expression value 
)

Set an option.

Parameters
name[in] the name of the option.
value[in] the value to set.

◆ setImageSize()

void setImageSize ( int  width,
int  height 
)

Set the image size option.

Parameters
width[in] the width.
height[in] the height.

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