Skip to content

Conversation

@jose-donato
Copy link

calling SetupAxisScale() before SetupAxis() crashes implot with "Axis is not enabled!" error

Removed secondary axis switching and y-axis label from the basic plot.
@gucio321
Copy link
Collaborator

gucio321 commented Sep 9, 2025

Shouldn't we rather fix something in Plot.go instead of removing code from an example? (I write that in form of a question as I need to check exactly whats going on here)

@jose-donato
Copy link
Author

Shouldn't we rather fix something in Plot.go instead of removing code from an example? (I write that in form of a question as I need to check exactly whats going on here)

ideally I agree, but it's my first time using the library so I'm not familiar yet to make that PR 😅

I was trying some examples and found the example was broken

Comment on lines 34 to 35
g.Line("Plot Line2", linedata2),
g.SwitchPlotAxes(g.AxisX1, g.AxisY2),
g.Scatter("Scatter 散点图", scatterdata),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out that the problem is on this line.
SwitchPlotAxes is not possible unless you set up these axes.
I'll try to figure out how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants