my vscode jupyter configuration
my jupyter packages
from IPython.display import display, HTML from matplotlib import cm, projections from mpl_toolkits.mplot3d import Axes3D from pathlib import Path from pprint import pprint import clipboard import concurrent.futures import cv2 import math import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import pickle import PIL import platform import pprint import re import sys import time # import tensorflow as tf # import torch # from torch import Tensor ############################# section 1. pandas setting up. this should be located before section 2. pd.set_option("display.max_columns", None) # pd.set_option("display.max_rows", None) ############################# section 2. matplot setting up. %matplotlib widget plt.style.use('dark_background') HTML(''' <style> .jupyter-matplotlib {background-color: #003030;} .widget-label, .jupyter-matplotlib-header{color: #b0b0b0;} .jupyter-button {background-color: #333;color: #b0b0b0;} .cell-output-ipywidget-background {background-color: transparent !important;} .cell-output-ipywidget-background pre {color: white !important;} </style> ''')
vscode using existing jupyter server
step 0: start a local jupyter server
@REM start_jupyter_server.bat jupyter notebook --no-browser --port=8888 --NotebookApp.token="aaa" @REM https://127.0.0.1:8888/?token=aaa @REM http://127.0.0.1:8888/?token=aaa
dark matplotlib output
Make Matplotlib widget background color match dark theme in Visual Studio Code
(Make sure Visual Studio Code is closed.)
- Open file explorer, go to:
C:\Users\<your_username_here>\.vscode\extensions\ms-toolsai.jupyter-<(THE VERSION NUMBER MAY VARY)2022.4.1021342353>\out\webviews\webview-side\ipywidgetsRenderer
- Open the
ipywidgetsRenderer.js
file (using Notepad++ or Notepad or even Visual Studio Code) before letting any Jupyter stuff run - Wherever you see cell-output-ipywidget-background followed by background: white, replace white with black.
from
Make Matplotlib widget background color match dark theme in Visual Studio Code - Stack Overflow
https://stackoverflow.com/questions/71206490/make-matplotlib-widget-background-color-match-dark-theme-in-visual-studio-code
标签:
tool
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具