equal
deleted
inserted
replaced
795 self.MouseStartPos.x + xw, |
795 self.MouseStartPos.x + xw, |
796 self.MouseStartPos.y + yw) |
796 self.MouseStartPos.y + yw) |
797 |
797 |
798 # If middle button is pressed and moving graph along X coordinate |
798 # If middle button is pressed and moving graph along X coordinate |
799 # is in progress |
799 # is in progress |
800 elif event.button == 2 and self.GraphType == GRAPH_PARALLEL and \ |
800 elif (event.button == 2 and |
801 self.MouseStartPos is not None: |
801 self.GraphType == GRAPH_PARALLEL and |
|
802 self.MouseStartPos is not None): |
802 start_tick, end_tick = self.ParentWindow.GetRange() |
803 start_tick, end_tick = self.ParentWindow.GetRange() |
803 rect = self.GetAxesBoundingBox() |
804 rect = self.GetAxesBoundingBox() |
804 |
805 |
805 # Move graph along X coordinate |
806 # Move graph along X coordinate |
806 self.ParentWindow.SetCanvasPosition( |
807 self.ParentWindow.SetCanvasPosition( |
1036 if self.GraphType == GRAPH_PARALLEL or self.Is3DCanvas(): |
1037 if self.GraphType == GRAPH_PARALLEL or self.Is3DCanvas(): |
1037 num_item = len(self.Items) |
1038 num_item = len(self.Items) |
1038 for idx in xrange(num_item): |
1039 for idx in xrange(num_item): |
1039 |
1040 |
1040 # Get color from color cycle (black if only one item) |
1041 # Get color from color cycle (black if only one item) |
1041 color = ('k' if num_item == 1 |
1042 color = ('k' if num_item == 1 else |
1042 else COLOR_CYCLE[idx % len(COLOR_CYCLE)]) |
1043 COLOR_CYCLE[idx % len(COLOR_CYCLE)]) |
1043 |
1044 |
1044 # In 3D graph items variable label are not displayed as text |
1045 # In 3D graph items variable label are not displayed as text |
1045 # in figure, but as axis title |
1046 # in figure, but as axis title |
1046 if not self.Is3DCanvas(): |
1047 if not self.Is3DCanvas(): |
1047 # Items variable labels are in figure upper left corner |
1048 # Items variable labels are in figure upper left corner |