smile.plot.swing.BarPlot works with smile-plot 3.0.2 but not with 3.1.0
appsofteng opened this issue · comments
appsofteng commented
With smile-plot 3.0.2 it works as I understand the API description, but with smile-plot 3.1.0 it throws an exception.
I read there was a change:
BarPlot.getUpperBound() computes wrong bound. #752.
What should the code look like to work with smile-plot 3.1.0?
Thank you.
new BarPlot(new Bar(new double[][] { { 1, 1 } }, 1, Color.RED),
new Bar(new double[][] { { 2, 2 } }, 1, Color.BLUE)).canvas().window();
smile-plot 3.1.0
Exception in thread "main" java.lang.IllegalArgumentException: Lower bound is larger than upper bound.
at smile.plot.swing.Base.<init>(Base.java:94)
at smile.plot.swing.Canvas.initBase(Canvas.java:169)
at smile.plot.swing.Canvas.<init>(Canvas.java:106)
at smile.plot.swing.Canvas.<init>(Canvas.java:99)
at smile.plot.swing.BarPlot.canvas(BarPlot.java:107)
Haifeng Li commented
Thanks for reporting. The fix is in master branch now. Please have a try.
Haifeng Li commented
v3.1.1 is released including the fix. Please let's know if it addresses the issue. Thanks!