|
9 | 9 | module is imported, register them here rather then in the module.
|
10 | 10 |
|
11 | 11 | """
|
12 |
| -import warnings |
13 |
| - |
14 | 12 | import pandas.core.config as cf
|
15 | 13 | from pandas.core.config import (is_int, is_bool, is_text, is_instance_factory,
|
16 | 14 | is_one_of_factory, get_default_val,
|
@@ -313,33 +311,6 @@ def use_numexpr_cb(key):
|
313 | 311 | style_backup = dict()
|
314 | 312 |
|
315 | 313 |
|
316 |
| -def mpl_style_cb(key): |
317 |
| - warnings.warn(pc_mpl_style_deprecation_warning, FutureWarning, |
318 |
| - stacklevel=5) |
319 |
| - |
320 |
| - import sys |
321 |
| - from pandas.plotting._style import mpl_stylesheet |
322 |
| - global style_backup |
323 |
| - |
324 |
| - val = cf.get_option(key) |
325 |
| - |
326 |
| - if 'matplotlib' not in sys.modules.keys(): |
327 |
| - if not val: # starting up, we get reset to None |
328 |
| - return val |
329 |
| - raise Exception("matplotlib has not been imported. aborting") |
330 |
| - |
331 |
| - import matplotlib.pyplot as plt |
332 |
| - |
333 |
| - if val == 'default': |
334 |
| - style_backup = dict([(k, plt.rcParams[k]) for k in mpl_stylesheet]) |
335 |
| - plt.rcParams.update(mpl_stylesheet) |
336 |
| - elif not val: |
337 |
| - if style_backup: |
338 |
| - plt.rcParams.update(style_backup) |
339 |
| - |
340 |
| - return val |
341 |
| - |
342 |
| - |
343 | 314 | def table_schema_cb(key):
|
344 | 315 | from pandas.io.formats.printing import _enable_data_resource_formatter
|
345 | 316 | _enable_data_resource_formatter(cf.get_option(key))
|
@@ -382,9 +353,6 @@ def table_schema_cb(key):
|
382 | 353 | validator=is_one_of_factory([True, False, 'truncate']))
|
383 | 354 | cf.register_option('chop_threshold', None, pc_chop_threshold_doc)
|
384 | 355 | cf.register_option('max_seq_items', 100, pc_max_seq_items)
|
385 |
| - cf.register_option('mpl_style', None, pc_mpl_style_doc, |
386 |
| - validator=is_one_of_factory([None, False, 'default']), |
387 |
| - cb=mpl_style_cb) |
388 | 356 | cf.register_option('height', 60, pc_height_doc,
|
389 | 357 | validator=is_instance_factory([type(None), int]))
|
390 | 358 | cf.register_option('width', 80, pc_width_doc,
|
|
0 commit comments