I was playing with boxplot (and bxp) in Python. For integretion with pyQt I used code from matplotlib example and stack. When I'm drawing boxplot in popup, it works fine. When I try to draw some simple plot on the canvas in pyQt (like sin, or like in the examples above), it works fine.
The problem is when i try to draw boxplot on my canvas in pyQt window, only fliers are shown.
Am I doing something wrong? Is there other way to show boxplot in pyQt window?
It looks like this:
My code -s tandalone version
import matplotlib.pyplot as plt
data = [{'med': 6.0, 'q1': 4.0, 'q3': 8.0, 'whislo': 3.0, 'whishi': 10.0, 'fliers': [20, 1]}]
fig, axes = plt.subplots()
axes.bxp(data)
plt.show()
Overrided plot method from stack answer:
data = [{'med': 6.0, 'q1': 4.0, 'q3': 8.0, 'whislo': 3.0, 'whishi': 10.0, 'fliers': [20, 1]}]
ax = self.figure.add_subplot(111)
ax.hold(False)
ax.bxp(data)
self.canvas.draw()