gpt4 book ai didi

python - 如何编辑 JupyterLab 主题

转载 作者:行者123 更新时间:2023-12-04 02:58:50 27 4
gpt4 key购买 nike

我想编辑 JupyterLab 深色主题,以便可以清楚地读取内联图中的轴标签。问题示例:
Example of the issue with the Dark theme
为了解决这个问题,我想将包含图像的输出单元格的背景颜色更改为灰色阴影。我使用 Chrome DevTools 检查网页,发现类 class="p-Widget jp-RenderedImage jp-mod-trusted jp-OutputArea-output" .
Div class that I'd like to alter
我注意到我可以通过使用 JupyterLab Light Theme 或在 matplotlib 中使用深色绘图主题来解决这个问题。 ,但是我想直接解决这个问题。我欢迎所有对资源的建议或指示,以帮助我理解和解决这个问题。谢谢!
GitHub 上的相关问题:

  • How to figure out current jupyterlab theme in script imported by notebook #3855

  • 相关的问题:
  • How to edit jupyter lab theme
  • Plotting R in Jupyter lab with dark theme is barely visible
  • 最佳答案

    要编辑 JupypterLab 主题,您需要更改文件 variables.css 位于jupyterlab/packages/[THEME NAME]/style/您可以检查要更改的 JupyterLab 元素以找出其类。我使用 Chrome DevTools ctrl+shift+i然后单击各种 div 类,直到找到我想要更改的那个。
    获得要自定义的 div 类的名称后,将更改添加到 variables.css文件。这是我更改的内容和结果。

    .jp-RenderedImage {
    background-color: #A4A4A4
    }
    Change background of figures to grey to allow axis to be read
    您可以使用 this gist (where the code in the first cell comes from)由 JupyterLab 贡献者之一创建,用于试验您对 variables.css 所做的更改文件。

    关于python - 如何编辑 JupyterLab 主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51191993/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com