Closed JAicewizard closed 2 months ago
Actually you can see that with the expected result the Y-axis is also misaligned
It looks to me like the descents should not be being used in calculating the height of the axis. If I do this
diff --git a/axis.go b/axis.go
index 3b275ad..451acce 100644
--- a/axis.go
+++ b/axis.go
@@ -235,7 +235,6 @@ type horizontalAxis struct {
// size returns the height of the axis.
func (a horizontalAxis) size() (h vg.Length) {
if a.Label.Text != "" { // We assume that the label isn't rotated.
- h += a.Label.TextStyle.FontExtents().Descent
h += a.Label.TextStyle.Height(a.Label.Text)
h += a.Label.Padding
}
I get this
@sbinet WDYT?
(apologies for the belated answer. with the events unfolding in France, I have a limited bandwith for software...)
SGTM.
What are you trying to do?
Create a graph with 0-padded axis and axis names
What did you do?
What did you expect to happen?
What actually happened?
What version of Go and Gonum/plot are you using?
I just fetched gonum 0.13, and im using go 1.22.3 (linux/amd64)
Does this issue reproduce with the current master?
Did not try, but there does not seem to be any real changes in master