mirror of
https://github.com/gwm17/implot.git
synced 2024-11-26 20:28:50 -05:00
ImPlotAxisFlags_NoDecorations
This commit is contained in:
parent
be6e1c2d2e
commit
6f3f43c815
|
@ -31,7 +31,8 @@ Below is a change-log of API breaking changes only. If you are using one of the
|
||||||
When you are not sure about a old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all implot files.
|
When you are not sure about a old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all implot files.
|
||||||
You can read releases logs https://github.com/epezent/implot/releases for more details.
|
You can read releases logs https://github.com/epezent/implot/releases for more details.
|
||||||
|
|
||||||
- 2020/09/06 (0.7) - Several flags under ImPlotFlags and ImPlotAxisFlags were inverted so that the default flagset is simply 0. This more closely matches ImGui's style.
|
- 2020/09/06 (0.7) - Several flags under ImPlotFlags and ImPlotAxisFlags were inverted (e.g. ImPlotFlags_Legend -> ImPlotFlags_NoLegend) so that the default flagset
|
||||||
|
is simply 0. This more closely matches ImGui's style and makes it easier to enable non-default but commonly used flags (e.g. ImPlotAxisFlags_Time).
|
||||||
- 2020/08/28 (0.5) - ImPlotMarker_ can no longer be combined with bitwise OR, |. This features caused unecessary slow-down, and almost no one used it.
|
- 2020/08/28 (0.5) - ImPlotMarker_ can no longer be combined with bitwise OR, |. This features caused unecessary slow-down, and almost no one used it.
|
||||||
- 2020/08/25 (0.5) - ImPlotAxisFlags_Scientific was removed. Logarithmic axes automatically uses scientific notation.
|
- 2020/08/25 (0.5) - ImPlotAxisFlags_Scientific was removed. Logarithmic axes automatically uses scientific notation.
|
||||||
- 2020/08/17 (0.5) - PlotText was changed so that text is centered horizontally and vertically about the desired point.
|
- 2020/08/17 (0.5) - PlotText was changed so that text is centered horizontally and vertically about the desired point.
|
||||||
|
|
2
implot.h
2
implot.h
|
@ -80,7 +80,7 @@ enum ImPlotAxisFlags_ {
|
||||||
ImPlotAxisFlags_LockMin = 1 << 6, // the axis minimum value will be locked when panning/zooming
|
ImPlotAxisFlags_LockMin = 1 << 6, // the axis minimum value will be locked when panning/zooming
|
||||||
ImPlotAxisFlags_LockMax = 1 << 7, // the axis maximum value will be locked when panning/zooming
|
ImPlotAxisFlags_LockMax = 1 << 7, // the axis maximum value will be locked when panning/zooming
|
||||||
ImPlotAxisFlags_Lock = ImPlotAxisFlags_LockMin | ImPlotAxisFlags_LockMax,
|
ImPlotAxisFlags_Lock = ImPlotAxisFlags_LockMin | ImPlotAxisFlags_LockMax,
|
||||||
ImPlotAxisFlags_NoTicks = ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_NoTickMarks | ImPlotAxisFlags_NoTickLabels
|
ImPlotAxisFlags_NoDecorations = ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_NoTickMarks | ImPlotAxisFlags_NoTickLabels
|
||||||
};
|
};
|
||||||
|
|
||||||
// Plot styling colors.
|
// Plot styling colors.
|
||||||
|
|
|
@ -425,7 +425,7 @@ void ShowDemoWindow(bool* p_open) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImPlot::SetNextPlotLimits(0,1,0,1,ImGuiCond_Always);
|
ImPlot::SetNextPlotLimits(0,1,0,1,ImGuiCond_Always);
|
||||||
if (ImPlot::BeginPlot("##Pie1", NULL, NULL, ImVec2(250,250), ImPlotFlags_NoMousePos, ImPlotAxisFlags_NoTicks, ImPlotAxisFlags_NoTicks)) {
|
if (ImPlot::BeginPlot("##Pie1", NULL, NULL, ImVec2(250,250), ImPlotFlags_NoMousePos, ImPlotAxisFlags_NoDecorations, ImPlotAxisFlags_NoDecorations)) {
|
||||||
ImPlot::PlotPieChart(labels1, data1, 4, 0.5f, 0.5f, 0.4f, normalize, "%.2f");
|
ImPlot::PlotPieChart(labels1, data1, 4, 0.5f, 0.5f, 0.4f, normalize, "%.2f");
|
||||||
ImPlot::EndPlot();
|
ImPlot::EndPlot();
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ void ShowDemoWindow(bool* p_open) {
|
||||||
|
|
||||||
ImPlot::PushColormap(ImPlotColormap_Pastel);
|
ImPlot::PushColormap(ImPlotColormap_Pastel);
|
||||||
ImPlot::SetNextPlotLimits(0,1,0,1,ImGuiCond_Always);
|
ImPlot::SetNextPlotLimits(0,1,0,1,ImGuiCond_Always);
|
||||||
if (ImPlot::BeginPlot("##Pie2", NULL, NULL, ImVec2(250,250), ImPlotFlags_NoMousePos, ImPlotAxisFlags_NoTicks, ImPlotAxisFlags_NoTicks)) {
|
if (ImPlot::BeginPlot("##Pie2", NULL, NULL, ImVec2(250,250), ImPlotFlags_NoMousePos, ImPlotAxisFlags_NoDecorations, ImPlotAxisFlags_NoDecorations)) {
|
||||||
ImPlot::PlotPieChart(labels2, data2, 5, 0.5f, 0.5f, 0.4f, true, "%.0f", 180);
|
ImPlot::PlotPieChart(labels2, data2, 5, 0.5f, 0.5f, 0.4f, true, "%.0f", 180);
|
||||||
ImPlot::EndPlot();
|
ImPlot::EndPlot();
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ void ShowDemoWindow(bool* p_open) {
|
||||||
static ImVec4 gray[2] = {ImVec4(0,0,0,1), ImVec4(1,1,1,1)};
|
static ImVec4 gray[2] = {ImVec4(0,0,0,1), ImVec4(1,1,1,1)};
|
||||||
ImPlot::PushColormap(gray, 2);
|
ImPlot::PushColormap(gray, 2);
|
||||||
ImPlot::SetNextPlotLimits(-1,1,-1,1);
|
ImPlot::SetNextPlotLimits(-1,1,-1,1);
|
||||||
if (ImPlot::BeginPlot("##Heatmap2",NULL,NULL,ImVec2(225,225),0,ImPlotAxisFlags_NoTicks,ImPlotAxisFlags_NoTicks)) {
|
if (ImPlot::BeginPlot("##Heatmap2",NULL,NULL,ImVec2(225,225),0,ImPlotAxisFlags_NoDecorations,ImPlotAxisFlags_NoDecorations)) {
|
||||||
ImPlot::PlotHeatmap("heat1",values2,100,100,0,1,NULL);
|
ImPlot::PlotHeatmap("heat1",values2,100,100,0,1,NULL);
|
||||||
ImPlot::PlotHeatmap("heat2",values2,100,100,0,1,NULL, ImPlotPoint(-1,-1), ImPlotPoint(0,0));
|
ImPlot::PlotHeatmap("heat2",values2,100,100,0,1,NULL, ImPlotPoint(-1,-1), ImPlotPoint(0,0));
|
||||||
ImPlot::EndPlot();
|
ImPlot::EndPlot();
|
||||||
|
@ -1174,7 +1174,7 @@ ImPlotPoint Spiral(void*, int idx) {
|
||||||
void Sparkline(const char* id, const float* values, int count, float min_v, float max_v, int offset, const ImVec4& col, const ImVec2& size) {
|
void Sparkline(const char* id, const float* values, int count, float min_v, float max_v, int offset, const ImVec4& col, const ImVec2& size) {
|
||||||
ImPlot::PushStyleVar(ImPlotStyleVar_PlotPadding, ImVec2(0,0));
|
ImPlot::PushStyleVar(ImPlotStyleVar_PlotPadding, ImVec2(0,0));
|
||||||
ImPlot::SetNextPlotLimits(0, count - 1, min_v, max_v, ImGuiCond_Always);
|
ImPlot::SetNextPlotLimits(0, count - 1, min_v, max_v, ImGuiCond_Always);
|
||||||
if (ImPlot::BeginPlot(id,0,0,size,ImPlotFlags_CanvasOnly|ImPlotFlags_NoChild,ImPlotAxisFlags_NoTicks,ImPlotAxisFlags_NoTicks)) {
|
if (ImPlot::BeginPlot(id,0,0,size,ImPlotFlags_CanvasOnly|ImPlotFlags_NoChild,ImPlotAxisFlags_NoDecorations,ImPlotAxisFlags_NoDecorations)) {
|
||||||
ImPlot::PushStyleColor(ImPlotCol_Line, col);
|
ImPlot::PushStyleColor(ImPlotCol_Line, col);
|
||||||
ImPlot::PlotLine(id, values, count, offset);
|
ImPlot::PlotLine(id, values, count, offset);
|
||||||
ImPlot::PushStyleVar(ImPlotStyleVar_FillAlpha, 0.25f);
|
ImPlot::PushStyleVar(ImPlotStyleVar_FillAlpha, 0.25f);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user