diff --git a/src/mvPlotting.cpp b/src/mvPlotting.cpp index cf5156bd4..2dae5b92c 100644 --- a/src/mvPlotting.cpp +++ b/src/mvPlotting.cpp @@ -446,16 +446,15 @@ DearPyGui::draw_plot(ImDrawList* drawlist, mvAppItem& item, mvPlotConfig& config { id_axis = static_cast(next_y_axis); flags |= ImPlotAxisFlags_Opposite; + axis->configData.axis = next_y_axis; } ++next_y_axis; } ImPlot::SetupAxis(id_axis, axis->config.specifiedLabel.c_str(), flags); - if (axis->configData.setLimits || axis->configData._dirty) - { + if (axis->configData.setLimits) ImPlot::SetupAxisLimits(id_axis, axis->configData.limits.x, axis->configData.limits.y, ImGuiCond_Always); - axis->configData._dirty = false; // TODO: Check if this is it really useful - } + if (!axis->configData.formatter.empty()) ImPlot::SetupAxisFormat(id_axis, axis->configData.formatter.c_str()); diff --git a/src/mvPlotting.h b/src/mvPlotting.h index e7fa0559a..9d35d90cb 100644 --- a/src/mvPlotting.h +++ b/src/mvPlotting.h @@ -401,7 +401,6 @@ struct mvPlotAxisConfig std::vector labels; std::vector labelLocations; std::vector clabels; // to prevent conversion from string to char* every frame - bool _dirty = false; }; struct mvPlotConfig