VectSharp 2.6.1
A light library for C# vector graphics
All Classes Namespaces Functions Variables Enumerations Properties Events Pages
VectSharp.Plots.Function2D Class Reference

A plot element that plots a function of two variables. More...

Inheritance diagram for VectSharp.Plots.Function2D:

Public Types

enum  PlotType
 Describes the kind of plots that can be produced. More...
 

Public Member Functions

 Function2D (Function2DGrid function, IContinuousInvertibleCoordinateSystem coordinateSystem)
 Create a new Function2D instance. More...
 
unsafe void Plot (Graphics target)
 Draw the plot element on the specified target  Graphics.
Parameters
targetThe Graphics on which to draw.
More...
 
void Plot (Graphics target)
 Draw the plot element on the specified target  Graphics. More...
 

Properties

IDataPointElement SampledPointElement = new PathDataPointElement() [get, set]
 The symbol to draw at the sampled points. More...
 
int RasterResolutionX = 512 [get, set]
 Resolution on the X axis for the rasterised tesselation. More...
 
int RasterResolutionY = 512 [get, set]
 Resolution on the Y axis for the rasterised tesselation. More...
 
Function2DGrid Function [get, set]
 The function to plot. More...
 
PlotType Type = PlotType.SampledPoints [get, set]
 The kind of plot that is produced. More...
 
Func< double, ColourColouring = x => { x = Math.Max(0, Math.Min(1, x)); return Colour.FromRgb(x, x, x); } [get, set]
 A function associating sampled function values to a Colour. You should set this to a function accepting a single double argument ranging between 0 and 1, and returning the corresponding colour. The default value returns black 0 and white for 1. More...
 
string Tag [get, set]
 A tag to identify the function in the plot. More...
 
IContinuousInvertibleCoordinateSystem CoordinateSystem [get, set]
 The coordinate system used to transform the points from data space to plot space. More...
 
- Properties inherited from VectSharp.Plots.IPlotElement
ICoordinateSystem CoordinateSystem [get]
 The coordinate system used to transform the points from data space to plot space. More...
 

Detailed Description

A plot element that plots a function of two variables.

Definition at line 520 of file Function2D.cs.

Member Enumeration Documentation

◆ PlotType

Describes the kind of plots that can be produced.

Definition at line 525 of file Function2D.cs.

Constructor & Destructor Documentation

◆ Function2D()

VectSharp.Plots.Function2D.Function2D ( Function2DGrid  function,
IContinuousInvertibleCoordinateSystem  coordinateSystem 
)

Create a new Function2D instance.

Parameters
functionThe function to plot.
coordinateSystemThe coordinate system used to transform the points from data space to plot space.

Definition at line 594 of file Function2D.cs.

Member Function Documentation

◆ Plot()

unsafe void VectSharp.Plots.Function2D.Plot ( Graphics  target)

Draw the plot element on the specified target &#160;Graphics.

Parameters
targetThe Graphics on which to draw.

Implements VectSharp.Plots.IPlotElement.

Definition at line 601 of file Function2D.cs.

Property Documentation

◆ Colouring

Func<double, Colour> VectSharp.Plots.Function2D.Colouring = x => { x = Math.Max(0, Math.Min(1, x)); return Colour.FromRgb(x, x, x); }
getset

A function associating sampled function values to a Colour. You should set this to a function accepting a single double argument ranging between 0 and 1, and returning the corresponding colour. The default value returns black 0 and white for 1.

Definition at line 576 of file Function2D.cs.

◆ CoordinateSystem

IContinuousInvertibleCoordinateSystem VectSharp.Plots.Function2D.CoordinateSystem
getset

The coordinate system used to transform the points from data space to plot space.

Implements VectSharp.Plots.IPlotElement.

Definition at line 586 of file Function2D.cs.

◆ Function

Function2DGrid VectSharp.Plots.Function2D.Function
getset

The function to plot.

Definition at line 564 of file Function2D.cs.

◆ RasterResolutionX

int VectSharp.Plots.Function2D.RasterResolutionX = 512
getset

Resolution on the X axis for the rasterised tesselation.

Definition at line 554 of file Function2D.cs.

◆ RasterResolutionY

int VectSharp.Plots.Function2D.RasterResolutionY = 512
getset

Resolution on the Y axis for the rasterised tesselation.

Definition at line 559 of file Function2D.cs.

◆ SampledPointElement

IDataPointElement VectSharp.Plots.Function2D.SampledPointElement = new PathDataPointElement()
getset

The symbol to draw at the sampled points.

Definition at line 549 of file Function2D.cs.

◆ Tag

string VectSharp.Plots.Function2D.Tag
getset

A tag to identify the function in the plot.

Definition at line 581 of file Function2D.cs.

◆ Type

PlotType VectSharp.Plots.Function2D.Type = PlotType.SampledPoints
getset

The kind of plot that is produced.

Definition at line 569 of file Function2D.cs.


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