- LS_SOLID = 1
- LS_DASHED
- LS_DOT_DASH
- LS_DOTTED
- LS_DASH_3DOT
- FNT_NORMAL = 1
- FNT_ROMAN
- FNT_ITALIC
- FNT_SCRIPT
- PS_NONE
- PS_DOT
- PS_BOX
- PS_TRIANGLE
- PS_DIAMOND
- PS_STAR
- PS_VLINE
- PS_HLINE
- PS_CROSS
- PS_CIRCLE
- PS_SQUARE
- Construct PGPlot window inside given parent
- initialize appropriate variables.
Redraw the display
-Cycle through the list of associated data and draw each.
Don't call this function within this hierarchy. Instead wrap
drawing code with the redrawEnter()/redrawExit() pair to prevent
nested and layered functions from calling redraw more than once.
Clear the display and erase all datasets
-call cpgerase to erase the display
Append data to a given dataset
Remove a single data item by dataset id with given index
Change the style of the given dataset id
Plot title
Set axis preferences
Set the axis attributes
Set the line attributes
Set the Point attributes
Set the axis position strategy
- ignored
Place Markers
- ignored
Query doesn't make sense if Plot1d defines the enums!
Reverse the plot axes (global for widget)
-swap the min and max values
Set the position of the legend
- ignore for now
Open postscript device and send to printer
"Markers" are pieces of the crosshair cursor
- ignore for now
set the scale
- Clamp?
X cursor input callback
Add standard suite of X colors
Add color to PGPlot's list of colors. Returns False if failed
Return color index for given color or -1 if not found
Insure that plot range set for y1 data
Insure that plot range set for y2 data
Functions to draw various pieces of the graph
Double->Float for drawing
Functions to draw various pieces of the graph
Convert a dataset Id to a dataset index. Returns the (0-based)
index of the item in the dataSetList or -1 if not found
Etymology
PGPlot1d is a portmanteaux of PGPLOT and Plot1d
Synopsis
Designed to support PGPLOT 5.1 by T. J. Pearson of Caltech
Thrown Exceptions
Example
Member Description
enum PGPlotLineStyle
enum PGPlotFont
enum PGPlotPointStyle
PGPlot1d(Widget parent)
static void resizeCB(Widget, PGPlot1d * p1d, XtPointer)
static void drawCB(Widget, PGPlot1d * p1d, XtPointer)
virtual void redraw()
virtual void clear()
virtual Int addDataSet (Plot1dData * data, Plot1d::DataStyles)
virtual Bool deleteDataSet(Int dataSetId)
Delete a dataset by External Identification Number
-
Int string2colorIndex(const String &color)
virtual Int appendData(Int dataSetId, Double y)
virtual Int appendData (Int dataSetId, Double x, Double y)
virtual Int appendData (Int dataSetId, Vector <Double> y)
virtual Int appendData (Int dataSetId, Vector <Double> x, Vector <Double> y)
virtual Int removeDataPoint (Int dataSetId, Int where)
virtual void setDataStyle (Int dataSetId, DataStyles dataStyle)
virtual void setPlotTitleColor(const String& color)
virtual void setCursorColor(const String& color)
virtual void showSelections(Bool onOff)
virtual void setSelectionColor(const String& color)
virtual void setTopXAxis(Bool onOff)
virtual void setLeftY2Axis(Bool onOff)
virtual void setRightY1Axis(Bool onOff)
virtual void setXAxisColor(const String& color)
virtual void setY1AxisColor(const String& color)
virtual void setY2AxisColor(const String& color)
virtual void setXAxisLabelColor(const String& color)
virtual void setY1AxisLabelColor(const String& color)
virtual void setY2AxisLabelColor(const String& color)
virtual void setXAxisGridColor(const String& color)
virtual void setY1AxisGridColor(const String& color)
virtual void setY2AxisGridColor(const String& color)
virtual void setXAxisLineWidth(const Int newSize)
virtual void setY1AxisLineWidth(const Int newSize)
virtual void setY2XAxisLineWidth(const Int newSize)
virtual void setXAxisGrid(Bool onOff)
virtual void setY1AxisGrid(Bool onOff)
virtual void setY2AxisGrid(Bool onOff)
virtual void setXAxisGridLineWidth(const Int newSize)
virtual void setY1AxisGridLineWidth(const Int newSize)
virtual void setY2XAxisGridLineWidth(const Int newSize)
virtual void setLineColor (Int dataSetId, const String &color)
virtual void setLineStyle (Int dataSetId, LineStyles lineStyle)
virtual void setLineWidth (Int datasetId, Int newSize)
virtual void setPointColor (Int dataSetId, const String &color)
virtual void setPointStyle (Int dataSetId, PointStyles pointStyle)
virtual void setPointSize (Int dataSetId, Int newSize)
virtual void setXAxisPosition (Plot1d::AxisPlacementStrategy strategy, Double where = 0.0)
void setYAxisPosition(Plot1d::AxisPlacementStrategy strategy, Double where = 0.0)
virtual void setY1AxisPosition (Plot1d::AxisPlacementStrategy strategy, Double where = 0.0)
virtual void setY2AxisPosition (Plot1d::AxisPlacementStrategy strategy, Double where = 0.0)
void placeXMarker(Double x)
void placeYMarker(Double y)
String describeDataDisplayStyles()
virtual void reverseXAxis()
void reverseYAxis()
virtual void reverseY1Axis()
virtual void reverseY2Axis()
virtual void swapY1Y2()
virtual void setLegendGeometry (LegendGeometry newGeometry)
virtual Bool printGraphToPrinter()
virtual Bool printGraphToFile(String filename)
virtual void enableXMarker (int onOff)
virtual void enableYMarker (int onOff)
virtual void setXScale(Double x0, Double x1)
void setYScale(Double y0, Double y1)
virtual void setY1Scale(Double y0, Double y1)
virtual void setY2Scale(Double y0, Double y1)
void cursorInput(XmpCursorCallbackStruct * cursor)
static void cursorInputCB(Widget, XtPointer p1d, XtPointer cursor)
void armCursor(int mode, float x, float y)
void disarmCursor()
void setCursorInactiveMode(int mode)
void setCursorActiveMode(int mode)
void selectRegion(float x1, float x2, float y1, float y2)
static void leaveNotifyEH(Widget, XtPointer pthis, XEvent *, Boolean *)
void leaveNotify()
static void enterNotifyEH(Widget, XtPointer pthis, XEvent *, Boolean *)
void enterNotify()
static void motionNotifyEH(Widget, XtPointer pthis, XEvent *, Boolean *)
void motionNotify(int x, int y)
void setPrintCommand(const String & s)
const String & printCommand() const
Int pickY1Style(int id)
Int pickY2Style(int id)
void setDataAttributes(PGPlot1dDataAttr * pda, Plot1dData::AssociatedYAxis whichYAxis)
void addStandardColors()
Int addColor(const String& s)
Int searchColor(const String& s)
void updateReadouts(float x1ro, float y1ro)
static void quitCB(Widget, XtPointer, XtPointer)
static void printCB(Widget, XtPointer, XtPointer)
static void fullViewCB(Widget, XtPointer, XtPointer)
static void clearSelectionsCB(Widget, XtPointer, XtPointer)
static void clearCB(Widget, XtPointer, XtPointer)
static void selectXAxisCB(Widget, XtPointer, XtPointer)
static void selectYAxisCB(Widget, XtPointer, XtPointer)
static void selectBoxCB(Widget, XtPointer, XtPointer)
static void setZoomDragModeCB(Widget, XtPointer, XtPointer)
static void setSelectDataDragModeCB(Widget, XtPointer, XtPointer)
void drawPage()
Bool openGraphicsDevice()
void closeGraphicsDevice()
Bool openPrinterDevice()
void closePrinterDevice()
Bool openPSFileDevice()
void closePSFileDevice()
PGPlot1dDataAttr * findPda(Int id)
void initializeWidgets(Widget parent)
void prepDataAttributes(Plot1dData * pd)
void prepY1Plot()
void prepY2Plot()
void drawXYLines(const Vector<Double>& x, const Vector<Double>& y)
void drawXAxes()
void drawY1Axes()
void drawY2Axes()
void drawBottomXAxis()
void drawLeftY1Axis()
void drawRightY2Axis()
void drawXAxisGrid()
void drawY1AxisGrid()
void drawY2AxisGrid()
void drawY1Data()
void drawY2Data()
void drawTitle()
void drawIdString()
void drawSelections()
void drawPd(Plot1dData * pd)
void drawXYPoints(const Vector<Double>& x, const Vector<Double>& y, uInt markerIndex)
void drawXYHistogram(const Vector<Double>& x, const Vector<Double>& y)
int DataSetId2DataSetIndex_(int DataSetId)