Skip to content

Commit

Permalink
plot: add LineXY
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Dec 14, 2023
1 parent ac30090 commit 4b7bd86
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,16 @@ func (p *LineXYPlot) Offset(offset int) *LineXYPlot {

// Plot implements Plot interface.
func (p *LineXYPlot) Plot() {
// TODO: migrate this
// imgui.ImPlotSetPlotYAxis(imgui.ImPlotYAxis(p.yAxis))
// imgui.ImPlotLineXY(Context.FontAtlas.RegisterString(p.title), p.xs, p.ys, p.offset)
imgui.PlotSetAxis(imgui.PlotAxisEnum(p.yAxis))
imgui.PlotPlotLinedoublePtrdoublePtrV(
Context.FontAtlas.RegisterString(p.title),
&p.xs,
&p.ys,
int32(len(p.xs)),
0, // flags
int32(p.offset),
8, // sizeof(double) = 8
)
}

// PieChartPlot represents a pie chart.
Expand Down

0 comments on commit 4b7bd86

Please sign in to comment.