Show More
@@ -198,7 +198,7 b' class IPythonWidget(FrontendWidget):' | |||||
198 | """ Restores the default IPythonWidget styling. |
|
198 | """ Restores the default IPythonWidget styling. | |
199 | """ |
|
199 | """ | |
200 | self.set_styling(self.default_stylesheet, syntax_style='default') |
|
200 | self.set_styling(self.default_stylesheet, syntax_style='default') | |
201 | #self.set_styling(self.dark_stylesheet, syntax_style='monokai') |
|
201 | # self.set_styling(self.dark_stylesheet, syntax_style='monokai') | |
202 |
|
202 | |||
203 | def set_editor(self, editor): |
|
203 | def set_editor(self, editor): | |
204 | """ Sets the editor to use with the %edit magic. |
|
204 | """ Sets the editor to use with the %edit magic. |
@@ -15,6 +15,17 b' class RichIPythonWidget(IPythonWidget):' | |||||
15 | # Protected class variables. |
|
15 | # Protected class variables. | |
16 | _svg_text_format_property = 1 |
|
16 | _svg_text_format_property = 1 | |
17 |
|
17 | |||
|
18 | # We need to override this because this class uses QTextEdit. | |||
|
19 | dark_stylesheet = """ | |||
|
20 | QTextEdit { background-color: black; color: white } | |||
|
21 | QFrame { border: 1px solid grey; } | |||
|
22 | .error { color: red; } | |||
|
23 | .in-prompt { color: lime; } | |||
|
24 | .in-prompt-number { color: lime; font-weight: bold; } | |||
|
25 | .out-prompt { color: red; } | |||
|
26 | .out-prompt-number { color: red; font-weight: bold; } | |||
|
27 | """ | |||
|
28 | ||||
18 | #--------------------------------------------------------------------------- |
|
29 | #--------------------------------------------------------------------------- | |
19 | # 'object' interface |
|
30 | # 'object' interface | |
20 | #--------------------------------------------------------------------------- |
|
31 | #--------------------------------------------------------------------------- |
@@ -14,6 +14,11 b' def show():' | |||||
14 | """ |
|
14 | """ | |
15 | figure_manager = Gcf.get_active() |
|
15 | figure_manager = Gcf.get_active() | |
16 | if figure_manager is not None: |
|
16 | if figure_manager is not None: | |
|
17 | # Make the background transparent. | |||
|
18 | # figure_manager.canvas.figure.patch.set_alpha(0.0) | |||
|
19 | # Set the background to white instead so it looks good on black. | |||
|
20 | figure_manager.canvas.figure.set_facecolor('white') | |||
|
21 | figure_manager.canvas.figure.set_edgecolor('white') | |||
17 | data = svg_from_canvas(figure_manager.canvas) |
|
22 | data = svg_from_canvas(figure_manager.canvas) | |
18 | add_plot_payload('svg', data) |
|
23 | add_plot_payload('svg', data) | |
19 |
|
24 |
General Comments 0
You need to be logged in to leave comments.
Login now