File qt_plot.py changed (mode: 100644) (index 43c1db8..a7611ae) |
... |
... |
class SimpleSimplexEstimationGraph(pg.PlotWidget): |
951 |
951 |
x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw() |
x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw() |
952 |
952 |
|
|
953 |
953 |
xkcd_green = (167, 255, 181) # xkcd:light seafoam green #a7ffb5 |
xkcd_green = (167, 255, 181) # xkcd:light seafoam green #a7ffb5 |
|
954 |
|
#green = (0, 255, 38, 64) |
954 |
955 |
xkcd_red = (253, 193, 197) # xkcd: pale rose (#fdc1c5) |
xkcd_red = (253, 193, 197) # xkcd: pale rose (#fdc1c5) |
|
956 |
|
#red = (253, 0, 17, 64) |
955 |
957 |
xkcd_cream = (255, 243, 154) # let's try xkcd: dark cream (#fff39a) |
xkcd_cream = (255, 243, 154) # let's try xkcd: dark cream (#fff39a) |
|
958 |
|
#cream = (255, 221, 0, 64) |
956 |
959 |
|
|
957 |
960 |
self.pen_success = self.plot(x, y, fillLevel=0, brush=xkcd_green) |
self.pen_success = self.plot(x, y, fillLevel=0, brush=xkcd_green) |
958 |
961 |
self.pen_outside = self.plot(x, y, fillLevel=0, brush=0.8) # grey |
self.pen_outside = self.plot(x, y, fillLevel=0, brush=0.8) # grey |
|
... |
... |
class SimpleSimplexEstimationGraph(pg.PlotWidget): |
960 |
963 |
self.pen_f = self.plot(x, y, fillLevel=0, brush=xkcd_red) |
self.pen_f = self.plot(x, y, fillLevel=0, brush=xkcd_red) |
961 |
964 |
|
|
962 |
965 |
|
|
963 |
|
|
|
964 |
|
self.pen_vertex = self.plot(x, y, pen='c', name="simple pf estimation") |
|
965 |
|
self.pen_weighted_vertex = self.plot(x, y, pen=(170, 170, 255), name="weighted pf estimation") |
|
|
966 |
|
pen = pg.mkPen(color='c', width=2) |
|
967 |
|
self.pen_vertex = self.plot(x, y, pen=pen, name="simple pf estimation") |
|
968 |
|
pen = pg.mkPen(color=(170, 170, 255), width=2) |
|
969 |
|
self.pen_weighted_vertex = self.plot(x, y, pen=pen, name="weighted pf estimation") |
966 |
970 |
try: |
try: |
967 |
971 |
exact_name = self.dice_box.pf_exact_method |
exact_name = self.dice_box.pf_exact_method |
|
972 |
|
pen = pg.mkPen(color='b', width=2) # blue |
|
973 |
|
self.pen_exact = self.addLine(y=self.dice_box.pf_exact, pen=pen, name=exact_name) |
968 |
974 |
except: |
except: |
969 |
|
exact_name = "" |
|
970 |
|
self.pen_exact = self.plot(x, y, pen='b', name=exact_name) # blue |
|
|
975 |
|
pass |
|
976 |
|
|
|
977 |
|
self.one_ruler = self.addLine(y=1, pen='k') |
|
978 |
|
self.zero_ruler = self.addLine(y=0, pen='k') |
|
979 |
|
|
971 |
980 |
|
|
972 |
981 |
|
|
973 |
982 |
def replot(self, *args, **kwargs): |
def replot(self, *args, **kwargs): |
974 |
983 |
if self.log_y_chk.isChecked(): |
if self.log_y_chk.isChecked(): |
|
984 |
|
self.one_ruler.hide() |
|
985 |
|
self.pen_exact.setPos(np.log10(self.dice_box.pf_exact)) |
975 |
986 |
self.setLogMode(y=True) |
self.setLogMode(y=True) |
976 |
987 |
self.pen_f.setPen(pg.mkPen(color=(255, 0, 0), width=3)) #, style=QtCore.Qt.DashLine) |
self.pen_f.setPen(pg.mkPen(color=(255, 0, 0), width=3)) #, style=QtCore.Qt.DashLine) |
977 |
988 |
|
|
|
... |
... |
class SimpleSimplexEstimationGraph(pg.PlotWidget): |
982 |
993 |
|
|
983 |
994 |
|
|
984 |
995 |
else: |
else: |
|
996 |
|
self.one_ruler.show() |
|
997 |
|
self.pen_exact.setPos(self.dice_box.pf_exact) |
985 |
998 |
self.setLogMode(y=False) |
self.setLogMode(y=False) |
986 |
999 |
self.pen_f.setPen(None) |
self.pen_f.setPen(None) |
987 |
1000 |
|
|