首页 > 其他分享 >the way to make jupyter output cell has a dark background in vscode

the way to make jupyter output cell has a dark background in vscode

时间:2023-05-24 23:44:25浏览次数:56  
标签:cell plt jupyter color dark background

the issue to be fixed

As shown in the picture, jupyter output cell has a bright background, even it's ask to use dark background.
image

the way to go

import matplotlib.pyplot as plt
import numpy as np
from IPython.display import HTML

#############################    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>
''')

fig = plt.figure("fig0")
plt.clf()
plt.plot(np.arange(11))
plt.show()

image

reference

python - VS Code Jupyter notebook dark theme for interactive elements - Stack Overflow
https://stackoverflow.com/questions/75429196/vs-code-jupyter-notebook-dark-theme-for-interactive-elements

Add support for theming of IPyWidgets · Issue #7161 · microsoft/vscode-jupyter
https://github.com/microsoft/vscode-jupyter/issues/7161

标签:cell,plt,jupyter,color,dark,background
From: https://www.cnblogs.com/yusisc/p/17429893.html

相关文章

  • WPF 使用Background="Transparent"+AllowsTransparency="True"实现穿透效果,窗体多次渲
    如果在WPF中的窗体使用AllowsTransparency="True"实现穿透效果,那么该窗体如果移动、快速渲染、控件比较多的情况,会出现卡顿,CPU暴涨的问题。基于以上情况,可以使用另一种方式实现,由@wuty@terryK指导:usingSystem.Windows;usingAnnotation.Business;namespaceDemo{//......
  • Jupyter Notebook 10个提升体验的高级技巧
    Jupyter笔记本是数据科学家和分析师用于交互式计算、数据可视化和协作的工具。Jupyter笔记本的基本功能大家都已经很熟悉了,但还有一些鲜为人知的技巧可以大大提高生产力和效率。在这篇文章中,我将介绍10个可以提升体验的高级技巧。完整文章:https://avoid.overfit.cn/post/519c......
  • jupyter notebook更改默认工作目录
    jupyternotebook默认配置路径:C:\Users\Administrator\.jupyter\jupyter_notebook_config.py如果找不到配置文件,可以生成一个jupyternotebook--generate-config生成配置文件,启动jupyternotebook,会显示配置文件的路径。打开配置文件jupyter_notebook_config.py,找到c.Noteb......
  • DarkHole_1靶机渗透流程
    VulnHub_DarkHole1靶机渗透流程注意:部署时,靶机的网络连接模式必须和kali一致,让靶机跟kali处于同一网段,这用kali才能扫出靶机的主机1.信息收集1.1探测IP使用nmap扫描同一个段下存活的IPnmap192.168.157.0/24发现192.168.157.138开放了80端口,访问后确认为此次渗透的靶机......
  • uniapp中wx.startLocationUpdateBackground切换到后台仍能间隔上报当前位置
    1.在manifest.json中修改"mp-weixin":{ "appid":"*******",//自己的appid "setting":{ "urlCheck":false }, "usingComponents":true, "requiredPrivateInfos":[ "chooseLocatio......
  • 【环境配置】Jupyter的配置与使用
    简介记录笔者在配置和使用Jupyter过程中遇到的情况,内容持续更新~一、Jupyter的基本使用二、使用过程中遇到的场景场景1:在Linux服务器上部署远程Jupyter基础环境:CentOS7.664bit、miniconda3、Python3.8操作步骤:安装Jupyter先进入conda环境,使用如下命令激活需要安装Ju......
  • Jupyter Lab安装,中文设置,自动补全与代码提示
    1.安装选择任意文件夹作为安装位置官网安装步骤:ProjectJupyter|InstallingJupyter嫌慢可以加镜像:pipinstalljupyterlab-ihttps://pypi.tuna.tsinghua.edu.cn/simple2.设置中文下载中文包:pip3installjupyterlab-language-pack-zh-CN-ihttps://pypi.tuna.tsing......
  • 【2023最新】小白Anaconda+Python+Jupyter环境安装教程+kernel安装
    目录下载Anaconda安装包安装配置Anaconda环境测试是否安装成功为anaconda添加国内源创建环境JupyterNotebook启动Jupyter更改默认工作目录在jupyter中使用conda中安装的虚拟环境参考博客下载Anaconda安装包历史版本(最新版本可能安装不了旧版Python)https://repo.anaconda.com/......
  • android.app.BackgroundServiceStartNotAllowedException
    ---------beginningofcrash05-0901:25:24.46521872187EAndroidRuntime:FATALEXCEPTION:main05-0901:25:24.46521872187EAndroidRuntime:Process:com.android.gallery3d,PID:218705-0901:25:24.46521872187EAndroidRuntime:java.lang.Runti......
  • How to use Linux command to find out the background process All In One
    HowtouseLinuxcommandtofindoutthebackgroundprocessAllInOneLinuxcommandcheckbackgroundprocessjobs$jobs[1]+运行中sudopython3/home/pi/OLED_Stats/stats.py&bg$bg%1$pi@raspberrypi:~$bg--helpbg:bg[任务声明.......