PetscDraw (Graphics) - Low-level Interface
PetscDraw is PETSc's simple graphics layer (X11 windows, image files, or a null device) with line graphs (PetscDrawLG), scatter plots (PetscDrawSP), histograms (PetscDrawHG), bar charts (PetscDrawBar) and axes. PetscViewerDrawOpen on the PetscViewer page uses it to plot vectors and matrix structure.
Basic Usage
using PETSc, MPI
MPI.Init()
petsclib = PETSc.getlib()
PETSc.initialize(petsclib)
# "" selects the default display; the type comes from -draw_type (x, image, null, ...)
draw = LibPETSc.PetscDrawCreate(petsclib, MPI.COMM_SELF, "", "Line graph",
Cint(0), Cint(0), Cint(400), Cint(300))
LibPETSc.PetscDrawSetType(petsclib, draw, LibPETSc.PETSC_DRAW_NULL) # headless
LibPETSc.PetscDrawSetFromOptions(petsclib, draw)
lg = LibPETSc.PetscDrawLGCreate(petsclib, draw, 1) # one curve
for i in 0:9
LibPETSc.PetscDrawLGAddPoint(petsclib, lg, [Float64(i)], [sin(i)])
end
LibPETSc.PetscDrawLGDraw(petsclib, lg)
LibPETSc.PetscDrawFlush(petsclib, draw)
LibPETSc.PetscDrawLGDestroy(petsclib, lg)
LibPETSc.PetscDrawDestroy(petsclib, draw)
PETSc.finalize(petsclib)Function Reference
PetscDraw
PETSc.LibPETSc.PetscDrawAppendTitle — Method
PetscDrawAppendTitle(petsclib::PetscLibType, draw::PetscDraw, title::String)Appends to the title of a PetscDraw context.
Collective
Input Parameters:
draw- the graphics contexttitle- the title
Level: advanced
See also: PetscDraw, PetscDrawSetTitle(), PetscDrawGetTitle()
External Links
- PETSc Manual:
Draw/PetscDrawAppendTitle
PETSc.LibPETSc.PetscDrawArrow — Method
PetscDrawArrow(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, cl::Cint)draws a line with arrow head at end if the line is long enough
Not Collective
Input Parameters:
draw- the drawing contextxl- horizontal coordinate of first end pointyl- vertical coordinate of first end pointxr- horizontal coordinate of second end pointyr- vertical coordinate of second end pointcl- the colors of the endpoints
Level: beginner
See also: PetscDraw, PetscDrawLine(), PetscDrawLineSetWidth(), PetscDrawLineGetWidth(), PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawEllipse(), PetscDrawMarker(), PetscDrawPoint()
External Links
- PETSc Manual:
Draw/PetscDrawArrow
PETSc.LibPETSc.PetscDrawAxisCreate — Method
axis::PetscDrawAxis = PetscDrawAxisCreate(petsclib::PetscLibType, draw::PetscDraw)Generate the axis data structure.
Collective
Input Parameter:
draw-PetscDrawobject where axis to be made
Output Parameter:
axis- the axis datastructure
See also: PetscDrawLGCreate(), PetscDrawLG, PetscDrawSPCreate(), PetscDrawSP, PetscDrawHGCreate(), PetscDrawHG, PetscDrawBarCreate(), PetscDrawBar, PetscDrawLGGetAxis(), PetscDrawSPGetAxis(), PetscDrawHGGetAxis(), PetscDrawBarGetAxis(), PetscDrawAxis, PetscDrawAxisDestroy(), PetscDrawAxisSetColors(), PetscDrawAxisSetLabels(), PetscDrawAxisSetLimits(), PetscDrawAxisGetLimits(), PetscDrawAxisSetHoldLimits(), PetscDrawAxisDraw()
External Links
- PETSc Manual:
Draw/PetscDrawAxisCreate
PETSc.LibPETSc.PetscDrawAxisDestroy — Method
PetscDrawAxisDestroy(petsclib::PetscLibType, axis::Union{PetscDrawAxis, Ref{PetscDrawAxis}})Frees the space used by an axis structure.
Collective
Input Parameter:
axis- the axis context
Level: advanced
See also: PetscDraw, PetscDrawAxisCreate(), PetscDrawAxis
External Links
- PETSc Manual:
Draw/PetscDrawAxisDestroy
PETSc.LibPETSc.PetscDrawAxisDraw — Method
PetscDrawAxisDraw(petsclib::PetscLibType, axis::PetscDrawAxis)draws an axis.
Collective
Input Parameter:
axis-PetscDrawAxisstructure
Level: advanced
See also: PetscDrawAxisCreate(), PetscDrawAxis, PetscDrawAxisGetLimits(), PetscDrawAxisSetLimits(), PetscDrawAxisSetLabels(), PetscDrawAxisSetColors()
External Links
- PETSc Manual:
Draw/PetscDrawAxisDraw
PETSc.LibPETSc.PetscDrawAxisGetLimits — Method
xmin::PetscReal,xmax::PetscReal,ymin::PetscReal,ymax::PetscReal = PetscDrawAxisGetLimits(petsclib::PetscLibType, axis::PetscDrawAxis)Gets the limits (in user coords) of the axis
Not Collective
Input Parameters:
axis- the axisxmin- the lower x limitxmax- the upper x limitymin- the lower y limitymax- the upper y limit
Level: advanced
See also: PetscDrawAxisCreate(), PetscDrawAxis, PetscDrawAxisSetHoldLimits(), PetscDrawAxisSetLimits(), PetscDrawAxisSetLabels(), PetscDrawAxisSetColors()
External Links
- PETSc Manual:
Draw/PetscDrawAxisGetLimits
PETSc.LibPETSc.PetscDrawAxisSetColors — Method
PetscDrawAxisSetColors(petsclib::PetscLibType, axis::PetscDrawAxis, ac::Cint, tc::Cint, cc::Cint)Sets the colors to be used for the axis, tickmarks, and text.
Logically Collective
Input Parameters:
axis- the axisac- the color of the axis linestc- the color of the tick markscc- the color of the text strings
Level: advanced
See also: PetscDraw, PetscDrawAxisCreate(), PetscDrawAxis, PetscDrawAxisSetLabels(), PetscDrawAxisDraw(), PetscDrawAxisSetLimits()
External Links
- PETSc Manual:
Draw/PetscDrawAxisSetColors
PETSc.LibPETSc.PetscDrawAxisSetHoldLimits — Method
PetscDrawAxisSetHoldLimits(petsclib::PetscLibType, axis::PetscDrawAxis, hold::PetscBool)Causes an axis to keep the same limits until this is called again
Logically Collective
Input Parameters:
axis- the axishold-PETSC_TRUE- hold current limits,PETSC_FALSEallow limits to be changed
Level: advanced
See also: PetscDrawAxisCreate(), PetscDrawAxis, PetscDrawAxisGetLimits(), PetscDrawAxisSetLimits(), PetscDrawAxisSetLabels(), PetscDrawAxisSetColors()
External Links
- PETSc Manual:
Draw/PetscDrawAxisSetHoldLimits
PETSc.LibPETSc.PetscDrawAxisSetLabels — Method
PetscDrawAxisSetLabels(petsclib::PetscLibType, axis::PetscDrawAxis, top::String, xlabel::String, ylabel::String)Sets the x and y axis labels.
Logically Collective
Input Parameters:
axis- the axistop- the label at the top of the imagexlabel- the x axis labelylabel- the y axis label
Level: advanced
See also: PetscDraw, PetscDrawAxisCreate(), PetscDrawAxis, PetscDrawAxisSetColors(), PetscDrawAxisDraw(), PetscDrawAxisSetLimits()
External Links
- PETSc Manual:
Draw/PetscDrawAxisSetLabels
PETSc.LibPETSc.PetscDrawAxisSetLimits — Method
PetscDrawAxisSetLimits(petsclib::PetscLibType, axis::PetscDrawAxis, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal)Sets the limits (in user coords) of the axis
Logically Collective
Input Parameters:
axis- the axisxmin- the lower x limitxmax- the upper x limitymin- the lower y limitymax- the upper y limit
Options Database Key:
-drawaxis_hold- hold the initial set of axis limits for future plotting
Level: advanced
See also: PetscDrawAxisSetHoldLimits(), PetscDrawAxisGetLimits(), PetscDrawAxisSetLabels(), PetscDrawAxisSetColors()
External Links
- PETSc Manual:
Draw/PetscDrawAxisSetLimits
PETSc.LibPETSc.PetscDrawBOP — Method
PetscDrawBOP(petsclib::PetscLibType, draw::PetscDraw)Begins a new page or frame on the selected graphical device.
Logically Collective
Input Parameter:
draw- the drawing context
Level: advanced
See also: PetscDrawEOP(), PetscDrawClear()
External Links
- PETSc Manual:
Draw/PetscDrawBOP
PETSc.LibPETSc.PetscDrawBarCreate — Method
bar::PetscDrawBar = PetscDrawBarCreate(petsclib::PetscLibType, draw::PetscDraw)Creates a bar graph data structure.
Collective
Input Parameter:
draw- The window where the graph will be made
Output Parameter:
bar- The bar graph context
See also: PetscDrawBar, PetscDrawLGCreate(), PetscDrawLG, PetscDrawSPCreate(), PetscDrawSP, PetscDrawHGCreate(), PetscDrawHG, PetscDrawBarDestroy(), PetscDrawBarSetData(), PetscDrawBarDraw(), PetscDrawBarSave(), PetscDrawBarSetColor(), PetscDrawBarSort(), PetscDrawBarSetLimits(), PetscDrawBarGetAxis(), PetscDrawAxis, PetscDrawBarGetDraw(), PetscDrawBarSetFromOptions()
External Links
- PETSc Manual:
Draw/PetscDrawBarCreate
PETSc.LibPETSc.PetscDrawBarDestroy — Method
PetscDrawBarDestroy(petsclib::PetscLibType, bar::Union{PetscDrawBar, Ref{PetscDrawBar}})Frees all space taken up by bar graph data structure.
Collective
Input Parameter:
bar- The bar graph context
Level: intermediate
See also: PetscDrawBar, PetscDrawBarCreate()
External Links
- PETSc Manual:
Draw/PetscDrawBarDestroy
PETSc.LibPETSc.PetscDrawBarDraw — Method
PetscDrawBarDraw(petsclib::PetscLibType, bar::PetscDrawBar)Redraws a bar graph.
Collective
Input Parameter:
bar- The bar graph context
Level: intermediate
See also: PetscDrawBar, PetscDrawBarCreate(), PetscDrawBarSetData()
External Links
- PETSc Manual:
Draw/PetscDrawBarDraw
PETSc.LibPETSc.PetscDrawBarGetAxis — Method
axis::PetscDrawAxis = PetscDrawBarGetAxis(petsclib::PetscLibType, bar::PetscDrawBar)Gets the axis context associated with a bar graph. This is useful if one wants to change some axis property, such as labels, color, etc. The axis context should not be destroyed by the application code.
Not Collective, axis is parallel if bar is parallel
Input Parameter:
bar- The bar graph context
Output Parameter:
axis- The axis context
Level: intermediate
See also: PetscDrawBar, PetscDrawBarCreate(), PetscDrawAxis, PetscDrawAxisCreate()
External Links
- PETSc Manual:
Draw/PetscDrawBarGetAxis
PETSc.LibPETSc.PetscDrawBarGetDraw — Method
draw::PetscDraw = PetscDrawBarGetDraw(petsclib::PetscLibType, bar::PetscDrawBar)Gets the draw context associated with a bar graph.
Not Collective, draw is parallel if bar is parallel
Input Parameter:
bar- The bar graph context
Output Parameter:
draw- The draw context
Level: intermediate
See also: PetscDrawBar, PetscDraw, PetscDrawBarCreate(), PetscDrawBarDraw()
External Links
- PETSc Manual:
Draw/PetscDrawBarGetDraw
PETSc.LibPETSc.PetscDrawBarSave — Method
PetscDrawBarSave(petsclib::PetscLibType, bar::PetscDrawBar)Saves a drawn bar graph
Collective
Input Parameter:
bar- The bar graph context
Level: intermediate
See also: PetscDrawSave(), PetscDrawBar, PetscDrawBarCreate(), PetscDrawBarGetDraw(), PetscDrawSetSave(), PetscDrawBarSetData()
External Links
- PETSc Manual:
Draw/PetscDrawBarSave
PETSc.LibPETSc.PetscDrawBarSetColor — Method
PetscDrawBarSetColor(petsclib::PetscLibType, bar::PetscDrawBar, color::Cint)Sets the color the bars will be drawn with.
Logically Collective
Input Parameters:
bar- The bar graph contextcolor- one of the colors defined in petscdraw.h orPETSC_DRAW_ROTATEto make each bar a
different color
Level: intermediate
See also: PetscDrawBarCreate(), PetscDrawBar, PetscDrawBarSetData(), PetscDrawBarDraw(), PetscDrawBarGetAxis()
External Links
- PETSc Manual:
Draw/PetscDrawBarSetColor
PETSc.LibPETSc.PetscDrawBarSetData — Method
PetscDrawBarSetData(petsclib::PetscLibType, bar::PetscDrawBar, bins::PetscInt, data::Vector{PetscReal}, labels::String)Set the data for a bar graph
Logically Collective
Input Parameters:
bar- The bar graph context.bins- number of itemsdata- values of each itemlabels- optional label for each bar,NULLterminated array of strings
Level: intermediate
See also: PetscDrawBar, PetscDrawBarCreate(), PetscDrawBarDraw()
External Links
- PETSc Manual:
Draw/PetscDrawBarSetData
PETSc.LibPETSc.PetscDrawBarSetFromOptions — Method
PetscDrawBarSetFromOptions(petsclib::PetscLibType, bar::PetscDrawBar)Sets options related to the display of the PetscDrawBar
Collective
Input Parameter:
bar- the bar graph context
Options Database Key:
-bar_sort- sort the entries before drawing the bar graph
Level: intermediate
See also: PetscDrawBar, PetscDrawBarDestroy(), PetscDrawBarCreate(), PetscDrawBarSort()
External Links
- PETSc Manual:
Draw/PetscDrawBarSetFromOptions
PETSc.LibPETSc.PetscDrawBarSetLimits — Method
PetscDrawBarSetLimits(petsclib::PetscLibType, bar::PetscDrawBar, y_min::PetscReal, y_max::PetscReal)Sets the axis limits for a bar graph. If more points are added after this call, the limits will be adjusted to include those additional points.
Logically Collective
Input Parameters:
bar- The bar graph contexty_min- The lower limity_max- The upper limit
Level: intermediate
See also: PetscDrawBar, PetscDrawBarCreate(), PetscDrawBarGetAxis(), PetscDrawBarSetData(), PetscDrawBarDraw()
External Links
- PETSc Manual:
Draw/PetscDrawBarSetLimits
PETSc.LibPETSc.PetscDrawBarSort — Method
PetscDrawBarSort(petsclib::PetscLibType, bar::PetscDrawBar, sort::PetscBool, tolerance::PetscReal)Sorts the values before drawing the bar chart, the bars will be in ascending order from left to right
Logically Collective
Input Parameters:
bar- The bar graph contextsort-PETSC_TRUEto sort the valuestolerance- discard values less than tolerance
Level: intermediate
See also: PetscDrawBar, PetscDrawBarCreate(), PetscDrawBarSetData(), PetscDrawBarSetColor(), PetscDrawBarDraw(), PetscDrawBarGetAxis()
External Links
- PETSc Manual:
Draw/PetscDrawBarSort
PETSc.LibPETSc.PetscDrawCheckResizedWindow — Method
PetscDrawCheckResizedWindow(petsclib::PetscLibType, draw::PetscDraw)Checks if the user has resized the window.
Collective
Input Parameter:
draw- the window
Level: advanced
See also: PetscDraw, PetscDrawResizeWindow()
External Links
- PETSc Manual:
Draw/PetscDrawCheckResizedWindow
PETSc.LibPETSc.PetscDrawClear — Method
PetscDrawClear(petsclib::PetscLibType, draw::PetscDraw)Clears graphical output. All processors must call this routine. Does not return until the draw in context is clear.
Collective
Input Parameter:
draw- the drawing context
Level: intermediate
See also: PetscDrawBOP(), PetscDrawEOP()
External Links
- PETSc Manual:
Draw/PetscDrawClear
PETSc.LibPETSc.PetscDrawCoordinateToPixel — Method
i::Cint,j::Cint = PetscDrawCoordinateToPixel(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal)given a coordinate in a PetscDraw returns the pixel location
Not Collective
Input Parameters:
draw- the draw where the coordinates are definedx- the horizontal coordinatey- the vertical coordinate
Output Parameters:
i- the horizontal pixel locationj- the vertical pixel location
Level: developer
See also: PetscDraw
External Links
- PETSc Manual:
Draw/PetscDrawCoordinateToPixel
PETSc.LibPETSc.PetscDrawCreate — Method
indraw::PetscDraw = PetscDrawCreate(petsclib::PetscLibType, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint)Creates a graphics context.
Collective
Input Parameters:
comm- MPI communicatordisplay- X display when using X Windowstitle- optional title added to top of windowx- horizonatl coordinate of lower left corner of window orPETSC_DECIDEy- vertical coordinate of lower left corner of window orPETSC_DECIDEw- width of window,PETSC_DECIDE,PETSC_DRAW_HALF_SIZE,PETSC_DRAW_FULL_SIZE,PETSC_DRAW_THIRD_SIZEorPETSC_DRAW_QUARTER_SIZEh- height of window,PETSC_DECIDE,PETSC_DRAW_HALF_SIZE,PETSC_DRAW_FULL_SIZE,PETSC_DRAW_THIRD_SIZEorPETSC_DRAW_QUARTER_SIZE
Output Parameter:
indraw- location to put thePetscDrawcontext
Level: beginner
See also: PetscDrawSetType(), PetscDrawSetFromOptions(), PetscDrawDestroy(), PetscDrawLGCreate(), PetscDrawSPCreate(), PetscDrawViewPortsCreate(), PetscDrawViewPortsSet(), PetscDrawAxisCreate(), PetscDrawHGCreate(), PetscDrawBarCreate(), PetscViewerDrawGetDraw(), PetscDrawSetSave(), PetscDrawSetSaveMovie(), PetscDrawSetSaveFinalImage(), PetscDrawOpenX(), PetscDrawOpenImage(), PetscDrawIsNull(), PetscDrawGetPopup(), PetscDrawCheckResizedWindow(), PetscDrawResizeWindow(), PetscDrawGetWindowSize(), PetscDrawLine(), PetscDrawArrow(), PetscDrawLineSetWidth(), PetscDrawLineGetWidth(), PetscDrawMarker(), PetscDrawPoint(), PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawEllipse(), PetscDrawString(), PetscDrawStringCentered(), PetscDrawStringBoxed(), PetscDrawStringVertical(), PetscDrawSetViewPort(), PetscDrawGetViewPort(), PetscDrawSplitViewPort(), PetscDrawSetTitle(), PetscDrawAppendTitle(), PetscDrawGetTitle(), PetscDrawSetPause(), PetscDrawGetPause(), PetscDrawPause(), PetscDrawSetDoubleBuffer(), PetscDrawClear(), PetscDrawFlush(), PetscDrawGetSingleton(), PetscDrawGetMouseButton(), PetscDrawZoom(), PetscDrawGetBoundingBox()
External Links
- PETSc Manual:
Draw/PetscDrawCreate
PETSc.LibPETSc.PetscDrawDestroy — Method
PetscDrawDestroy(petsclib::PetscLibType, draw::Union{PetscDraw, Ref{PetscDraw}})Deletes a draw context.
Collective
Input Parameter:
draw- the drawing context
Level: beginner
See also: PetscDraw, PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawDestroy
PETSc.LibPETSc.PetscDrawEOP — Method
PetscDrawEOP(petsclib::PetscLibType, draw::PetscDraw)Ends a page or frame on the selected graphical device.
Logically Collective
Input Parameter:
draw- the drawing context
Level: advanced
See also: PetscDrawBOP(), PetscDrawClear()
External Links
- PETSc Manual:
Draw/PetscDrawEOP
PETSc.LibPETSc.PetscDrawEllipse — Method
PetscDrawEllipse(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal, a::PetscReal, b::PetscReal, c::Cint)Draws an ellipse onto a drawable.
Not Collective
Input Parameters:
draw- The drawing contextx- The x coordinate of the centery- The y coordinate of the centera- The major axes lengthb- The minor axes lengthc- The color
Level: beginner
See also: PetscDraw, PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawMarker(), PetscDrawPoint(), PetscDrawString(), PetscDrawArrow()
External Links
- PETSc Manual:
Draw/PetscDrawEllipse
PETSc.LibPETSc.PetscDrawFinalizePackage — Method
PetscDrawFinalizePackage(petsclib::PetscLibType)This function destroys everything in the PETSc interface to the PetscDraw package. It is called from PetscFinalize().
Level: developer
See also: PetscDraw, PetscFinalize()
External Links
- PETSc Manual:
Draw/PetscDrawFinalizePackage
PETSc.LibPETSc.PetscDrawFlush — Method
PetscDrawFlush(petsclib::PetscLibType, draw::PetscDraw)Flushes graphical output.
Collective
Input Parameter:
draw- the drawing context
Level: beginner
See also: PetscDraw, PetscDrawClear()
External Links
- PETSc Manual:
Draw/PetscDrawFlush
PETSc.LibPETSc.PetscDrawGetBoundingBox — Method
xl::PetscReal,yl::PetscReal,xr::PetscReal,yr::PetscReal = PetscDrawGetBoundingBox(petsclib::PetscLibType, draw::PetscDraw)Gets the bounding box of all PetscDrawStringBoxed() commands
Not Collective
Input Parameter:
draw- the drawing context
Output Parameters:
xl- horizontal coordinate of lower left corner of bounding boxyl- vertical coordinate of lower left corner of bounding boxxr- horizontal coordinate of upper right corner of bounding boxyr- vertical coordinate of upper right corner of bounding box
Level: intermediate
See also: PetscDraw, PetscDrawPushCurrentPoint(), PetscDrawPopCurrentPoint(), PetscDrawSetCurrentPoint()
External Links
- PETSc Manual:
Draw/PetscDrawGetBoundingBox
PETSc.LibPETSc.PetscDrawGetCoordinates — Method
xl::PetscReal,yl::PetscReal,xr::PetscReal,yr::PetscReal = PetscDrawGetCoordinates(petsclib::PetscLibType, draw::PetscDraw)Gets the application coordinates of the corners of the window (or page).
Not Collective
Input Parameter:
draw- the drawing object
Output Parameters:
xl- the horizontal coordinate of the lower left corner of the drawing region.yl- the vertical coordinate of the lower left corner of the drawing region.xr- the horizontal coordinate of the upper right corner of the drawing region.yr- the vertical coordinate of the upper right corner of the drawing region.
Level: advanced
See also: PetscDraw, PetscDrawSetCoordinates()
External Links
- PETSc Manual:
Draw/PetscDrawGetCoordinates
PETSc.LibPETSc.PetscDrawGetCurrentPoint — Method
x::PetscReal,y::PetscReal = PetscDrawGetCurrentPoint(petsclib::PetscLibType, draw::PetscDraw)Gets the current draw point, some codes use this point to determine where to draw next
Not Collective
Input Parameter:
draw- the drawing context
Output Parameters:
x- horizontal coordinate of the current pointy- vertical coordinate of the current point
Level: intermediate
See also: PetscDraw, PetscDrawPushCurrentPoint(), PetscDrawPopCurrentPoint(), PetscDrawSetCurrentPoint()
External Links
- PETSc Manual:
Draw/PetscDrawGetCurrentPoint
PETSc.LibPETSc.PetscDrawGetMarkerType — Method
mtype::PetscDrawMarkerType = PetscDrawGetMarkerType(petsclib::PetscLibType, draw::PetscDraw)gets the type of marker to display with PetscDrawMarker()
Not Collective
Input Parameters:
draw- the drawing contextmtype- eitherPETSC_DRAW_MARKER_CROSS(default) orPETSC_DRAW_MARKER_POINT
Level: beginner
See also: PetscDraw, PetscDrawPoint(), PetscDrawMarker(), PetscDrawSetMarkerType(), PetscDrawMarkerType
External Links
- PETSc Manual:
Draw/PetscDrawGetMarkerType
PETSc.LibPETSc.PetscDrawGetMouseButton — Method
button::PetscDrawButton,x_user::PetscReal,y_user::PetscReal,x_phys::PetscReal,y_phys::PetscReal = PetscDrawGetMouseButton(petsclib::PetscLibType, draw::PetscDraw)Returns location of mouse and which button was pressed. Waits for button to be pressed.
Collective
Input Parameter:
draw- the window to be used
Output Parameters:
button- one ofPETSC_BUTTON_LEFT,PETSC_BUTTON_CENTER,PETSC_BUTTON_RIGHT,PETSC_BUTTON_WHEEL_UP,PETSC_BUTTON_WHEEL_DOWNx_user- horizontal user coordinate of location (user may pass in NULL).y_user- vertical user coordinate of location (user may pass in NULL).x_phys- horizontal window coordinate (user may pass in NULL).y_phys- vertical window coordinate (user may pass in NULL).
See also: PetscDraw, PetscDrawButton
External Links
- PETSc Manual:
Draw/PetscDrawGetMouseButton
PETSc.LibPETSc.PetscDrawGetPause — Method
lpause::PetscReal = PetscDrawGetPause(petsclib::PetscLibType, draw::PetscDraw)Gets the amount of time that program pauses after a PetscDrawPause() is called.
Not Collective
Input Parameters:
draw- the drawing objectlpause- number of seconds to pause, -1 implies until user input
Level: intermediate
See also: PetscDraw, PetscDrawSetPause(), PetscDrawPause()
External Links
- PETSc Manual:
Draw/PetscDrawGetPause
PETSc.LibPETSc.PetscDrawGetPopup — Method
popup::PetscDraw = PetscDrawGetPopup(petsclib::PetscLibType, draw::PetscDraw)Creates a popup window associated with a PetscDraw window.
Collective
Input Parameter:
draw- the original window
Output Parameter:
popup- the new popup window
Level: advanced
See also: PetscDraw, PetscDrawScalePopup(), PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawGetPopup
PETSc.LibPETSc.PetscDrawGetSingleton — Method
sdraw::PetscDraw = PetscDrawGetSingleton(petsclib::PetscLibType, draw::PetscDraw)Gain access to a PetscDraw object as if it were owned by the one process.
Collective
Input Parameter:
draw- the original window
Output Parameter:
sdraw- the singleton window
Level: advanced
See also: PetscDraw, PetscDrawRestoreSingleton(), PetscViewerGetSingleton(), PetscViewerRestoreSingleton()
External Links
- PETSc Manual:
Draw/PetscDrawGetSingleton
PETSc.LibPETSc.PetscDrawGetTitle — Method
title::String = PetscDrawGetTitle(petsclib::PetscLibType, draw::PetscDraw)Gets pointer to title of a PetscDraw context.
Not Collective
Input Parameter:
draw- the graphics context
Output Parameter:
title- the title
Level: intermediate
See also: PetscDraw, PetscDrawSetTitle()
External Links
- PETSc Manual:
Draw/PetscDrawGetTitle
PETSc.LibPETSc.PetscDrawGetType — Method
type::String = PetscDrawGetType(petsclib::PetscLibType, draw::PetscDraw)Gets the PetscDraw type as a string from the PetscDraw object.
Not Collective
Input Parameter:
draw- Krylov context
Output Parameter:
type- name of PetscDraw method
Level: advanced
See also: PetscDraw, PetscDrawType, PetscDrawSetType(), PetscDrawCreate(), PetscObjectTypeCompare(), PetscObjectTypeCompareAny()
External Links
- PETSc Manual:
Draw/PetscDrawGetType
PETSc.LibPETSc.PetscDrawGetViewPort — Method
xl::PetscReal,yl::PetscReal,xr::PetscReal,yr::PetscReal = PetscDrawGetViewPort(petsclib::PetscLibType, draw::PetscDraw)Gets the portion of the window (page) to which draw routines will write.
Collective
Input Parameter:
draw- the drawing context
Output Parameters:
xl- the horizontal coordinate of the lower left corner of the subwindow.yl- the vertical coordinate of the lower left corner of the subwindow.xr- the horizontal coordinate of the upper right corner of the subwindow.yr- the vertical coordinate of the upper right corner of the subwindow.
Level: advanced
See also: PetscDraw, PetscDrawSplitViewPort(), PetscDrawSetViewPort()
External Links
- PETSc Manual:
Draw/PetscDrawGetViewPort
PETSc.LibPETSc.PetscDrawGetWindowSize — Method
w::Cint,h::Cint = PetscDrawGetWindowSize(petsclib::PetscLibType, draw::PetscDraw)Gets the size of the window.
Not Collective
Input Parameter:
draw- the window
Output Parameters:
w- the window widthh- the window height
Level: intermediate
See also: PetscDraw, PetscDrawResizeWindow(), PetscDrawCheckResizedWindow()
External Links
- PETSc Manual:
Draw/PetscDrawGetWindowSize
PETSc.LibPETSc.PetscDrawHGAddValue — Method
PetscDrawHGAddValue(petsclib::PetscLibType, hist::PetscDrawHG, value::PetscReal)Adds another value to the histogram.
Logically Collective
Input Parameters:
hist- The histogramvalue- The value
Level: intermediate
See also: PetscDrawHGCreate(), PetscDrawHG, PetscDrawHGDraw(), PetscDrawHGReset(), PetscDrawHGAddWeightedValue()
External Links
- PETSc Manual:
Draw/PetscDrawHGAddValue
PETSc.LibPETSc.PetscDrawHGAddWeightedValue — Method
PetscDrawHGAddWeightedValue(petsclib::PetscLibType, hist::PetscDrawHG, value::PetscReal, weight::PetscReal)Adds another value to the histogram with a weight.
Logically Collective
Input Parameters:
hist- The histogramvalue- The valueweight- The value weight
Level: intermediate
See also: PetscDrawHGCreate(), PetscDrawHG, PetscDrawHGDraw(), PetscDrawHGReset(), PetscDrawHGAddValue()
External Links
- PETSc Manual:
Draw/PetscDrawHGAddWeightedValue
PETSc.LibPETSc.PetscDrawHGCalcStats — Method
PetscDrawHGCalcStats(petsclib::PetscLibType, hist::PetscDrawHG, calc::PetscBool)Turns on calculation of descriptive statistics associated with the histogram
Not Collective
Input Parameters:
hist- The histogram contextcalc- Flag for calculation
Level: intermediate
See also: PetscDrawHG, PetscDrawHGCreate(), PetscDrawHGAddValue(), PetscDrawHGView(), PetscDrawHGDraw()
External Links
- PETSc Manual:
Draw/PetscDrawHGCalcStats
PETSc.LibPETSc.PetscDrawHGCreate — Method
hist::PetscDrawHG = PetscDrawHGCreate(petsclib::PetscLibType, draw::PetscDraw, bins::Cint)Creates a histogram data structure.
Collective
Input Parameters:
draw- The window where the graph will be madebins- The number of bins to use
Output Parameter:
hist- The histogram context
Level: intermediate
See also: PetscDrawHGDestroy(), PetscDrawHG, PetscDrawBarCreate(), PetscDrawBar, PetscDrawLGCreate(), PetscDrawLG, PetscDrawSPCreate(), PetscDrawSP, PetscDrawHGSetNumberBins(), PetscDrawHGReset(), PetscDrawHGAddValue(), PetscDrawHGDraw(), PetscDrawHGSave(), PetscDrawHGView(), PetscDrawHGSetColor(), PetscDrawHGSetLimits(), PetscDrawHGCalcStats(), PetscDrawHGIntegerBins(), PetscDrawHGGetAxis(), PetscDrawAxis, PetscDrawHGGetDraw()
External Links
- PETSc Manual:
Draw/PetscDrawHGCreate
PETSc.LibPETSc.PetscDrawHGDestroy — Method
PetscDrawHGDestroy(petsclib::PetscLibType, hist::Union{PetscDrawHG, Ref{PetscDrawHG}})Frees all space taken up by histogram data structure.
Collective
Input Parameter:
hist- The histogram context
Level: intermediate
See also: PetscDrawHGCreate(), PetscDrawHG
External Links
- PETSc Manual:
Draw/PetscDrawHGDestroy
PETSc.LibPETSc.PetscDrawHGDraw — Method
PetscDrawHGDraw(petsclib::PetscLibType, hist::PetscDrawHG)Redraws a histogram.
Collective
Input Parameter:
hist- The histogram context
Level: intermediate
See also: PetscDrawHGCreate(), PetscDrawHG, PetscDrawHGAddValue(), PetscDrawHGReset()
External Links
- PETSc Manual:
Draw/PetscDrawHGDraw
PETSc.LibPETSc.PetscDrawHGGetAxis — Method
axis::PetscDrawAxis = PetscDrawHGGetAxis(petsclib::PetscLibType, hist::PetscDrawHG)Gets the axis context associated with a histogram. This is useful if one wants to change some axis property, such as labels, color, etc. The axis context should not be destroyed by the application code.
Not Collective, axis is parallel if hist is parallel
Input Parameter:
hist- The histogram context
Output Parameter:
axis- The axis context
Level: intermediate
See also: PetscDrawHG, PetscDrawAxis, PetscDrawHGCreate(), PetscDrawHGAddValue(), PetscDrawHGView(), PetscDrawHGDraw(), PetscDrawHGSetColor(), PetscDrawHGSetLimits()
External Links
- PETSc Manual:
Draw/PetscDrawHGGetAxis
PETSc.LibPETSc.PetscDrawHGGetDraw — Method
draw::PetscDraw = PetscDrawHGGetDraw(petsclib::PetscLibType, hist::PetscDrawHG)Gets the draw context associated with a histogram.
Not Collective, draw is parallel if hist is parallel
Input Parameter:
hist- The histogram context
Output Parameter:
draw- The draw context
Level: intermediate
See also: PetscDraw, PetscDrawHG, PetscDrawHGCreate(), PetscDrawHGAddValue(), PetscDrawHGView(), PetscDrawHGDraw(), PetscDrawHGSetColor(), PetscDrawAxis, PetscDrawHGSetLimits()
External Links
- PETSc Manual:
Draw/PetscDrawHGGetDraw
PETSc.LibPETSc.PetscDrawHGIntegerBins — Method
PetscDrawHGIntegerBins(petsclib::PetscLibType, hist::PetscDrawHG, ints::PetscBool)Turns on integer width bins
Not Collective
Input Parameters:
hist- The histogram contextints- Flag for integer width bins
Level: intermediate
See also: PetscDrawHG, PetscDrawHGCreate(), PetscDrawHGAddValue(), PetscDrawHGView(), PetscDrawHGDraw(), PetscDrawHGSetColor()
External Links
- PETSc Manual:
Draw/PetscDrawHGIntegerBins
PETSc.LibPETSc.PetscDrawHGReset — Method
PetscDrawHGReset(petsclib::PetscLibType, hist::PetscDrawHG)Clears histogram to allow for reuse with new data.
Logically Collective
Input Parameter:
hist- The histogram context.
Level: intermediate
See also: PetscDrawHGCreate(), PetscDrawHG, PetscDrawHGDraw(), PetscDrawHGAddValue()
External Links
- PETSc Manual:
Draw/PetscDrawHGReset
PETSc.LibPETSc.PetscDrawHGSave — Method
PetscDrawHGSave(petsclib::PetscLibType, hg::PetscDrawHG)Saves a drawn image
Collective
Input Parameter:
hg- The histogram context
Level: intermediate
See also: PetscDrawSave(), PetscDrawHGCreate(), PetscDrawHGGetDraw(), PetscDrawSetSave(), PetscDrawHGDraw()
External Links
- PETSc Manual:
Draw/PetscDrawHGSave
PETSc.LibPETSc.PetscDrawHGSetColor — Method
PetscDrawHGSetColor(petsclib::PetscLibType, hist::PetscDrawHG, color::Cint)Sets the color the bars will be drawn with.
Logically Collective
Input Parameters:
hist- The histogram contextcolor- one of the colors defined in petscdraw.h orPETSC_DRAW_ROTATEto make each bar a different color
Level: intermediate
See also: PetscDrawHG, PetscDrawHGCreate(), PetscDrawHGGetDraw(), PetscDrawSetSave(), PetscDrawSave(), PetscDrawHGDraw(), PetscDrawHGGetAxis()
External Links
- PETSc Manual:
Draw/PetscDrawHGSetColor
PETSc.LibPETSc.PetscDrawHGSetLimits — Method
PetscDrawHGSetLimits(petsclib::PetscLibType, hist::PetscDrawHG, x_min::PetscReal, x_max::PetscReal, y_min::Cint, y_max::Cint)Sets the axis limits for a histogram. If more points are added after this call, the limits will be adjusted to include those additional points.
Logically Collective
Input Parameters:
hist- The histogram contextx_min- the horizontal lower limitx_max- the horizontal upper limity_min- the vertical lower limity_max- the vertical upper limit
Level: intermediate
See also: PetscDrawHG, PetscDrawHGCreate(), PetscDrawHGGetDraw(), PetscDrawSetSave(), PetscDrawSave(), PetscDrawHGDraw(), PetscDrawHGGetAxis()
External Links
- PETSc Manual:
Draw/PetscDrawHGSetLimits
PETSc.LibPETSc.PetscDrawHGSetNumberBins — Method
PetscDrawHGSetNumberBins(petsclib::PetscLibType, hist::PetscDrawHG, bins::Cint)Change the number of bins that are to be drawn in the histogram
Logically Collective
Input Parameters:
hist- The histogram context.bins- The number of bins.
Level: intermediate
See also: PetscDrawHGCreate(), PetscDrawHG, PetscDrawHGDraw(), PetscDrawHGIntegerBins()
External Links
- PETSc Manual:
Draw/PetscDrawHGSetNumberBins
PETSc.LibPETSc.PetscDrawHGView — Method
PetscDrawHGView(petsclib::PetscLibType, hist::PetscDrawHG, viewer::PetscViewer)Prints the histogram information to a viewer
Not Collective
Input Parameters:
hist- The histogram contextviewer- The viewer to view it with
Level: beginner
See also: PetscDrawHG, PetscViewer, PetscDrawHGCreate(), PetscDrawHGGetDraw(), PetscDrawSetSave(), PetscDrawSave(), PetscDrawHGDraw()
External Links
- PETSc Manual:
Draw/PetscDrawHGView
PETSc.LibPETSc.PetscDrawIndicatorFunction — Method
PetscDrawIndicatorFunction(petsclib::PetscLibType, draw::PetscDraw, xmin::PetscReal, xmax::PetscReal, ymin::PetscReal, ymax::PetscReal, c::Cint, indicator::external, ctx::Ptr{Cvoid})Draws an indicator function (where a relationship is true) on a PetscDraw
Not Collective
Input Parameters:
draw- aPetscDrawxmin- region to draw indicator functionxmax- region to draw indicator functionymin- region to draw indicator functionymax- region to draw indicator functionc- the color of the regionindicator- the indicator functionctx- the context to pass to the indicator function
Level: developer
See also: PetscDraw
External Links
- PETSc Manual:
Draw/PetscDrawIndicatorFunction
PETSc.LibPETSc.PetscDrawInitializePackage — Method
PetscDrawInitializePackage(petsclib::PetscLibType)This function initializes everything in the PetscDraw package. It is called from PetscDLLibraryRegister_petsc() when using dynamic libraries, and on the call to PetscInitialize() when using shared or static libraries.
Level: developer
See also: PetscDraw, PetscInitialize()
External Links
- PETSc Manual:
Draw/PetscDrawInitializePackage
PETSc.LibPETSc.PetscDrawIsNull — Method
yes::PetscBool = PetscDrawIsNull(petsclib::PetscLibType, draw::PetscDraw)Returns PETSC_TRUE if draw is a null draw object.
Not Collective
Input Parameter:
draw- the draw context
Output Parameter:
yes-PETSC_TRUEif it is a null draw object; otherwisePETSC_FALSE
Level: advanced
See also: PetscDraw, PETSC_DRAW_NULL, PetscDrawOpenX()
External Links
- PETSc Manual:
Draw/PetscDrawIsNull
PETSc.LibPETSc.PetscDrawLGAddCommonPoint — Method
PetscDrawLGAddCommonPoint(petsclib::PetscLibType, lg::PetscDrawLG, x::PetscReal, y::Vector{PetscReal})Adds another point to each of the line graphs. All the points share the same new X coordinate. The new point must have an X coordinate larger than the old points.
Logically Collective
Input Parameters:
lg- the line graph contextx- the common x coordinate pointy- the new y coordinate point for each curve.
Level: intermediate
See also: PetscDrawLG, PetscDrawLGCreate(), PetscDrawLGAddPoints(), PetscDrawLGAddPoint(), PetscDrawLGReset(), PetscDrawLGDraw()
External Links
- PETSc Manual:
Draw/PetscDrawLGAddCommonPoint
PETSc.LibPETSc.PetscDrawLGAddPoint — Method
PetscDrawLGAddPoint(petsclib::PetscLibType, lg::PetscDrawLG, x::Vector{PetscReal}, y::Vector{PetscReal})Adds another point to each of the line graphs. The new point must have an X coordinate larger than the old points.
Logically Collective
Input Parameters:
lg- the line graph contextx- array containing the x coordinate for the point on each curvey- array containing the y coordinate for the point on each curve
Level: intermediate
See also: PetscDrawLG, PetscDrawLGCreate(), PetscDrawLGAddPoints(), PetscDrawLGAddCommonPoint(), PetscDrawLGReset(), PetscDrawLGDraw()
External Links
- PETSc Manual:
Draw/PetscDrawLGAddPoint
PETSc.LibPETSc.PetscDrawLGAddPoints — Method
PetscDrawLGAddPoints(petsclib::PetscLibType, lg::PetscDrawLG, n::PetscInt, xx::Union{Ptr, AbstractArray{PetscReal}}, yy::Union{Ptr, AbstractArray{PetscReal}})Adds several points to each of the line graphs. The new points must have an X coordinate larger than the old points.
Logically Collective
Input Parameters:
lg- the line graph contextxx- array of pointers that point to arrays containing the new x coordinates for each curve.yy- array of pointers that point to arrays containing the new y points for each curve.n- number of points being added
Level: intermediate
See also: PetscDrawLG, PetscDrawLGCreate(), PetscDrawLGAddPoint(), PetscDrawLGAddCommonPoint(), PetscDrawLGReset(), PetscDrawLGDraw()
External Links
- PETSc Manual:
Draw/PetscDrawLGAddPoints
PETSc.LibPETSc.PetscDrawLGCreate — Method
outlg::PetscDrawLG = PetscDrawLGCreate(petsclib::PetscLibType, draw::PetscDraw, dim::PetscInt)Creates a line graph data structure.
Collective
Input Parameters:
draw- the window where the graph will be made.dim- the number of curves which will be drawn
Output Parameter:
outlg- the line graph context
Level: intermediate
See also: PetscDrawLGDestroy(), PetscDrawLGAddPoint(), PetscDrawLGAddCommonPoint(), PetscDrawLGAddPoints(), PetscDrawLGDraw(), PetscDrawLGSave(), PetscDrawLGView(), PetscDrawLGReset(), PetscDrawLGSetDimension(), PetscDrawLGGetDimension(), PetscDrawLGSetLegend(), PetscDrawLGGetAxis(), PetscDrawLGGetDraw(), PetscDrawLGSetUseMarkers(), PetscDrawLGSetLimits(), PetscDrawLGSetColors(), PetscDrawLGSetOptionsPrefix(), PetscDrawLGSetFromOptions()
External Links
- PETSc Manual:
Draw/PetscDrawLGCreate
PETSc.LibPETSc.PetscDrawLGDestroy — Method
PetscDrawLGDestroy(petsclib::PetscLibType, lg::Union{PetscDrawLG, Ref{PetscDrawLG}})Frees all space taken up by line graph data structure.
Collective
Input Parameter:
lg- the line graph context
Level: intermediate
See also: PetscDrawLG, PetscDrawLGCreate()
External Links
- PETSc Manual:
Draw/PetscDrawLGDestroy
PETSc.LibPETSc.PetscDrawLGDraw — Method
PetscDrawLGDraw(petsclib::PetscLibType, lg::PetscDrawLG)Redraws a line graph.
Collective
Input Parameter:
lg- the line graph context
Level: intermediate
See also: PetscDrawLG, PetscDrawSPDraw(), PetscDrawLGSPDraw(), PetscDrawLGReset()
External Links
- PETSc Manual:
Draw/PetscDrawLGDraw
PETSc.LibPETSc.PetscDrawLGGetAxis — Method
axis::PetscDrawAxis = PetscDrawLGGetAxis(petsclib::PetscLibType, lg::PetscDrawLG)Gets the axis context associated with a line graph. This is useful if one wants to change some axis property, such as labels, color, etc. The axis context should not be destroyed by the application code.
Not Collective, if lg is parallel then axis is parallel
Input Parameter:
lg- the line graph context
Output Parameter:
axis- the axis context
Level: advanced
See also: PetscDrawLGCreate(), PetscDrawAxis, PetscDrawLG
External Links
- PETSc Manual:
Draw/PetscDrawLGGetAxis
PETSc.LibPETSc.PetscDrawLGGetData — Method
dim::PetscInt,n::PetscInt,x::Vector{PetscReal},y::Vector{PetscReal} = PetscDrawLGGetData(petsclib::PetscLibType, lg::PetscDrawLG)Get the data being plotted.
Not Collective
Input Parameter:
lg- the line graph context
Output Parameters:
dim- the number of curvesn- the number of points on each linex- The x-value of each point, x[p * dim + c]y- The y-value of each point, y[p * dim + c]
Level: intermediate
See also: PetscDrawLGC, PetscDrawLGCreate(), PetscDrawLGGetDimension()
External Links
- PETSc Manual:
Draw/PetscDrawLGGetData
PETSc.LibPETSc.PetscDrawLGGetDimension — Method
dim::PetscInt = PetscDrawLGGetDimension(petsclib::PetscLibType, lg::PetscDrawLG)Get the number of curves that are to be drawn.
Not Collective
Input Parameter:
lg- the line graph context.
Output Parameter:
dim- the number of curves.
Level: intermediate
See also: PetscDrawLGC, PetscDrawLGCreate(), PetscDrawLGSetDimension()
External Links
- PETSc Manual:
Draw/PetscDrawLGGetDimension
PETSc.LibPETSc.PetscDrawLGGetDraw — Method
draw::PetscDraw = PetscDrawLGGetDraw(petsclib::PetscLibType, lg::PetscDrawLG)Gets the draw context associated with a line graph.
Not Collective, if lg is parallel then draw is parallel
Input Parameter:
lg- the line graph context
Output Parameter:
draw- the draw context
Level: intermediate
See also: PetscDrawLGCreate(), PetscDraw, PetscDrawLG
External Links
- PETSc Manual:
Draw/PetscDrawLGGetDraw
PETSc.LibPETSc.PetscDrawLGReset — Method
PetscDrawLGReset(petsclib::PetscLibType, lg::PetscDrawLG)Clears line graph to allow for reuse with new data.
Logically Collective
Input Parameter:
lg- the line graph context.
Level: intermediate
See also: PetscDrawLG, PetscDrawLGCreate()
External Links
- PETSc Manual:
Draw/PetscDrawLGReset
PETSc.LibPETSc.PetscDrawLGSPDraw — Method
PetscDrawLGSPDraw(petsclib::PetscLibType, lg::PetscDrawLG, spin::PetscDrawSP)Redraws a line graph and a scatter plot on the same PetscDraw they must share
Collective
Input Parameters:
lg- the line graph contextspin- the scatter plot
Level: intermediate
See also: PetscDrawLGDraw(), PetscDrawSPDraw()
External Links
- PETSc Manual:
Draw/PetscDrawLGSPDraw
PETSc.LibPETSc.PetscDrawLGSave — Method
PetscDrawLGSave(petsclib::PetscLibType, lg::PetscDrawLG)Saves a drawn image
Collective
Input Parameter:
lg- The line graph context
Level: intermediate
See also: PetscDrawLG, PetscDrawSave(), PetscDrawLGCreate(), PetscDrawLGGetDraw(), PetscDrawSetSave()
External Links
- PETSc Manual:
Draw/PetscDrawLGSave
PETSc.LibPETSc.PetscDrawLGSetColors — Method
PetscDrawLGSetColors(petsclib::PetscLibType, lg::PetscDrawLG, colors::Vector{Cint})Sets the color of each line graph drawn
Logically Collective
Input Parameters:
lg- the line graph context.colors- the colors, an array of length the value set withPetscDrawLGSetDimension()
Level: intermediate
See also: PetscDrawLG, PetscDrawLGCreate(), PetscDrawLGSetDimension(), PetscDrawLGGetDimension()
External Links
- PETSc Manual:
Draw/PetscDrawLGSetColors
PETSc.LibPETSc.PetscDrawLGSetDimension — Method
PetscDrawLGSetDimension(petsclib::PetscLibType, lg::PetscDrawLG, dim::PetscInt)Change the number of curves that are to be drawn.
Logically Collective
Input Parameters:
lg- the line graph context.dim- the number of curves.
Level: intermediate
See also: PetscDrawLGCreate(), PetscDrawLGGetDimension()
External Links
- PETSc Manual:
Draw/PetscDrawLGSetDimension
PETSc.LibPETSc.PetscDrawLGSetFromOptions — Method
PetscDrawLGSetFromOptions(petsclib::PetscLibType, lg::PetscDrawLG)Sets options related to the line graph object
Collective
Input Parameters:
lg- the line graph context
Options Database Key:
-lg_use_markers (true|false)- true means it draws a marker for each point
Level: intermediate
See also: PetscDrawLG, PetscDrawLGDestroy(), PetscDrawLGCreate()
External Links
- PETSc Manual:
Draw/PetscDrawLGSetFromOptions
PETSc.LibPETSc.PetscDrawLGSetLegend — Method
PetscDrawLGSetLegend(petsclib::PetscLibType, lg::PetscDrawLG, names::String)sets the names of each curve plotted
Logically Collective
Input Parameters:
lg- the line graph context.names- the names for each curve
Level: intermediate
See also: PetscDrawLGGetAxis(), PetscDrawAxis, PetscDrawAxisSetColors(), PetscDrawAxisSetLabels(), PetscDrawAxisSetHoldLimits()
External Links
- PETSc Manual:
Draw/PetscDrawLGSetLegend
PETSc.LibPETSc.PetscDrawLGSetLimits — Method
PetscDrawLGSetLimits(petsclib::PetscLibType, lg::PetscDrawLG, x_min::PetscReal, x_max::PetscReal, y_min::PetscReal, y_max::PetscReal)Sets the axis limits for a line graph. If more points are added after this call, the limits will be adjusted to include those additional points.
Logically Collective
Input Parameters:
lg- the line graph contextx_min- the horizontal lower limitx_max- the horizontal upper limity_min- the vertical lower limity_max- the vertical upper limit
Level: intermediate
See also: PetscDrawLGCreate(), PetscDrawLG, PetscDrawAxis
External Links
- PETSc Manual:
Draw/PetscDrawLGSetLimits
PETSc.LibPETSc.PetscDrawLGSetOptionsPrefix — Method
PetscDrawLGSetOptionsPrefix(petsclib::PetscLibType, lg::PetscDrawLG, prefix::String)Sets the prefix used for searching for all PetscDrawLG options in the database.
Logically Collective
Input Parameters:
lg- the line graph contextprefix- the prefix to prepend to all option names
Level: advanced
See also: PetscDrawLG, PetscDrawLGSetFromOptions(), PetscDrawLGCreate()
External Links
- PETSc Manual:
Draw/PetscDrawLGSetOptionsPrefix
PETSc.LibPETSc.PetscDrawLGSetUseMarkers — Method
PetscDrawLGSetUseMarkers(petsclib::PetscLibType, lg::PetscDrawLG, flg::PetscBool)Causes the line graph object to draw a marker for each data-point.
Logically Collective
Input Parameters:
lg- the linegraph contextflg- should mark each data point
Options Database Key:
-lg_use_markers (true|false)- true means it draws a marker for each point
Level: intermediate
See also: PetscDrawLG, PetscDrawLGCreate()
External Links
- PETSc Manual:
Draw/PetscDrawLGSetUseMarkers
PETSc.LibPETSc.PetscDrawLGView — Method
PetscDrawLGView(petsclib::PetscLibType, lg::PetscDrawLG, viewer::PetscViewer)Prints a line graph.
Collective
Input Parameters:
lg- the line graph contextviewer- the viewer to view it with
Level: beginner
See also: PetscDrawLG, PetscDrawLGCreate()
External Links
- PETSc Manual:
Draw/PetscDrawLGView
PETSc.LibPETSc.PetscDrawLine — Method
PetscDrawLine(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, cl::Cint)draws a line onto a drawable.
Not Collective
Input Parameters:
draw- the drawing contextxl- horizontal coordinate of first end pointyl- vertical coordinate of first end pointxr- horizontal coordinate of second end pointyr- vertical coordinate of second end pointcl- the colors of the endpoints
Level: beginner
See also: PetscDraw, PetscDrawArrow(), PetscDrawLineSetWidth(), PetscDrawLineGetWidth(), PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawEllipse(), PetscDrawMarker(), PetscDrawPoint()
External Links
- PETSc Manual:
Draw/PetscDrawLine
PETSc.LibPETSc.PetscDrawLineGetWidth — Method
width::PetscReal = PetscDrawLineGetWidth(petsclib::PetscLibType, draw::PetscDraw)Gets the line width for future draws. The width is relative to the user coordinates of the window; 0.0 denotes the natural width; 1.0 denotes the interior viewport.
Not Collective
Input Parameter:
draw- the drawing context
Output Parameter:
width- the width in user coordinates
Level: advanced
See also: PetscDraw, PetscDrawLineSetWidth(), PetscDrawLine(), PetscDrawArrow()
External Links
- PETSc Manual:
Draw/PetscDrawLineGetWidth
PETSc.LibPETSc.PetscDrawLineSetWidth — Method
PetscDrawLineSetWidth(petsclib::PetscLibType, draw::PetscDraw, width::PetscReal)Sets the line width for future draws. The width is relative to the user coordinates of the window; 0.0 denotes the natural width; 1.0 denotes the entire viewport.
Not Collective
Input Parameters:
draw- the drawing contextwidth- the width in user coordinates
Level: advanced
See also: PetscDraw, PetscDrawLineGetWidth(), PetscDrawLine(), PetscDrawArrow()
External Links
- PETSc Manual:
Draw/PetscDrawLineSetWidth
PETSc.LibPETSc.PetscDrawMarker — Method
PetscDrawMarker(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint)draws a marker onto a drawable.
Not Collective
Input Parameters:
draw- the drawing contextxl- horizontal coordinate of the markeryl- vertical coordinate of the markercl- the color of the marker
Level: beginner
See also: PetscDraw, PetscDrawPoint(), PetscDrawString(), PetscDrawSetMarkerType(), PetscDrawGetMarkerType()
External Links
- PETSc Manual:
Draw/PetscDrawMarker
PETSc.LibPETSc.PetscDrawOpenImage — Method
draw::PetscDraw = PetscDrawOpenImage(petsclib::PetscLibType, comm::MPI_Comm, filename::String, w::Cint, h::Cint)Opens an image for use with the PetscDraw routines.
Collective
Input Parameters:
comm- the communicator that will share imagefilename- optional name of the file where the image will be storedw- the image width in pixelsh- the image height in pixels
Output Parameter:
draw- the drawing context.
Level: beginner
See also: PetscDraw, PETSC_DRAW_IMAGE, PETSC_DRAW_X, PetscDrawSetSave(), PetscDrawSetFromOptions(), PetscDrawCreate(), PetscDrawDestroy()
External Links
- PETSc Manual:
Draw/PetscDrawOpenImage
PETSc.LibPETSc.PetscDrawOpenNull — Method
win::PetscDraw = PetscDrawOpenNull(petsclib::PetscLibType, comm::MPI_Comm)Opens a null drawing context. All draw commands to it are ignored.
Input Parameter:
comm- MPI communicator
Output Parameter:
win- the drawing context
Level: advanced
See also: PetscDraw, PetscDrawIsNull(), PETSC_DRAW_NULL, PetscDrawOpenX()
External Links
- PETSc Manual:
Draw/PetscDrawOpenNull
PETSc.LibPETSc.PetscDrawOpenX — Method
draw::PetscDraw = PetscDrawOpenX(petsclib::PetscLibType, comm::MPI_Comm, display::String, title::String, x::Cint, y::Cint, w::Cint, h::Cint)Opens an X-window for use with the PetscDraw routines.
Collective
Input Parameters:
comm- the communicator that will share X-windowdisplay- the X display on which to open, orNULLfor the local machinetitle- the title to put in the title bar, orNULLfor no titlex- the x screen coordinates of the upper left corner of window (orPETSC_DECIDE)y- the y screen coordinates of the upper left corner of window (orPETSC_DECIDE)w- the screen width in pixels of (orPETSC_DRAW_HALF_SIZE,PETSC_DRAW_FULL_SIZE, orPETSC_DRAW_THIRD_SIZEorPETSC_DRAW_QUARTER_SIZE)h- the screen height in pixels of (orPETSC_DRAW_HALF_SIZE,PETSC_DRAW_FULL_SIZE, orPETSC_DRAW_THIRD_SIZEorPETSC_DRAW_QUARTER_SIZE)
Output Parameter:
draw- the drawing context.
Options Database Keys:
-nox- Disables all x-windows output-display name- Sets name of machine for the X display-draw_pause pause- Sets time (in seconds) that the program pauses afterPetscDrawPause()has been called
(0 is default, -1 implies until user input).
-draw_cmap name- Sets the colormap to use.-draw_cmap_reverse- Reverses the colormap.-draw_cmap_brighten- Brighten (0 < beta < 1) or darken (-1 < beta < 0) the colormap.-draw_x_shared_colormap- Causes PETSc to use a shared colormap. By default PETSc creates a separate color
for its windows, you must put the mouse into the graphics window to see the correct colors. This options forces PETSc to use the default colormap which will usually result in bad contour plots.
-draw_fast- Does not create colormap for contour plots.-draw_double_buffer- Uses double buffering for smooth animation.-geometry- Indicates location and size of window.
Level: beginner
See also: PetscDrawFlush(), PetscDrawDestroy(), PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawOpenX
PETSc.LibPETSc.PetscDrawPause — Method
PetscDrawPause(petsclib::PetscLibType, draw::PetscDraw)Waits n seconds or until user input, depending on input to PetscDrawSetPause().
Collective
Input Parameter:
draw- the drawing context
Level: beginner
See also: PetscDraw, PetscDrawSetPause(), PetscDrawGetPause()
External Links
- PETSc Manual:
Draw/PetscDrawPause
PETSc.LibPETSc.PetscDrawPixelToCoordinate — Method
x::PetscReal,y::PetscReal = PetscDrawPixelToCoordinate(petsclib::PetscLibType, draw::PetscDraw, i::Cint, j::Cint)given a pixel in a PetscDraw returns the coordinate
Not Collective
Input Parameters:
draw- the draw where the coordinates are definedi- the horizontal pixel locationj- the vertical pixel location
Output Parameters:
x- the horizontal coordinatey- the vertical coordinate
Level: developer
See also: PetscDraw
External Links
- PETSc Manual:
Draw/PetscDrawPixelToCoordinate
PETSc.LibPETSc.PetscDrawPoint — Method
PetscDrawPoint(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint)draws a point onto a drawable.
Not Collective
Input Parameters:
draw- the drawing contextxl- horizatonal coordinate of the pointyl- vertical coordinate of the pointcl- the color of the point
Level: beginner
See also: PetscDraw, PetscDrawPointPixel(), PetscDrawPointSetSize(), PetscDrawLine(), PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawEllipse(), PetscDrawMarker(), PetscDrawString(), PetscDrawArrow()
External Links
- PETSc Manual:
Draw/PetscDrawPoint
PETSc.LibPETSc.PetscDrawPointPixel — Method
PetscDrawPointPixel(petsclib::PetscLibType, draw::PetscDraw, x::Cint, y::Cint, c::Cint)draws a point onto a drawable, in pixel coordinates
Not Collective
Input Parameters:
draw- the drawing contextx- horizontal pixel coordinates of the pointy- vertical pixel coordinates of the pointc- the color of the point
Level: beginner
See also: PetscDraw, PetscDrawPoint(), PetscDrawPointSetSize()
External Links
- PETSc Manual:
Draw/PetscDrawPointPixel
PETSc.LibPETSc.PetscDrawPointSetSize — Method
PetscDrawPointSetSize(petsclib::PetscLibType, draw::PetscDraw, width::PetscReal)Sets the point size for future draws. The size is relative to the user coordinates of the window; 0.0 denotes the natural width, 1.0 denotes the entire viewport.
Not Collective
Input Parameters:
draw- the drawing contextwidth- the width in user coordinates
Level: advanced
See also: PetscDraw, PetscDrawPoint(), PetscDrawMarker()
External Links
- PETSc Manual:
Draw/PetscDrawPointSetSize
PETSc.LibPETSc.PetscDrawPopCurrentPoint — Method
PetscDrawPopCurrentPoint(petsclib::PetscLibType, draw::PetscDraw)Pops a current draw point (discarding it)
Not Collective
Input Parameter:
draw- the drawing context
Level: intermediate
See also: PetscDraw, PetscDrawPushCurrentPoint(), PetscDrawSetCurrentPoint(), PetscDrawGetCurrentPoint()
External Links
- PETSc Manual:
Draw/PetscDrawPopCurrentPoint
PETSc.LibPETSc.PetscDrawPushCurrentPoint — Method
PetscDrawPushCurrentPoint(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal)Pushes a new current draw point, retaining the old one, some codes use this point to determine where to draw next
Not Collective
Input Parameters:
draw- the drawing contextx- horizontal coordinate of the current pointy- vertical coordinate of the current point
Level: intermediate
See also: PetscDraw, PetscDrawPopCurrentPoint(), PetscDrawGetCurrentPoint()
External Links
- PETSc Manual:
Draw/PetscDrawPushCurrentPoint
PETSc.LibPETSc.PetscDrawRectangle — Method
PetscDrawRectangle(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal, c1::Cint, c2::Cint, c3::Cint, c4::Cint)draws a rectangle onto a PetscDraw object
Not Collective
Input Parameters:
draw- the drawing contextxl- coordinates of the lower left corneryl- coordinates of the lower left cornerxr- coordinate of the upper right corneryr- coordinate of the upper right cornerc1- the color of the first cornerc2- the color of the second cornerc3- the color of the third cornerc4- the color of the fourth corner
Level: beginner
See also: PetscDraw, PetscDrawLine(), PetscDrawTriangle(), PetscDrawEllipse(), PetscDrawMarker(), PetscDrawPoint(), PetscDrawString(), PetscDrawArrow()
External Links
- PETSc Manual:
Draw/PetscDrawRectangle
PETSc.LibPETSc.PetscDrawRegister — Method
PetscDrawRegister(petsclib::PetscLibType, sname::String, fnc::external)Adds a method to the graphics package.
Not Collective, No Fortran Support
Input Parameters:
sname- name of a new user-defined graphics classfunction- routine to create method context
Level: developer
See also: PetscDraw, PetscDrawRegisterAll(), PetscDrawRegisterDestroy(), PetscDrawType, PetscDrawSetType()
External Links
- PETSc Manual:
Draw/PetscDrawRegister
PETSc.LibPETSc.PetscDrawResizeWindow — Method
PetscDrawResizeWindow(petsclib::PetscLibType, draw::PetscDraw, w::Cint, h::Cint)Allows one to resize a window from a program.
Collective
Input Parameters:
draw- the windoww- the new width of the windowh- the new height of the window
Level: intermediate
See also: PetscDraw, PetscDrawCheckResizedWindow()
External Links
- PETSc Manual:
Draw/PetscDrawResizeWindow
PETSc.LibPETSc.PetscDrawRestoreSingleton — Method
PetscDrawRestoreSingleton(petsclib::PetscLibType, draw::PetscDraw, sdraw::PetscDraw)Remove access to a PetscDraw object obtained with PetscDrawGetSingleton() by the one process.
Collective
Input Parameters:
draw- the original windowsdraw- the singleton window
Level: advanced
See also: PetscDraw, PetscDrawGetSingleton(), PetscViewerGetSingleton(), PetscViewerRestoreSingleton()
External Links
- PETSc Manual:
Draw/PetscDrawRestoreSingleton
PETSc.LibPETSc.PetscDrawSPAddPoint — Method
x::PetscReal,y::PetscReal = PetscDrawSPAddPoint(petsclib::PetscLibType, sp::PetscDrawSP)Adds another point to each of the scatter plot point curves.
Not Collective
Input Parameters:
sp- the scatter plot data structurex- the x coordinate values (of length dim) for the points of the curvey- the y coordinate values (of length dim) for the points of the curve
Level: intermediate
See also: PetscDrawSPAddPoints(), PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPReset(), PetscDrawSPDraw(), PetscDrawSPAddPointColorized()
External Links
- PETSc Manual:
Draw/PetscDrawSPAddPoint
PETSc.LibPETSc.PetscDrawSPAddPointColorized — Method
x::PetscReal,y::PetscReal,z::PetscReal = PetscDrawSPAddPointColorized(petsclib::PetscLibType, sp::PetscDrawSP)Adds another point to each of the scatter plots as well as a numeric value to be used to colorize the scatter point.
Not Collective
Input Parameters:
sp- the scatter plot data structurex- array of length dim containing the new x coordinate values for each of the point curves.y- array of length dim containing the new y coordinate values for each of the point curves.z- array of length dim containing the numeric values that will be mapped to [0,255] and used for scatter point colors.
Level: intermediate
See also: PetscDrawSPAddPoints(), PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPReset(), PetscDrawSPDraw(), PetscDrawSPAddPoint()
External Links
- PETSc Manual:
Draw/PetscDrawSPAddPointColorized
PETSc.LibPETSc.PetscDrawSPAddPoints — Method
PetscDrawSPAddPoints(petsclib::PetscLibType, sp::PetscDrawSP, n::Cint, xx::Union{Ptr, AbstractArray{PetscReal}}, yy::Union{Ptr, AbstractArray{PetscReal}})Adds several points to each of the scatter plot point curves.
Not Collective
Input Parameters:
sp- the scatter plot contextxx- array of pointers that point to arrays containing the new x coordinates for each curve.yy- array of pointers that point to arrays containing the new y points for each curve.n- number of points being added, each represents a subarray of length dim where dim is the value fromPetscDrawSPGetDimension()
Level: intermediate
See also: PetscDrawSPAddPoint(), PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPReset(), PetscDrawSPDraw(), PetscDrawSPAddPointColorized()
External Links
- PETSc Manual:
Draw/PetscDrawSPAddPoints
PETSc.LibPETSc.PetscDrawSPCreate — Method
drawsp::PetscDrawSP = PetscDrawSPCreate(petsclib::PetscLibType, draw::PetscDraw, dim::Cint)Creates a scatter plot data structure.
Collective
Input Parameters:
draw- the window where the graph will be made.dim- the number of sets of points which will be drawn
Output Parameter:
drawsp- the scatter plot context
Level: intermediate
See also: PetscDrawLGCreate(), PetscDrawLG, PetscDrawBarCreate(), PetscDrawBar, PetscDrawHGCreate(), PetscDrawHG, PetscDrawSPDestroy(), PetscDraw, PetscDrawSP, PetscDrawSPSetDimension(), PetscDrawSPReset(), PetscDrawSPAddPoint(), PetscDrawSPAddPoints(), PetscDrawSPDraw(), PetscDrawSPSave(), PetscDrawSPSetLimits(), PetscDrawSPGetAxis(), PetscDrawAxis, PetscDrawSPGetDraw()
External Links
- PETSc Manual:
Draw/PetscDrawSPCreate
PETSc.LibPETSc.PetscDrawSPDestroy — Method
PetscDrawSPDestroy(petsclib::PetscLibType, sp::Union{PetscDrawSP, Ref{PetscDrawSP}})Frees all space taken up by scatter plot data structure.
Collective
Input Parameter:
sp- the scatter plot context
Level: intermediate
See also: PetscDrawSPCreate(), PetscDrawSP, PetscDrawSPReset()
External Links
- PETSc Manual:
Draw/PetscDrawSPDestroy
PETSc.LibPETSc.PetscDrawSPDraw — Method
PetscDrawSPDraw(petsclib::PetscLibType, sp::PetscDrawSP, clear::PetscBool)Redraws a scatter plot.
Collective
Input Parameters:
sp- the scatter plot contextclear- clear the window before drawing the new plot
Level: intermediate
See also: PetscDrawLGDraw(), PetscDrawLGSPDraw(), PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPReset(), PetscDrawSPAddPoint(), PetscDrawSPAddPoints()
External Links
- PETSc Manual:
Draw/PetscDrawSPDraw
PETSc.LibPETSc.PetscDrawSPGetAxis — Method
axis::PetscDrawAxis = PetscDrawSPGetAxis(petsclib::PetscLibType, sp::PetscDrawSP)Gets the axis context associated with a scatter plot
Not Collective
Input Parameter:
sp- the scatter plot context
Output Parameter:
axis- the axis context
Level: intermediate
See also: PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPDraw(), PetscDrawSPAddPoint(), PetscDrawSPAddPoints(), PetscDrawAxis, PetscDrawAxisCreate()
External Links
- PETSc Manual:
Draw/PetscDrawSPGetAxis
PETSc.LibPETSc.PetscDrawSPGetDimension — Method
dim::Cint = PetscDrawSPGetDimension(petsclib::PetscLibType, sp::PetscDrawSP)Get the number of sets of points that are to be drawn at each PetscDrawSPAddPoint()
Not Collective
Input Parameter:
sp- the scatter plot context.
Output Parameter:
dim- the number of point curves on this process
Level: intermediate
See also: PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPAddPoint(), PetscDrawSPAddPoints()
External Links
- PETSc Manual:
Draw/PetscDrawSPGetDimension
PETSc.LibPETSc.PetscDrawSPGetDraw — Method
draw::PetscDraw = PetscDrawSPGetDraw(petsclib::PetscLibType, sp::PetscDrawSP)Gets the draw context associated with a scatter plot
Not Collective
Input Parameter:
sp- the scatter plot context
Output Parameter:
draw- the draw context
Level: intermediate
See also: PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPDraw(), PetscDraw
External Links
- PETSc Manual:
Draw/PetscDrawSPGetDraw
PETSc.LibPETSc.PetscDrawSPReset — Method
PetscDrawSPReset(petsclib::PetscLibType, sp::PetscDrawSP)Clears scatter plot to allow for reuse with new data.
Not Collective
Input Parameter:
sp- the scatter plot context.
Level: intermediate
See also: PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPAddPoint(), PetscDrawSPAddPoints(), PetscDrawSPDraw()
External Links
- PETSc Manual:
Draw/PetscDrawSPReset
PETSc.LibPETSc.PetscDrawSPSave — Method
PetscDrawSPSave(petsclib::PetscLibType, sp::PetscDrawSP)Saves a drawn image
Collective
Input Parameter:
sp- the scatter plot context
Level: intermediate
See also: PetscDrawSPCreate(), PetscDrawSPGetDraw(), PetscDrawSetSave(), PetscDrawSave()
External Links
- PETSc Manual:
Draw/PetscDrawSPSave
PETSc.LibPETSc.PetscDrawSPSetDimension — Method
PetscDrawSPSetDimension(petsclib::PetscLibType, sp::PetscDrawSP, dim::Cint)Change the number of points that are added at each PetscDrawSPAddPoint()
Not Collective
Input Parameters:
sp- the scatter plot context.dim- the number of point curves on this process
Level: intermediate
See also: PetscDrawSP, PetscDrawSPCreate(), PetscDrawSPAddPoint(), PetscDrawSPAddPoints()
External Links
- PETSc Manual:
Draw/PetscDrawSPSetDimension
PETSc.LibPETSc.PetscDrawSPSetLimits — Method
PetscDrawSPSetLimits(petsclib::PetscLibType, sp::PetscDrawSP, x_min::PetscReal, x_max::PetscReal, y_min::PetscReal, y_max::PetscReal)Sets the axis limits for a scatter plot. If more points are added after this call, the limits will be adjusted to include those additional points.
Not Collective
Input Parameters:
sp- the line graph contextx_min- the horizontal lower limitx_max- the horizontal upper limity_min- the vertical lower limity_max- the vertical upper limit
Level: intermediate
See also: PetscDrawSP, PetscDrawAxis, PetscDrawSPCreate(), PetscDrawSPDraw(), PetscDrawSPAddPoint(), PetscDrawSPAddPoints(), PetscDrawSPGetAxis()
External Links
- PETSc Manual:
Draw/PetscDrawSPSetLimits
PETSc.LibPETSc.PetscDrawSave — Method
PetscDrawSave(petsclib::PetscLibType, draw::PetscDraw)Saves a drawn image
Collective
Input Parameter:
draw- the drawing context
Level: advanced
See also: PetscDraw, PetscDrawSetSave()
External Links
- PETSc Manual:
Draw/PetscDrawSave
PETSc.LibPETSc.PetscDrawSaveMovie — Method
PetscDrawSaveMovie(petsclib::PetscLibType, draw::PetscDraw)Saves a movie from previously saved images
Collective
Input Parameter:
draw- the drawing context
Level: advanced
See also: PetscDraw, PetscDrawSetSave(), PetscDrawSetSaveMovie()
External Links
- PETSc Manual:
Draw/PetscDrawSaveMovie
PETSc.LibPETSc.PetscDrawScalePopup — Method
PetscDrawScalePopup(petsclib::PetscLibType, popup::PetscDraw, min::PetscReal, max::PetscReal)draws a contour scale window.
Collective
Input Parameters:
popup- the window (often a window obtained viaPetscDrawGetPopup()min- minimum value being plottedmax- maximum value being plotted
Level: intermediate
See also: PetscDraw, PetscDrawGetPopup(), PetscDrawTensorContour()
External Links
- PETSc Manual:
Draw/PetscDrawScalePopup
PETSc.LibPETSc.PetscDrawSetCoordinates — Method
PetscDrawSetCoordinates(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal)Sets the application coordinates of the corners of the window (or page).
Not Collective
Input Parameters:
draw- the drawing objectxl- the lower left x coordinateyl- the lower left y coordinatexr- the upper right x coordinateyr- the upper right y coordinate
Level: advanced
See also: PetscDraw, PetscDrawGetCoordinates()
External Links
- PETSc Manual:
Draw/PetscDrawSetCoordinates
PETSc.LibPETSc.PetscDrawSetCurrentPoint — Method
PetscDrawSetCurrentPoint(petsclib::PetscLibType, draw::PetscDraw, x::PetscReal, y::PetscReal)Sets the current draw point, some codes use this point to determine where to draw next
Not Collective
Input Parameters:
draw- the drawing contextx- horizontal coordinate of the current pointy- vertical coordinate of the current point
Level: intermediate
See also: PetscDraw, PetscDrawPushCurrentPoint(), PetscDrawPopCurrentPoint(), PetscDrawGetCurrentPoint()
External Links
- PETSc Manual:
Draw/PetscDrawSetCurrentPoint
PETSc.LibPETSc.PetscDrawSetDisplay — Method
PetscDrawSetDisplay(petsclib::PetscLibType, draw::PetscDraw, display::String)Sets the display where a PetscDraw object will be displayed
Input Parameters:
draw- the drawing contextdisplay- the X windows display
Level: advanced
See also: PetscDraw, PetscDrawOpenX(), PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawSetDisplay
PETSc.LibPETSc.PetscDrawSetDoubleBuffer — Method
PetscDrawSetDoubleBuffer(petsclib::PetscLibType, draw::PetscDraw)Sets a window to be double buffered.
Logically Collective
Input Parameter:
draw- the drawing context
Level: intermediate
See also: PetscDraw, PetscDrawOpenX(), PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawSetDoubleBuffer
PETSc.LibPETSc.PetscDrawSetFromOptions — Method
PetscDrawSetFromOptions(petsclib::PetscLibType, draw::PetscDraw)Sets the graphics type from the options database. Defaults to a PETSc X Windows graphics.
Collective
Input Parameter:
draw- the graphics context
Options Database Keys:
-nox- do not use X graphics (ignore graphics calls, but run program correctly)-nox_warning- when X Windows support is not installed this prevents the warning message from being printed-draw_pause seconds- -1 indicates wait for mouse input, -2 indicates pause when window is to be destroyed-draw_marker_type (x|point)- set the marker type-draw_save [filename]- (X Windows only) saves each image before it is cleared to a file-draw_save_final_image [filename]- (X Windows only) saves the final image displayed in a window-draw_save_movie- converts image files to a movie at the end of the run. SeePetscDrawSetSave()-draw_save_single_file- saves each new image in the same file, normally each new image is saved in a new file with 'filename/filename_%d.ext'-draw_save_on_clear- saves an image on each clear, mainly for debugging-draw_save_on_flush- saves an image on each flush, mainly for debugging
Level: intermediate
See also: PetscDraw, PetscDrawCreate(), PetscDrawSetType(), PetscDrawSetSave(), PetscDrawSetSaveFinalImage(), PetscDrawPause(), PetscDrawSetPause()
External Links
- PETSc Manual:
Draw/PetscDrawSetFromOptions
PETSc.LibPETSc.PetscDrawSetMarkerType — Method
PetscDrawSetMarkerType(petsclib::PetscLibType, draw::PetscDraw, mtype::PetscDrawMarkerType)sets the type of marker to display with PetscDrawMarker()
Not Collective
Input Parameters:
draw- the drawing contextmtype- eitherPETSC_DRAW_MARKER_CROSS(default) orPETSC_DRAW_MARKER_POINT
Options Database Key:
-draw_marker_type- x or point
Level: beginner
See also: PetscDraw, PetscDrawPoint(), PetscDrawMarker(), PetscDrawGetMarkerType(), PetscDrawMarkerType
External Links
- PETSc Manual:
Draw/PetscDrawSetMarkerType
PETSc.LibPETSc.PetscDrawSetOptionsPrefix — Method
PetscDrawSetOptionsPrefix(petsclib::PetscLibType, draw::PetscDraw, prefix::String)Sets the prefix used for searching for all PetscDraw options in the database.
Logically Collective
Input Parameters:
draw- the draw contextprefix- the prefix to prepend to all option names
Level: advanced
See also: PetscDraw, PetscDrawSetFromOptions(), PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawSetOptionsPrefix
PETSc.LibPETSc.PetscDrawSetPause — Method
PetscDrawSetPause(petsclib::PetscLibType, draw::PetscDraw, lpause::PetscReal)Sets the amount of time that program pauses after a PetscDrawPause() is called.
Logically Collective
Input Parameters:
draw- the drawing objectlpause- number of seconds to pause, -1 implies until user input, -2 pauses only on thePetscDrawDestroy()
Options Database Key:
-draw_pause value- set the time to pause
Level: intermediate
See also: PetscDraw, PetscDrawGetPause(), PetscDrawPause()
External Links
- PETSc Manual:
Draw/PetscDrawSetPause
PETSc.LibPETSc.PetscDrawSetSave — Method
PetscDrawSetSave(petsclib::PetscLibType, draw::PetscDraw, filename::String)Saves images produced in a PetscDraw into a file
Collective
Input Parameters:
draw- the graphics contextfilename- name of the file, if .ext then uses name of draw object plus .ext using .ext to determine the image type
Options Database Keys:
-draw_save filename filename-filenamecould bename.extor.ext(where .ext determines the type of graphics file to save, for example .png)-draw_save_final_image [filename]- saves the final image displayed in a window-draw_save_single_file- saves each new image in the same file, normally each new image is saved in a new file with filename/filename_%d.ext
Level: intermediate
See also: PetscDraw, PetscDrawOpenX(), PetscDrawOpenImage(), PetscDrawSetFromOptions(), PetscDrawCreate(), PetscDrawDestroy(), PetscDrawSetSaveFinalImage()
External Links
- PETSc Manual:
Draw/PetscDrawSetSave
PETSc.LibPETSc.PetscDrawSetSaveFinalImage — Method
PetscDrawSetSaveFinalImage(petsclib::PetscLibType, draw::PetscDraw, filename::String)Saves the final image produced in a PetscDraw into a file
Collective
Input Parameters:
draw- the graphics contextfilename- name of the file, if NULL or empty uses name set withPetscDrawSetSave()or the name of the draw object
Options Database Key:
-draw_save_final_image filename- filename could be name.ext or .ext (where .ext determines the type of graphics file to save, for example .png)
Level: intermediate
See also: PetscDraw, PetscDrawSetSave(), PetscDrawSetFromOptions(), PetscDrawCreate(), PetscDrawDestroy()
External Links
- PETSc Manual:
Draw/PetscDrawSetSaveFinalImage
PETSc.LibPETSc.PetscDrawSetSaveMovie — Method
PetscDrawSetSaveMovie(petsclib::PetscLibType, draw::PetscDraw, movieext::String)Saves a movie produced from a PetscDraw into a file
Collective
Input Parameters:
draw- the graphics contextmovieext- optional extension defining the movie format
Options Database Key:
-draw_save_movie .ext- saves a movie with extension .ext
Level: intermediate
See also: PetscDraw, PetscDrawSetSave(), PetscDrawSetFromOptions(), PetscDrawCreate(), PetscDrawDestroy()
External Links
- PETSc Manual:
Draw/PetscDrawSetSaveMovie
PETSc.LibPETSc.PetscDrawSetTitle — Method
PetscDrawSetTitle(petsclib::PetscLibType, draw::PetscDraw, title::String)Sets the title of a PetscDraw context.
Collective
Input Parameters:
draw- the graphics contexttitle- the title
Level: intermediate
See also: PetscDraw, PetscDrawGetTitle(), PetscDrawAppendTitle()
External Links
- PETSc Manual:
Draw/PetscDrawSetTitle
PETSc.LibPETSc.PetscDrawSetType — Method
PetscDrawSetType(petsclib::PetscLibType, draw::PetscDraw, type::String)Builds graphics object for a particular implementation
Collective
Input Parameters:
draw- the graphics contexttype- for example,PETSC_DRAW_X
Options Database Key:
-draw_type (x|null|win32|tikz|image)- Sets the type; seePetscDrawType
Level: intermediate
See also: PetscDraw, PETSC_DRAW_X, PETSC_DRAW_TIKZ, PETSC_DRAW_IMAGE, PetscDrawSetFromOptions(), PetscDrawCreate(), PetscDrawDestroy(), PetscDrawType
External Links
- PETSc Manual:
Draw/PetscDrawSetType
PETSc.LibPETSc.PetscDrawSetViewPort — Method
PetscDrawSetViewPort(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, xr::PetscReal, yr::PetscReal)Sets the portion of the window (page) to which draw routines will write.
Collective
Input Parameters:
xl- the horizontal coordinate of the lower left corner of the subwindow.yl- the vertical coordinate of the lower left corner of the subwindow.xr- the horizontal coordinate of the upper right corner of the subwindow.yr- the vertical coordinate of the upper right corner of the subwindow.draw- the drawing context
Level: advanced
See also: PetscDrawGetViewPort(), PetscDraw, PetscDrawSplitViewPort(), PetscDrawViewPortsCreate()
External Links
- PETSc Manual:
Draw/PetscDrawSetViewPort
PETSc.LibPETSc.PetscDrawSetVisible — Method
PetscDrawSetVisible(petsclib::PetscLibType, draw::PetscDraw, visible::PetscBool)Sets if the drawing surface (the 'window') is visible on its display.
Input Parameters:
draw- the drawing windowvisible- if the surface should be visible
Level: intermediate
See also: PetscDraw
External Links
- PETSc Manual:
Draw/PetscDrawSetVisible
PETSc.LibPETSc.PetscDrawSplitViewPort — Method
PetscDrawSplitViewPort(petsclib::PetscLibType, draw::PetscDraw)Splits a window shared by several processes into smaller view ports. One for each process.
Collective
Input Parameter:
draw- the drawing context
Level: advanced
See also: PetscDrawDivideViewPort(), PetscDrawSetViewPort()
External Links
- PETSc Manual:
Draw/PetscDrawSplitViewPort
PETSc.LibPETSc.PetscDrawString — Method
PetscDrawString(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint, text::String)draws text onto a drawable.
Not Collective
Input Parameters:
draw- the drawing contextxl- coordinate of lower left corner of textyl- coordinate of lower left corner of textcl- the color of the texttext- the text to draw
Level: beginner
See also: PetscDraw, PetscDrawStringVertical(), PetscDrawStringCentered(), PetscDrawStringBoxed(), PetscDrawStringSetSize(), PetscDrawStringGetSize(), PetscDrawLine(), PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawEllipse(), PetscDrawMarker(), PetscDrawPoint()
External Links
- PETSc Manual:
Draw/PetscDrawString
PETSc.LibPETSc.PetscDrawStringBoxed — Method
w::PetscReal,h::PetscReal = PetscDrawStringBoxed(petsclib::PetscLibType, draw::PetscDraw, sxl::PetscReal, syl::PetscReal, sc::Cint, bc::Cint, text::String)Draws a string with a box around it
Not Collective
Input Parameters:
draw- the drawing contextsxl- the coordinates of center of the boxsyl- the coordinates of top line of boxsc- the color of the textbc- the color of the bounding boxtext- the text to draw
Output Parameters:
w- the width of the resulting box (optional)h- the height of resulting box (optional)
Level: beginner
See also: PetscDraw, PetscDrawStringVertical(), PetscDrawString(), PetscDrawStringCentered(), PetscDrawStringSetSize(), PetscDrawStringGetSize()
External Links
- PETSc Manual:
Draw/PetscDrawStringBoxed
PETSc.LibPETSc.PetscDrawStringCentered — Method
PetscDrawStringCentered(petsclib::PetscLibType, draw::PetscDraw, xc::PetscReal, yl::PetscReal, cl::Cint, text::String)draws text onto a drawable centered at a point
Not Collective
Input Parameters:
draw- the drawing contextxc- the coordinates of right-left center of textyl- the coordinates of lower edge of textcl- the color of the texttext- the text to draw
Level: beginner
See also: PetscDraw, PetscDrawStringVertical(), PetscDrawString(), PetscDrawStringBoxed(), PetscDrawStringSetSize(), PetscDrawStringGetSize()
External Links
- PETSc Manual:
Draw/PetscDrawStringCentered
PETSc.LibPETSc.PetscDrawStringGetSize — Method
width::PetscReal,height::PetscReal = PetscDrawStringGetSize(petsclib::PetscLibType, draw::PetscDraw)Gets the size for character text. The width is relative to the user coordinates of the window.
Not Collective
Input Parameters:
draw- the drawing contextwidth- the width in user coordinatesheight- the character height
Level: advanced
See also: PetscDraw, PetscDrawStringVertical(), PetscDrawString(), PetscDrawStringCentered(), PetscDrawStringBoxed(), PetscDrawStringSetSize()
External Links
- PETSc Manual:
Draw/PetscDrawStringGetSize
PETSc.LibPETSc.PetscDrawStringSetSize — Method
PetscDrawStringSetSize(petsclib::PetscLibType, draw::PetscDraw, width::PetscReal, height::PetscReal)Sets the size for character text.
Not Collective
Input Parameters:
draw- the drawing contextwidth- the width in user coordinatesheight- the character height in user coordinates
Level: advanced
See also: PetscDraw, PetscDrawStringVertical(), PetscDrawString(), PetscDrawStringCentered(), PetscDrawStringBoxed(), PetscDrawStringGetSize()
External Links
- PETSc Manual:
Draw/PetscDrawStringSetSize
PETSc.LibPETSc.PetscDrawStringVertical — Method
PetscDrawStringVertical(petsclib::PetscLibType, draw::PetscDraw, xl::PetscReal, yl::PetscReal, cl::Cint, text::String)draws text onto a drawable.
Not Collective
Input Parameters:
draw- the drawing contextxl- coordinate of upper left corner of textyl- coordinate of upper left corner of textcl- the color of the texttext- the text to draw
Level: beginner
See also: PetscDraw, PetscDrawString(), PetscDrawStringCentered(), PetscDrawStringBoxed(), PetscDrawStringSetSize(), PetscDrawStringGetSize()
External Links
- PETSc Manual:
Draw/PetscDrawStringVertical
PETSc.LibPETSc.PetscDrawTensorContour — Method
PetscDrawTensorContour(petsclib::PetscLibType, draw::PetscDraw, m::Cint, n::Cint, xi::Vector{PetscReal}, yi::Vector{PetscReal}, v::Vector{PetscReal})draws a contour plot for a two-dimensional array
Collective, but draw must be sequential
Input Parameters:
draw- the draw contextm- the number of local mesh points in the x directionn- the number of local mesh points in the y directionxi- the locations of the global mesh points in the horizontal direction (optional, useNULLto indicate uniform spacing on [0,1])yi- the locations of the global mesh points in the vertical direction (optional, useNULLto indicate uniform spacing on [0,1])v- the values
Options Database Keys:
-draw_x_shared_colormap- Indicates use of private colormap-draw_contour_grid- draws grid contour
Level: intermediate
See also: PetscDraw, PetscDrawTensorContourPatch(), PetscDrawScalePopup()
External Links
- PETSc Manual:
Draw/PetscDrawTensorContour
PETSc.LibPETSc.PetscDrawTensorContourPatch — Method
x::PetscReal,y::PetscReal,v::PetscReal = PetscDrawTensorContourPatch(petsclib::PetscLibType, draw::PetscDraw, m::Cint, n::Cint, min::PetscReal, max::PetscReal)draws a rectangular patch of a contour plot for a two-dimensional array.
Not Collective
Input Parameters:
draw- the draw contextm- the number of local mesh points in the x directionn- the number of local mesh points in the y directionx- the horizontal locations of the local mesh pointsy- the vertical locations of the local mesh pointsmin- the minimum value in the entire contourmax- the maximum value in the entire contourv- the data
Options Database Key:
-draw_x_shared_colormap- Activates private colormap
Level: advanced
See also: PetscDraw, PetscDrawTensorContour()
External Links
- PETSc Manual:
Draw/PetscDrawTensorContourPatch
PETSc.LibPETSc.PetscDrawTriangle — Method
PetscDrawTriangle(petsclib::PetscLibType, draw::PetscDraw, x1::PetscReal, y_1::PetscReal, x2::PetscReal, y2::PetscReal, x3::PetscReal, y3::PetscReal, c1::Cint, c2::Cint, c3::Cint)draws a triangle onto a drawable.
Not Collective
Input Parameters:
draw- the drawing contextx1- coordinate of the first vertexy_1- coordinate of the first vertexx2- coordinate of the second vertexy2- coordinate of the second vertexx3- coordinate of the third vertexy3- coordinate of the third vertexc1- color of the first vertexc2- color of the second vertexc3- color of the third vertext
Level: beginner
See also: PetscDraw, PetscDrawLine(), PetscDrawRectangle(), PetscDrawEllipse(), PetscDrawMarker(), PetscDrawPoint(), PetscDrawArrow()
External Links
- PETSc Manual:
Draw/PetscDrawTriangle
PETSc.LibPETSc.PetscDrawUtilitySetCmap — Method
PetscDrawUtilitySetCmap(petsclib::PetscLibType, colormap::String, mapsize::Cint, char::Vector{Cuchar}, M_char::Vector{Cuchar}, M_char_2::Vector{Cuchar})Populate the RGB entries of a colormap from a named palette, honoring options-database overrides for the colormap name, reversal, and brightness.
Not Collective
Input Parameters:
colormap- the name of the colormap (e.g."hue","gray","jet","viridis"), orNULL/empty for the defaultmapsize- the number of colormap entries to fill
Output Parameters:
R- the red channel of lengthmapsizeG- the green channel of lengthmapsizeB- the blue channel of lengthmapsize
Options Database Keys:
-draw_cmap name- select the colormap by name-draw_cmap_reverse- reverse the colormap-draw_cmap_brighten value- brighten (positive) or darken (negative) the colormap; value must be in(-1, 1)
Level: developer
See also: PetscDraw, PetscDrawUtilitySetGamma()
External Links
- PETSc Manual:
Draw/PetscDrawUtilitySetCmap
PETSc.LibPETSc.PetscDrawUtilitySetGamma — Method
PetscDrawUtilitySetGamma(petsclib::PetscLibType, g::PetscReal)Set the monitor gamma-correction value used by the drawing colormap utilities.
Not Collective
Input Parameter:
g- the gamma value; a typical value is 2.0
Level: developer
See also: PetscDraw, PetscDrawUtilitySetCmap()
External Links
- PETSc Manual:
Draw/PetscDrawUtilitySetGamma
PETSc.LibPETSc.PetscDrawView — Method
PetscDrawView(petsclib::PetscLibType, indraw::PetscDraw, viewer::PetscViewer)Prints the PetscDraw data structure.
Collective
Input Parameters:
indraw- thePetscDrawcontextviewer- visualization context
See PetscDrawSetFromOptions() for options database keys
See also: PetscDraw, PetscViewerASCIIOpen(), PetscViewer
External Links
- PETSc Manual:
Draw/PetscDrawView
PETSc.LibPETSc.PetscDrawViewFromOptions — Method
PetscDrawViewFromOptions(petsclib::PetscLibType, A::PetscDraw, obj, name::String)View a PetscDraw from the option database
Collective
Input Parameters:
A- thePetscDrawcontextobj- Optional objectname- command line option
Options Database Key:
-name [viewertype][:...]- option name and values. SeePetscObjectViewFromOptions()for the possible arguments
Level: intermediate
See also: PetscDraw, PetscDrawView, PetscObjectViewFromOptions(), PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawViewFromOptions
PETSc.LibPETSc.PetscDrawViewPortsCreate — Method
newports::Ptr{PetscDrawViewPorts} = PetscDrawViewPortsCreate(petsclib::PetscLibType, draw::PetscDraw, nports::PetscInt)Splits a window into smaller view ports. Each processor shares all the viewports.
Collective
Input Parameters:
draw- the drawing contextnports- the number of ports
Output Parameter:
newports- aPetscDrawViewPortscontext (C structure)
Options Database Key:
-draw_ports- display multiple fields in the same window with PetscDrawPorts() instead of in separate windows
Level: advanced
See also: PetscDrawSplitViewPort(), PetscDrawSetViewPort(), PetscDrawViewPortsSet(), PetscDrawViewPortsDestroy()
External Links
- PETSc Manual:
Draw/PetscDrawViewPortsCreate
PETSc.LibPETSc.PetscDrawViewPortsCreateRect — Method
newports::Ptr{PetscDrawViewPorts} = PetscDrawViewPortsCreateRect(petsclib::PetscLibType, draw::PetscDraw, nx::PetscInt, ny::PetscInt)Splits a window into smaller view ports. Each processor shares all the viewports. The number of views in the x- and y-directions is specified.
Collective
Input Parameters:
draw- the drawing contextnx- the number of x divisionsny- the number of y divisions
Output Parameter:
newports- aPetscDrawViewPortscontext (C structure)
Level: advanced
See also: PetscDrawSplitViewPort(), PetscDrawSetViewPort(), PetscDrawViewPortsSet(), PetscDrawViewPortsDestroy(), PetscDrawViewPorts
External Links
- PETSc Manual:
Draw/PetscDrawViewPortsCreateRect
PETSc.LibPETSc.PetscDrawViewPortsDestroy — Method
PetscDrawViewPortsDestroy(petsclib::PetscLibType, ports::Vector{PetscDrawViewPorts})frees a PetscDrawViewPorts object
Collective on the PetscDraw inside ports
Input Parameter:
ports- thePetscDrawViewPortsobject
Level: advanced
See also: PetscDrawViewPorts, PetscDrawSplitViewPort(), PetscDrawSetViewPort(), PetscDrawViewPortsSet(), PetscDrawViewPortsCreate()
External Links
- PETSc Manual:
Draw/PetscDrawViewPortsDestroy
PETSc.LibPETSc.PetscDrawViewPortsSet — Method
PetscDrawViewPortsSet(petsclib::PetscLibType, ports::Vector{PetscDrawViewPorts}, port::PetscInt)sets a draw object to use a particular subport
Logically Collective on the PetscDraw inside ports
Input Parameters:
ports- thePetscDrawViewPortsobjectport- the port number, from 0 to nports-1
Level: advanced
See also: PetscDrawViewPorts, PetscDrawSplitViewPort(), PetscDrawSetViewPort(), PetscDrawViewPortsDestroy(), PetscDrawViewPortsCreate()
External Links
- PETSc Manual:
Draw/PetscDrawViewPortsSet
PETSc.LibPETSc.PetscDrawZoom — Method
PetscDrawZoom(petsclib::PetscLibType, draw::PetscDraw, func::external, ctx::Ptr{Cvoid})Allows one to provide a function that gets called for zooming in on a drawing using the mouse buttons
Collective draw
Input Parameters:
draw- the window where the graph will be made.func- users function that draws the graphicctx- pointer to any application required data
Calling sequence of func:
draw- thePetscDrawobject to zoom onctx- the context for the zooming operation
Level: advanced
See also: PetscDraw, PetscDrawCreate()
External Links
- PETSc Manual:
Draw/PetscDrawZoom