petsc-3.13.6 2020-09-29
Report Typos and Errors


Creates a bar graph data structure.


#include "petscdraw.h" 
#include "petscsys.h" 
#include "petscviewer.h" 
PetscErrorCode  PetscDrawBarCreate(PetscDraw draw,PetscDrawBar *bar)
Collective over PetscDraw

Input Parameters

draw -The window where the graph will be made

Output Parameters

bar -The bar graph context


Call PetscDrawBarSetData() to provide the bins to be plotted and then PetscDrawBarDraw() to display the new plot

The difference between a bar chart, PetscDrawBar, and a histogram, PetscDrawHG, is explained here

The MPI communicator that owns the PetscDraw owns this PetscDrawBar, but the calls to set options and add data are ignored on all processes except the zeroth MPI process in the communicator. All MPI processes in the communicator must call PetscDrawBarDraw() to display the updated graph.

See Also

PetscDrawLGCreate(), PetscDrawLG, PetscDrawSPCreate(), PetscDrawSP, PetscDrawHGCreate(), PetscDrawHG, PetscDrawBarDestroy(), PetscDrawBarSetData(),
PetscDrawBar, PetscDrawBarDraw(), PetscDrawBarSave(), PetscDrawBarSetColor(), PetscDrawBarSort(), PetscDrawBarSetLimits(), PetscDrawBarGetAxis(), PetscDrawAxis, PetscDrawBarGetDraw(), PetscDrawBarSetFromOptions()




Index of all Draw routines
Table of Contents for all manual pages
Index of all manual pages