You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
limits=["50",400"]# p limits.minmax # "400", "50"
mi,ma=limits.minmax.map(&:to_f)
If you change limits.minmax.map(&:to_f) to limits.map(&:to_f).minmax, you will get expected result. limits is usually a very small array. and will not affect performance.
However, I may be missing some other disadvantages.
Feel free to close this.
Thanks.
The text was updated successfully, but these errors were encountered:
Hello.
This is not a bug report, but rather just a neutral report.
We should not give xlim an array of strings.
But, when xlim is an array of strings, Unicode Plot shows a somewhat unexpected behavior.
Step to reproduce
Expected behavior
Why is this occurring?
This occurs in the
extend_limits
method in utils.rb.https://github.com/red-data-tools/unicode_plot.rb/blob/master/lib/unicode_plot/utils.rb
If you change
limits.minmax.map(&:to_f)
tolimits.map(&:to_f).minmax
, you will get expected result.limits
is usually a very small array. and will not affect performance.However, I may be missing some other disadvantages.
Feel free to close this.
Thanks.
The text was updated successfully, but these errors were encountered: