[DRE-maint] Bug#855614: ruby-gruff: Specifying legend_at_bottom clobbers legend
Gunnar Wolf
gwolf at gwolf.org
Mon Feb 20 19:38:07 UTC 2017
Package: ruby-gruff
Version: 0.6.0-1
Severity: normal
If you run the following example code:
#!/usr/bin/ruby
require 'gruff'
g1 = Gruff::Bar.new
g1.data('Description of data row for Foo', [1,2,3,4])
g1.data('This is where we present data on Bar', [2,3,4,5])
g1.data('Finally, presenting for BazBaz', [4,3,2,3])
g2 = Gruff::Bar.new
g2.data('Description of data row for Foo', [1,2,3,4])
g2.data('This is where we present data on Bar', [2,3,4,5])
g2.data('Finally, presenting for BazBaz', [4,3,2,3])
g2.legend_at_bottom = true
g1.write('/tmp/g1.png')
g2.write('/tmp/g2.png')
You will get the two generated images I am attaching; g1 correctly
saves some space for the legend atop the graph area, but g2 fails to
reserve that space, with the resulting graph clobbering the legend.
The reason I'm giving such long text labels is to better understand
what's happening: I think (haven't looked into Gruff's source yet) it
fails to measure the legend window and substract it from the presented
graph; further rows "fall" off the graph's bottom.
-- System Information:
Debian Release: 9.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.8.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages ruby-gruff depends on:
ii ghostscript 9.20~dfsg-2
ii gsfonts 1:8.11+urwcyr1.0.7~pre44-4.3
ii ruby 1:2.3.3
ii ruby-rmagick 2.16.0-2+b1
ii ruby2.1 [ruby-interpreter] 2.1.5-4
ii ruby2.2 [ruby-interpreter] 2.2.4-1
ruby-gruff recommends no packages.
ruby-gruff suggests no packages.
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g1.png
Type: image/png
Size: 73489 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20170220/f2e3145f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g2.png
Type: image/png
Size: 74403 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20170220/f2e3145f/attachment-0003.png>
More information about the Pkg-ruby-extras-maintainers
mailing list