public class JMathPlotter
extends java.lang.Object
Constructor and Description |
---|
JMathPlotter() |
JMathPlotter(int legendFontSize,
int axisFontSize,
int axisLightFontSize) |
Modifier and Type | Method and Description |
---|---|
void |
plotControlSurface(java.lang.String plotName,
java.lang.String[] xyzLabels,
double[] x,
double[] y,
double[][] z,
Tuple yAxisRange,
boolean plotNaNasZero) |
void |
plotInputOutput(java.lang.String plotName,
double[] results,
Tuple xAxisRange,
Tuple yAxisRange)
This function enables to plot a graph with input values in xaxis and the corresponding outputs in y axis
|
void |
plotMF(java.lang.String plotName,
IntervalT2MF_Interface set,
int xDisc,
javax.swing.JFrame frame,
boolean addExtraEndpoints) |
void |
plotMF(java.lang.String plotName,
T1MF_Interface set,
int xDisc,
Tuple xAxisRange,
Tuple yAxisRange,
boolean addExtraEndpoints)
2D plotting for T1 sets based on JMathPlotter
|
void |
plotMFasLines(java.lang.String plotName,
GenT2zMF_Interface set,
int xDisc)
Provides a basic line-style vizualisation of the zSlices based general Type-2
Fuzzy Sets.
|
void |
plotMFasSurface(java.lang.String plotName,
GenT2zMF_Interface set,
Tuple xAxisRange,
int xDisc,
boolean addExtraEndpoints)
Provides a surface-style visualisation of the sets.
|
void |
show() |
void |
show(java.lang.String title) |
void |
toGraphicFile(java.io.File f) |
public JMathPlotter()
public JMathPlotter(int legendFontSize, int axisFontSize, int axisLightFontSize)
public void plotMF(java.lang.String plotName, T1MF_Interface set, int xDisc, Tuple xAxisRange, Tuple yAxisRange, boolean addExtraEndpoints)
plotName
- set
- xDisc
- yAxisRange
- addExtraEndpoints
- If true, two extra points with coordinates (leftEndpoint, 0) and (rightEndpoint, 0) are added to the line plot.
This ensures that vertical edges are plotted correctly for example for interval type-1 sets.public void plotInputOutput(java.lang.String plotName, double[] results, Tuple xAxisRange, Tuple yAxisRange)
plotName
- results
- xAxisRange
- yAxisRange
- public void toGraphicFile(java.io.File f) throws java.io.IOException
java.io.IOException
public void plotMF(java.lang.String plotName, IntervalT2MF_Interface set, int xDisc, javax.swing.JFrame frame, boolean addExtraEndpoints)
public void plotMFasLines(java.lang.String plotName, GenT2zMF_Interface set, int xDisc)
plotName
- set
- xDisc
- Discretization level of the xAxis.public void plotMFasSurface(java.lang.String plotName, GenT2zMF_Interface set, Tuple xAxisRange, int xDisc, boolean addExtraEndpoints)
plotName
- set
- xAxisRange
- the range of the x axis to be sampledxDisc
- The level of discretization. This parameter may be disregarded
for sets which have purpose-built plotting has been included.public void plotControlSurface(java.lang.String plotName, java.lang.String[] xyzLabels, double[] x, double[] y, double[][] z, Tuple yAxisRange, boolean plotNaNasZero)
plotName
- The name of the plotxyzLabels
- Labels for each axis in orderx
- The array of x discretisationsy
- The array of y discretisationsz
- The z values for the given number of x-y combinationsyAxisRange
- The desired range for the yAxisplotNaNasZero
- If true, then the provided z array will be check for NaN values which will be replaced with 0 for plotting.
This is useful for example when a fuzzy inference system does not contain fuzzy sets for the whole input range, i.e. outputs are undefined
for parts of the input space.public void show(java.lang.String title)
public void show()