mirror of
https://github.com/gwm17/implot.git
synced 2024-11-26 20:28:50 -05:00
add xscale and x0 to values* functions
This commit is contained in:
parent
fbfd41047b
commit
4f0a09f14d
54
implot.h
54
implot.h
|
@ -345,55 +345,55 @@ IMPLOT_API void EndPlot();
|
|||
// if you try plotting extremely large 64-bit integral types. Proceed with caution!
|
||||
|
||||
// Plots a standard 2D line plot.
|
||||
template <typename T> IMPLOT_API void PlotLine(const char* label_id, const T* values, int count, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotLine(const char* label_id, const T* xs, const T* ys, int count, int offset = 0, int stride = sizeof(T));
|
||||
IMPLOT_API void PlotLineG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, int offset = 0);
|
||||
template <typename T> IMPLOT_API void PlotLine(const char* label_id, const T* values, int count, double xscale=1, double x0=0, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotLine(const char* label_id, const T* xs, const T* ys, int count, int offset=0, int stride=sizeof(T));
|
||||
IMPLOT_API void PlotLineG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, int offset=0);
|
||||
|
||||
// Plots a standard 2D scatter plot. Default marker is ImPlotMarker_Circle.
|
||||
template <typename T> IMPLOT_API void PlotScatter(const char* label_id, const T* values, int count, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, int offset = 0, int stride = sizeof(T));
|
||||
IMPLOT_API void PlotScatterG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, int offset = 0);
|
||||
template <typename T> IMPLOT_API void PlotScatter(const char* label_id, const T* values, int count, double xscale=1, double x0=0, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, int offset=0, int stride=sizeof(T));
|
||||
IMPLOT_API void PlotScatterG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, int offset=0);
|
||||
|
||||
// Plots a shaded (filled) region between two lines, or a line and a horizontal reference.
|
||||
template <typename T> IMPLOT_API void PlotShaded(const char* label_id, const T* values, int count, double y_ref = 0, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double y_ref = 0, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, int offset = 0, int stride = sizeof(T));
|
||||
IMPLOT_API void PlotShadedG(const char* label_id, ImPlotPoint (*getter1)(void* data, int idx), void* data1, ImPlotPoint (*getter2)(void* data, int idx), void* data2, int count, int offset = 0);
|
||||
template <typename T> IMPLOT_API void PlotShaded(const char* label_id, const T* values, int count, double y_ref=0, double xscale=1, double x0=0, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double y_ref=0, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotShaded(const char* label_id, const T* xs, const T* ys1, const T* ys2, int count, int offset=0, int stride=sizeof(T));
|
||||
IMPLOT_API void PlotShadedG(const char* label_id, ImPlotPoint (*getter1)(void* data, int idx), void* data1, ImPlotPoint (*getter2)(void* data, int idx), void* data2, int count, int offset=0);
|
||||
|
||||
// Plots a vertical bar graph. #width and #shift are in X units.
|
||||
template <typename T> IMPLOT_API void PlotBars(const char* label_id, const T* values, int count, double width = 0.67, double shift = 0, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double width, int offset = 0, int stride = sizeof(T));
|
||||
IMPLOT_API void PlotBarsG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, double width, int offset = 0);
|
||||
template <typename T> IMPLOT_API void PlotBars(const char* label_id, const T* values, int count, double width=0.67, double shift=0, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double width, int offset=0, int stride=sizeof(T));
|
||||
IMPLOT_API void PlotBarsG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, double width, int offset=0);
|
||||
|
||||
// Plots a horizontal bar graph. #height and #shift are in Y units.
|
||||
template <typename T> IMPLOT_API void PlotBarsH(const char* label_id, const T* values, int count, double height = 0.67, double shift = 0, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> 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);
|
||||
template <typename T> IMPLOT_API void PlotBarsH(const char* label_id, const T* values, int count, double height=0.67, double shift=0, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> 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 <typename T> 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 <typename T> 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));
|
||||
template <typename T> 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 <typename T> 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));
|
||||
|
||||
// Plots horizontal error bars. The label_id should be the same as the label_id of the associated line or bar plot.
|
||||
template <typename T> IMPLOT_API void PlotErrorBarsH(const char* label_id, const T* xs, const T* ys, const T* err, int count, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotErrorBarsH(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));
|
||||
template <typename T> IMPLOT_API void PlotErrorBarsH(const char* label_id, const T* xs, const T* ys, const T* err, int count, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotErrorBarsH(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));
|
||||
|
||||
/// Plots vertical stems.
|
||||
template <typename T> IMPLOT_API void PlotStems(const char* label_id, const T* values, int count, double y_ref = 0, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double y_ref = 0, int offset = 0, int stride = sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotStems(const char* label_id, const T* values, int count, double y_ref=0, double xscale=1, double x0=0, int offset=0, int stride=sizeof(T));
|
||||
template <typename T> IMPLOT_API void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double y_ref=0, int offset=0, int stride=sizeof(T));
|
||||
|
||||
// Plots a pie chart. If the sum of values > 1 or normalize is true, each value will be normalized. Center and radius are in plot units. #label_fmt can be set to NULL for no labels.
|
||||
template <typename T> IMPLOT_API void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, bool normalize = false, const char* label_fmt = "%.1f", double angle0 = 90);
|
||||
template <typename T> IMPLOT_API void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, bool normalize=false, const char* label_fmt="%.1f", double angle0=90);
|
||||
|
||||
// Plots a 2D heatmap chart. Values are expected to be in row-major order. #label_fmt can be set to NULL for no labels.
|
||||
template <typename T> IMPLOT_API void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min, double scale_max, const char* label_fmt = "%.1f", const ImPlotPoint& bounds_min = ImPlotPoint(0,0), const ImPlotPoint& bounds_max = ImPlotPoint(1,1));
|
||||
template <typename T> IMPLOT_API void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min, double scale_max, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1));
|
||||
|
||||
// Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.
|
||||
template <typename T> IMPLOT_API void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, int offset = 0, int stride = sizeof(T));
|
||||
IMPLOT_API void PlotDigitalG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, int offset = 0);
|
||||
template <typename T> IMPLOT_API void PlotDigital(const char* label_id, const T* xs, const T* ys, int count, int offset=0, int stride=sizeof(T));
|
||||
IMPLOT_API void PlotDigitalG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, int offset=0);
|
||||
|
||||
// Plots a centered text label at point x,y with optional pixel offset. Text color can be changed with ImPlot::PushStyleColor(ImPlotCol_InlayText, ...).
|
||||
IMPLOT_API void PlotText(const char* text, double x, double y, bool vertical = false, const ImVec2& pixel_offset = ImVec2(0,0));
|
||||
IMPLOT_API void PlotText(const char* text, double x, double y, bool vertical=false, const ImVec2& pixel_offset=ImVec2(0,0));
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Plot Utils
|
||||
|
|
|
@ -529,15 +529,12 @@ void ShowDemoWindow(bool* p_open) {
|
|||
ImPlot::SetNextPlotLimitsX(t - history, t, ImGuiCond_Always);
|
||||
if (ImPlot::BeginPlot("##Scrolling", NULL, NULL, ImVec2(-1,150), 0, rt_axis, rt_axis | ImPlotAxisFlags_LockMin)) {
|
||||
ImPlot::PlotShaded("Data 1", &sdata1.Data[0].x, &sdata1.Data[0].y, sdata1.Data.size(), 0, sdata1.Offset, 2 * sizeof(float));
|
||||
ImPlot::PlotLine("Data 2", &sdata2.Data[0], sdata2.Data.size(), sdata2.Offset);
|
||||
ImPlot::PlotLine("Data 2", &sdata2.Data[0].x, &sdata2.Data[0].y, sdata2.Data.size(), sdata2.Offset, 2*sizeof(float));
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
ImPlot::SetNextPlotLimitsX(0, history, ImGuiCond_Always);
|
||||
if (ImPlot::BeginPlot("##Rolling", NULL, NULL, ImVec2(-1,150), 0, rt_axis, rt_axis)) {
|
||||
// two methods of plotting Data
|
||||
// as ImVec2* (or ImPlot*):
|
||||
ImPlot::PlotLine("Data 1", &rdata1.Data[0], rdata1.Data.size());
|
||||
// as float*, float* (or double*, double*) with stride of 2 * sizeof
|
||||
ImPlot::PlotLine("Data 1", &rdata1.Data[0].x, &rdata1.Data[0].y, rdata1.Data.size(), 0, 2 * sizeof(float));
|
||||
ImPlot::PlotLine("Data 2", &rdata2.Data[0].x, &rdata2.Data[0].y, rdata2.Data.size(), 0, 2 * sizeof(float));
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
|
@ -1212,7 +1209,7 @@ void ShowDemoWindow(bool* p_open) {
|
|||
ImGui::SameLine(); ImGui::ColorEdit4("##Bear", &bearCol.x, ImGuiColorEditFlags_NoInputs);
|
||||
ImPlot::GetStyle().UseLocalTime = false;
|
||||
ImPlot::SetNextPlotLimits(1546300800, 1571961600, 1250, 1600);
|
||||
if (ImPlot::BeginPlot("Candlestick Chart","Day","USD",ImVec2(-1,-1),0,ImPlotAxisFlags_Time)) {
|
||||
if (ImPlot::BeginPlot("Candlestick Chart","Day","USD",ImVec2(-1,0),0,ImPlotAxisFlags_Time)) {
|
||||
MyImPlot::PlotCandlestick("GOOGL",dates, opens, closes, lows, highs, 218, tooltip, 0.25f, bullCol, bearCol);
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
|
@ -1542,8 +1539,10 @@ void ShowBenchmarkTool() {
|
|||
static char buffer[64];
|
||||
if (ImPlot::BeginPlot("##Stats", "Items (1,000 pts each)", "Framerate (Hz)", ImVec2(-1,0), ImPlotFlags_NoChild)) {
|
||||
for (int run = 0; run < records.size(); ++run) {
|
||||
sprintf(buffer, "B%d-%s%s", run + 1, names[records[run].Mode], records[run].AA ? "-AA" : "");
|
||||
ImPlot::PlotLine(buffer, records[run].Data.Data, records[run].Data.Size);
|
||||
if (records[run].Data.Size > 1) {
|
||||
sprintf(buffer, "B%d-%s%s", run + 1, names[records[run].Mode], records[run].AA ? "-AA" : "");
|
||||
ImPlot::PlotLine(buffer, &records[run].Data.Data[0].x, &records[run].Data.Data[0].y, records[run].Data.Size, 2*sizeof(double));
|
||||
}
|
||||
}
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
|
|
144
implot_items.cpp
144
implot_items.cpp
|
@ -216,18 +216,17 @@ void EndItem() {
|
|||
// Interprets an array of Y points as ImPlotPoints where the X value is the index
|
||||
template <typename T>
|
||||
struct GetterYs {
|
||||
GetterYs(const T* ys, int count, int offset, int stride) {
|
||||
Ys = ys;
|
||||
Count = count;
|
||||
Offset = count ? ImPosMod(offset, count) : 0;
|
||||
Stride = stride;
|
||||
}
|
||||
const T* Ys;
|
||||
int Count;
|
||||
int Offset;
|
||||
int Stride;
|
||||
GetterYs(const T* ys, int count, double xscale, double x0, int offset, int stride) :
|
||||
Ys(ys), Count(count), XScale(xscale), X0(x0), Offset(count ? ImPosMod(offset, count) : 0), Stride(stride)
|
||||
{ }
|
||||
const T* const Ys;
|
||||
const int Count;
|
||||
const double XScale;
|
||||
const double X0;
|
||||
const int Offset;
|
||||
const int Stride;
|
||||
inline ImPlotPoint operator()(int idx) const {
|
||||
return ImPlotPoint((double)idx, (double)OffsetAndStride(Ys, idx, Count, Offset, Stride));
|
||||
return ImPlotPoint(X0 + XScale * idx, (double)OffsetAndStride(Ys, idx, Count, Offset, Stride));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -844,34 +843,21 @@ inline void PlotLineEx(const char* label_id, const Getter& getter) {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
void PlotLine(const char* label_id, const T* values, int count, int offset, int stride) {
|
||||
GetterYs<T> getter(values,count,offset,stride);
|
||||
void PlotLine(const char* label_id, const T* values, int count, double xscale, double x0, int offset, int stride) {
|
||||
GetterYs<T> getter(values,count,xscale,x0,offset,stride);
|
||||
PlotLineEx(label_id, getter);
|
||||
}
|
||||
|
||||
template IMPLOT_API void PlotLine<ImS8>(const char* label_id, const ImS8* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU8>(const char* label_id, const ImU8* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImS16>(const char* label_id, const ImS16* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU16>(const char* label_id, const ImU16* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImS32>(const char* label_id, const ImS32* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU32>(const char* label_id, const ImU32* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImS64>(const char* label_id, const ImS64* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU64>(const char* label_id, const ImU64* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<float>(const char* label_id, const float* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<double>(const char* label_id, const double* values, int count, int offset, int stride);
|
||||
|
||||
template <>
|
||||
IMPLOT_API void PlotLine<ImVec2>(const char* label_id, const ImVec2* data, int count, int offset, int) {
|
||||
GetterImVec2 getter(data, count, offset);
|
||||
return PlotLineEx(label_id, getter);
|
||||
}
|
||||
|
||||
template <>
|
||||
IMPLOT_API void PlotLine<ImPlotPoint>(const char* label_id, const ImPlotPoint* data, int count, int offset, int) {
|
||||
GetterImPlotPoint getter(data, count, offset);
|
||||
return PlotLineEx(label_id, getter);
|
||||
}
|
||||
|
||||
template IMPLOT_API void PlotLine<ImS8> (const char* label_id, const ImS8* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU8> (const char* label_id, const ImU8* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImS16>(const char* label_id, const ImS16* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU16>(const char* label_id, const ImU16* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImS32>(const char* label_id, const ImS32* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU32>(const char* label_id, const ImU32* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImS64>(const char* label_id, const ImS64* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<ImU64>(const char* label_id, const ImU64* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<float>(const char* label_id, const float* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotLine<double>(const char* label_id, const double* values, int count, double xscale, double x0, int offset, int stride);
|
||||
|
||||
template <typename T>
|
||||
void PlotLine(const char* label_id, const T* xs, const T* ys, int count, int offset, int stride) {
|
||||
|
@ -928,33 +914,21 @@ inline void PlotScatterEx(const char* label_id, const Getter& getter) {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
void PlotScatter(const char* label_id, const T* values, int count, int offset, int stride) {
|
||||
GetterYs<T> getter(values,count,offset,stride);
|
||||
void PlotScatter(const char* label_id, const T* values, int count, double xscale, double x0, int offset, int stride) {
|
||||
GetterYs<T> getter(values,count,xscale,x0,offset,stride);
|
||||
PlotScatterEx(label_id, getter);
|
||||
}
|
||||
|
||||
template IMPLOT_API void PlotScatter<ImS8>(const char* label_id, const ImS8* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU8>(const char* label_id, const ImU8* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImS16>(const char* label_id, const ImS16* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU16>(const char* label_id, const ImU16* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImS32>(const char* label_id, const ImS32* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU32>(const char* label_id, const ImU32* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImS64>(const char* label_id, const ImS64* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU64>(const char* label_id, const ImU64* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<float>(const char* label_id, const float* values, int count, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<double>(const char* label_id, const double* values, int count, int offset, int stride);
|
||||
|
||||
template <>
|
||||
IMPLOT_API void PlotScatter<ImVec2>(const char* label_id, const ImVec2* data, int count, int offset, int) {
|
||||
GetterImVec2 getter(data, count, offset);
|
||||
return PlotScatterEx(label_id, getter);
|
||||
}
|
||||
|
||||
template <>
|
||||
IMPLOT_API void PlotScatter<ImPlotPoint>(const char* label_id, const ImPlotPoint* data, int count, int offset, int) {
|
||||
GetterImPlotPoint getter(data, count, offset);
|
||||
return PlotScatterEx(label_id, getter);
|
||||
}
|
||||
template IMPLOT_API void PlotScatter<ImS8>(const char* label_id, const ImS8* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU8>(const char* label_id, const ImU8* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImS16>(const char* label_id, const ImS16* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU16>(const char* label_id, const ImU16* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImS32>(const char* label_id, const ImS32* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU32>(const char* label_id, const ImU32* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImS64>(const char* label_id, const ImS64* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<ImU64>(const char* label_id, const ImU64* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<float>(const char* label_id, const float* values, int count, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotScatter<double>(const char* label_id, const double* values, int count, double xscale, double x0, int offset, int stride);
|
||||
|
||||
template <typename T>
|
||||
void PlotScatter(const char* label_id, const T* xs, const T* ys, int count, int offset, int stride) {
|
||||
|
@ -1010,22 +984,22 @@ inline void PlotShadedEx(const char* label_id, const Getter1& getter1, const Get
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
void PlotShaded(const char* label_id, const T* values, int count, double y_ref, int offset, int stride) {
|
||||
GetterYs<T> getter1(values,count,offset,stride);
|
||||
GetterYRef<double> getter2(y_ref, count);
|
||||
void PlotShaded(const char* label_id, const T* values, int count, double y_ref, double xscale, double x0, int offset, int stride) {
|
||||
GetterYs<T> getter1(values,count,xscale,x0,offset,stride);
|
||||
GetterYRef<double> getter2(y_ref,count);
|
||||
PlotShadedEx(label_id, getter1, getter2);
|
||||
}
|
||||
|
||||
template IMPLOT_API void PlotShaded<ImS8>(const char* label_id, const ImS8* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU8>(const char* label_id, const ImU8* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImS16>(const char* label_id, const ImS16* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU16>(const char* label_id, const ImU16* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImS32>(const char* label_id, const ImS32* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU32>(const char* label_id, const ImU32* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImS64>(const char* label_id, const ImS64* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU64>(const char* label_id, const ImU64* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<float>(const char* label_id, const float* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<double>(const char* label_id, const double* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImS8>(const char* label_id, const ImS8* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU8>(const char* label_id, const ImU8* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImS16>(const char* label_id, const ImS16* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU16>(const char* label_id, const ImU16* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImS32>(const char* label_id, const ImS32* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU32>(const char* label_id, const ImU32* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImS64>(const char* label_id, const ImS64* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<ImU64>(const char* label_id, const ImU64* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<float>(const char* label_id, const float* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotShaded<double>(const char* label_id, const double* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
|
||||
template <typename T>
|
||||
void PlotShaded(const char* label_id, const T* xs, const T* ys, int count, double y_ref, int offset, int stride) {
|
||||
|
@ -1403,22 +1377,22 @@ inline void PlotStemsEx(const char* label_id, const GetterM& get_mark, const Get
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
void PlotStems(const char* label_id, const T* values, int count, double y_ref, int offset, int stride) {
|
||||
GetterYs<T> get_mark(values,count,offset,stride);
|
||||
void PlotStems(const char* label_id, const T* values, int count, double y_ref, double xscale, double x0, int offset, int stride) {
|
||||
GetterYs<T> get_mark(values,count,xscale,x0,offset,stride);
|
||||
GetterYRef<double> get_base(y_ref,count);
|
||||
PlotStemsEx(label_id, get_mark, get_base);
|
||||
}
|
||||
|
||||
template IMPLOT_API void PlotStems<ImS8>(const char* label_id, const ImS8* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU8>(const char* label_id, const ImU8* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImS16>(const char* label_id, const ImS16* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU16>(const char* label_id, const ImU16* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImS32>(const char* label_id, const ImS32* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU32>(const char* label_id, const ImU32* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImS64>(const char* label_id, const ImS64* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU64>(const char* label_id, const ImU64* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<float>(const char* label_id, const float* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<double>(const char* label_id, const double* values, int count, double y_ref, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImS8>(const char* label_id, const ImS8* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU8>(const char* label_id, const ImU8* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImS16>(const char* label_id, const ImS16* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU16>(const char* label_id, const ImU16* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImS32>(const char* label_id, const ImS32* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU32>(const char* label_id, const ImU32* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImS64>(const char* label_id, const ImS64* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<ImU64>(const char* label_id, const ImU64* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<float>(const char* label_id, const float* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
template IMPLOT_API void PlotStems<double>(const char* label_id, const double* values, int count, double y_ref, double xscale, double x0, int offset, int stride);
|
||||
|
||||
template <typename T>
|
||||
void PlotStems(const char* label_id, const T* xs, const T* ys, int count, double y_ref, int offset, int stride) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user