Skip to content

Commit

Permalink
Merge pull request #741 from gucio321/plots
Browse files Browse the repository at this point in the history
plot: fix axis ticks
  • Loading branch information
gucio321 authored Dec 18, 2023
2 parents 3c4e671 + 72fe361 commit acaa11f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,24 +190,22 @@ func (p *PlotCanvasWidget) Build() {
)

if len(p.xTicksValue) > 0 {
imgui.PlotSetupAxisTicksdoubleV(
imgui.PlotSetupAxisTicksdoublePtrV(
imgui.AxisX1,
p.xTicksValue[0],
p.xTicksValue[1], // <- TODO: why is it so strangely saved?
-1, // TODO: implement
&p.xTicksValue,
int32(len(p.xTicksValue)),
p.xTicksLabel,
p.xTicksShowDefault,
)
}

if len(p.yTicksValue) > 0 {
imgui.PlotSetupAxisTicksdoubleV(
imgui.PlotSetupAxisTicksdoublePtrV(
imgui.AxisY1,
p.xTicksValue[0],
p.xTicksValue[1], // <- TODO: why is it so strangely saved?
-1, // TODO: implement
p.xTicksLabel,
p.xTicksShowDefault,
&p.yTicksValue,
int32(len(p.yTicksValue)),
p.yTicksLabel,
p.yTicksShowDefault,
)
}

Expand Down

0 comments on commit acaa11f

Please sign in to comment.