Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] OWBoxPlot: Plot axis labels and quartiles label layout #3162

Merged
merged 2 commits into from
Jul 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Orange/widgets/visualize/owboxplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,13 +751,13 @@ def draw_axis(self):
self.scene_width = (gtop - gbottom) * scale_x

val = first_val
decimals = max(3, 4 - int(math.log10(step)))
while True:
l = self.box_scene.addLine(val * scale_x, -1, val * scale_x, 1,
self._pen_axis_tick)
l.setZValue(100)

t = self.box_scene.addSimpleText(
self.attribute.repr_val(val) if not misssing_stats else "?",
repr(round(val, decimals)) if not misssing_stats else "?",
self._axis_font)
t.setFlags(
t.flags() | QGraphicsItem.ItemIgnoresTransformations)
Expand Down Expand Up @@ -859,7 +859,7 @@ def move_label(label, frm, to):
if stat.median is not None:
msc = stat.median * self.scale_x
med_t = centered_text(stat.median, msc)
med_box_width2 = med_t.boundingRect().width()
med_box_width2 = med_t.boundingRect().width() / 2
line(msc)

if stat.q25 is not None:
Expand Down