mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
initial support for matplotlib toolwindow
Plots toolwindow is implemented as part of SciView toolwindow. DataView merged into SciView. Features: - open toolwindow with plot on plot available (run/console/rebug) - plots in toolwindow are in separate tabs with image editor inside - tabs in toolwindow are closeable - save plot as file action - DnD to/from editor supported - plots toolwindow could be disabled from Settings
This commit is contained in:
23
python/helpers/pycharm_matplotlib_backend/sitecustomize.py
Normal file
23
python/helpers/pycharm_matplotlib_backend/sitecustomize.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import matplotlib
|
||||
matplotlib.use('module://backend_interagg')
|
||||
|
||||
# We want to import users sitecustomize.py file if any
|
||||
import sys
|
||||
import os
|
||||
|
||||
sitecustomize = "sitecustomize"
|
||||
parent_dir = os.path.abspath(os.path.join(__file__, os.pardir))
|
||||
if parent_dir in sys.path:
|
||||
sys.path.remove(parent_dir)
|
||||
|
||||
if sitecustomize in sys.modules:
|
||||
pycharm_sitecustomize_module = sys.modules.pop(sitecustomize)
|
||||
|
||||
try:
|
||||
import sitecustomize
|
||||
except ImportError:
|
||||
# return our module if we failed to find any other sitecustomize
|
||||
# to prevent KeyError importing 'site.py'
|
||||
sys.modules[sitecustomize] = pycharm_sitecustomize_module
|
||||
|
||||
sys.path.append(parent_dir)
|
||||
Reference in New Issue
Block a user