File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44"""
55
66from __future__ import division
7- import os
7+ import os , warnings
88
99import numpy as np
1010import matplotlib .cbook as cbook
@@ -1201,8 +1201,17 @@ def key_press(self, event):
12011201 event .inaxes .grid ()
12021202 self .canvas .draw ()
12031203 elif event .key == 'l' :
1204- event .inaxes .toggle_log_lineary ()
1205- self .canvas .draw ()
1204+ warnings .warn ('log scale toggling under construction' )
1205+ if 0 :
1206+ ax = event .inaxes
1207+ scale = ax .get_yscale ()
1208+ if scale == 'log' :
1209+ ax .set_yscale ('linear' )
1210+ ax .figure .canvas .draw ()
1211+ elif scale == 'linear' :
1212+ ax .set_yscale ('log' )
1213+ ax .figure .canvas .draw ()
1214+
12061215 elif event .key is not None and (event .key .isdigit () and event .key != '0' ) or event .key == 'a' :
12071216 # 'a' enables all axes
12081217 if event .key != 'a' :
You can’t perform that action at this time.
0 commit comments