From d88ad85ace120e5cc069a168c427dcaf4aa5dfc9 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Tue, 25 Jun 2024 10:30:34 +0200 Subject: [PATCH] examples: update plot example --- examples/plot/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/plot/main.go b/examples/plot/main.go index 12faea76..6c44dd0c 100644 --- a/examples/plot/main.go +++ b/examples/plot/main.go @@ -29,8 +29,9 @@ 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), - ), + ).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),