diff --git a/implot.h b/implot.h index 316915b..d045cbf 100644 --- a/implot.h +++ b/implot.h @@ -537,6 +537,8 @@ template IMPLOT_API void PlotBarsH(const char* label_id, const T* v template IMPLOT_API void PlotBarsH(const char* label_id, const T* xs, const T* ys, int count, double height, int offset=0, int stride=sizeof(T)); IMPLOT_API void PlotBarsHG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, double height, int offset=0); + + // Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot. template IMPLOT_API void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, int offset=0, int stride=sizeof(T)); template IMPLOT_API void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, int offset=0, int stride=sizeof(T)); diff --git a/implot_internal.h b/implot_internal.h index c7f40ea..5da0689 100644 --- a/implot_internal.h +++ b/implot_internal.h @@ -1270,7 +1270,7 @@ void FillRange(ImVector& buffer, int n, T vmin, T vmax) { // Offsets and strides a data buffer template static inline T OffsetAndStride(const T* data, int idx, int , int , int stride) { - // idx = ImPosMod(offset + idx, count); + idx = ImPosMod(offset + idx, count); return *(const T*)(const void*)((const unsigned char*)data + (size_t)idx * stride); }