Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Potential Bug with ImPlot.PlotLine #36

Open
wangqinru opened this issue May 16, 2023 · 0 comments
Open

Potential Bug with ImPlot.PlotLine #36

wangqinru opened this issue May 16, 2023 · 0 comments

Comments

@wangqinru
Copy link

I'm currently using ImPlot.PlotLine to draw graphs in my project. However, I'm encountering an issue where the numbers on the X and Y axes aren't being displayed. Do you have any idea what might be causing this?

I'm running this on Unity 2022.2.1f1.

Any help would be greatly appreciated.

Thank you.

image

double xmin = 0, xmax = 1, ymin = 0, ymax = 1;
float[] data = new float[10]{0,1,2,3,4,5,6,7,8,9};

ImPlot.LinkNextPlotLimits(ref xmin, ref xmax, ref ymin, ref ymax);
if (ImPlot.BeginPlot("Plot A", "Time (s)", "Memory (MB)", new Vector2(400, 200))) { 
    ImPlot.PlotLine("Line", ref data[0], 10);
    ImPlot.EndPlot(); 
}

ImPlot.LinkNextPlotLimits(ref xmin, ref xmax, ref ymin, ref ymax);
if (ImPlot.BeginPlot("Plot B", "Time (s)", "Memory (MB)", new Vector2(400, 200))) { 
    ImPlot.PlotLine("Line", ref data[0], 10);
    ImPlot.EndPlot(); 
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant