#include "petscdraw.h" #include "petscsys.h" #include "petscviewer.h" PetscErrorCode PetscDrawBarCreate(PetscDraw draw,PetscDrawBar *bar)Collective over PetscDraw
The difference between a bar chart, PetscDrawBar, and a histogram, PetscDrawHG, is explained here https://stattrek.com/statistics/charts/histogram.aspx?Tutorial=AP
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.