Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/plot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ func loop() {
g.Plot("Plot 基本图表").AxisLimits(0, 100, -1.2, 1.2, g.ConditionOnce).XTicks(lineTicks, false).Plots(
g.Line("Plot Line 线图", linedata),
g.Line("Plot Line2", linedata2),
g.SwitchPlotAxes(g.AxisX1, g.AxisY2),
g.Scatter("Scatter 散点图", scatterdata),
Comment on lines 34 to 35
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.

).SetYAxisLabel(g.AxisY2, "secondary axis"),
),
g.Plot("Plot Time Axe 时间线").AxisLimits(timeDataMin, timeDataMax, 0, 1, g.ConditionOnce).Plots(
g.LineXY("Time Line 时间线", timeDataX, timeDataY),
g.ScatterXY("Time Scatter 时间散点图", timeDataX, timeScatterY),
Expand Down
Loading