petsc-master 2017-01-20
Report Typos and Errors


Creates a histogram data structure.


#include "petscdraw.h" 
#include "petscsys.h" 
#include "petscviewer.h" 
PetscErrorCode  PetscDrawHGCreate(PetscDraw draw,int bins,PetscDrawHG *hist)
Collective on PetscDraw

Input Parameters

draw - The window where the graph will be made
bins - The number of bins to use

Output Parameters

hist -The histogram context

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

The histogram is only displayed when PetscDrawHGDraw() is called.

The MPI communicator that owns the PetscDraw owns this PetscDrawHG, 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 PetscDrawHGDraw() to display the updated graph.

See Also

PetscDrawHGDestroy(), PetscDrawHG, PetscDrawBarCreate(), PetscDrawBar, PetscDrawLGCreate(), PetscDrawLG, PetscDrawSPCreate(), PetscDrawSP,
PetscDrawHGSetNumberBins(), PetscDrawHGReset(), PetscDrawHGAddValue(), PetscDrawHGDraw(), PetscDrawHGSave(), PetscDrawHGView(), PetscDrawHGSetColor(), PetscDrawHGSetLimits(), PetscDrawHGCalcStats(), PetscDrawHGIntegerBins(), PetscDrawHGGetAxis(), PetscDrawAxis, PetscDrawHGGetDraw()

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