在Jupyter实验室中用深色主题绘制R几乎看不到 [英] Plotting R in Jupyter lab with dark theme is barely visible

查看:41
本文介绍了在Jupyter实验室中用深色主题绘制R几乎看不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Jupyter实验室中使用R内核进行绘图,并且将Jupyter实验室主题设置为"Jupyterlab黑暗".

I am trying to plot using R kernel in Jupyter lab, and I set my Jupyter lab theme as "Jupyterlab dark."

下面是我的代码:

options(repr.plot.width=20, repr.plot.height=5)
plot(x)
points(x2,pch=1,col="blue")

这就是我得到的

有没有办法使它看起来更像下面的情节?(我将Jupyter Lab主题切换为亮色,现在该图可见)

Is there a way to make it look more like the plot below? (I switched jupyter lab theme to light, and now the plot is visible)

推荐答案

在情节之前添加此内容:

Add this before the plot:

par(bg = 'white')
plot(df)

这篇关于在Jupyter实验室中用深色主题绘制R几乎看不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆