@@ -319,10 +319,12 @@ describe "Julia reference output compatibility" do
319319
320320 it " matches lineplot/units_pos_vel" do
321321 t = (0 ..100).map(& .to_f64)
322- pos = t.map { |val | 0.5 * val * val }
323- vel = t
322+ pos_values = t.map { |val | 0.5 * val * val }
323+ vel_values = t
324+ pos = UnicodePlot .quantity(pos_values, " m" )
325+ vel = UnicodePlot .quantity(vel_values, " m s⁻¹" )
324326 p = UnicodePlot .lineplot(pos, vel, xlabel: " position (m)" , ylabel: " speed (m s⁻¹)" )
325- UnicodePlot .lineplot!(p, [pos .min, pos .max], [vel .max, vel .max], color: :red )
327+ UnicodePlot .lineplot!(p, [pos_values .min, pos_values .max], [vel_values .max, vel_values .max], color: :red )
326328 test_ref(" lineplot/units_pos_vel.txt" , p)
327329 end
328330
@@ -516,12 +518,10 @@ describe "Julia reference output compatibility" do
516518 end
517519
518520 it " matches scatterplot/units_temp" do
519- p = UnicodePlot .scatterplot(
520- [22.0 , 23.0 , 24.0 ],
521- marker: :circle ,
522- ylabel: " °C" ,
523- )
524- UnicodePlot .scatterplot!(p, [23.5 , 22.5 , 23.0 ], marker: :cross , color: :red )
521+ y1 = UnicodePlot .quantity([22.0 , 23.0 , 24.0 ], " °C" )
522+ p = UnicodePlot .scatterplot(y1, marker: :circle )
523+ y2 = UnicodePlot .quantity([23.5 , 22.5 , 23.0 ], " °C" )
524+ UnicodePlot .scatterplot!(p, y2, marker: :cross , color: :red )
525525 test_ref(" scatterplot/units_temp.txt" , p)
526526 end
527527 end
0 commit comments