File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ select_style:
3636# ``matplotlib.axes.Axes.plot()``
3737reference_style :
3838 linestyle : " -"
39- color : " black"
39+ color : " C0"
40+ alpha : 0.5
4041
4142# Style for monitor markers:
4243readouts_style :
Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ def data(self):
6565 return self .curveTable .rows
6666
6767 def on_btn_save (self ):
68+ """
69+ Add a Snapshot of the current twiss figure
70+ """
6871 scene = self .scene
6972 twiss = scene .model .twiss ()
7073 data = {
@@ -75,6 +78,7 @@ def on_btn_save(self):
7578 style = scene .config ['reference_style' ]
7679 scene .snapshot_num += 1
7780 name = "snapshot {}" .format (scene .snapshot_num )
81+ style ['color' ] = 'C{}' .format (scene .snapshot_num )
7882 scene .add_curve (name , data , style )
7983 self .curveTable .edit (
8084 self .curveTable .model ().index (len (self .available )- 1 , 0 ))
You can’t perform that action at this time.
0 commit comments