File tree 1 file changed +9
-6
lines changed 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -70,14 +70,17 @@ def __init__(
70
70
self ._projection = projection
71
71
self ._filled = fill
72
72
73
+ self ._y = [i * plot .scale for i in y ]
74
+
73
75
if max_value is None :
74
- y_max = max (y )
76
+ y_max = max (self . _y )
75
77
else :
76
78
y_max = max_value
77
79
78
- self ._y = [i * plot .scale for i in y ]
79
-
80
80
self ._bar_space = int (bar_space / plot .scale )
81
+
82
+ xstart = int (xstart / plot .scale )
83
+
81
84
self ._graphx = plot .scale * ceil (
82
85
abs (plot ._newxmax - plot ._newxmin ) / (len (x ) + 4 )
83
86
)
@@ -120,7 +123,7 @@ def __init__(
120
123
xstart + (i * self ._graphx ) + self ._graphx // 2 ,
121
124
plot ._newymin ,
122
125
)
123
- xstart = xstart + self ._bar_space
126
+ xstart = xstart + self ._bar_space // plot . scale
124
127
plot ._index_colorused = plot ._index_colorused + 1
125
128
self ._color_index = self ._color_index + 1
126
129
else :
@@ -164,11 +167,11 @@ def __init__(
164
167
plot ._index_colorused ,
165
168
)
166
169
167
- xstart = xstart + bar_space
170
+ xstart = xstart + self . _bar_space
168
171
plot ._index_colorused = plot ._index_colorused + 1
169
172
plot .show_text (
170
173
str (y [i ]),
171
- xstart + (i * self ._graphx ) - bar_space + self ._graphx // 2 ,
174
+ xstart + (i * self ._graphx ) - self . _bar_space + self ._graphx // 2 ,
172
175
plot ._newymin ,
173
176
)
174
177
You can’t perform that action at this time.
0 commit comments