-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Book_1_Ch_11代码疑问 #129
Comments
确实,Latex没有被渲染。如果你要是找到什么好办法,告诉我哈。
Cheers,
…On Sun, Dec 17, 2023 at 10:31 PM Mephistofer ***@***.***> wrote:
Book_1_Ch_11,第16页,代码 4. 用 Plotly 生成平面等高线 | Bk1_Ch11_04.ipynb
# 创建布局
layout = go.Layout(
width=600, # 设置图形宽度
height=600, # 设置图形高度
xaxis=dict(title=r'$x_1$'),
yaxis=dict(title=r'$x_2$'))
这段代码,Latex语法在vscode和jupyter
notebook中都没有生效,感觉plotly.graph_objects对于Latex支持可能有一点问题。
在vscode中,latex默认渲染是vscode,可以修改渲染器生效,例如:
import plotly.io as pio
pio.renderers.default = 'svg'
但是chrome中使用jupyter
notebook,默认渲染是“plotly_mimetype+notebook",目前渲染器我设置为browser才可以,不清楚怎么回事。
—
Reply to this email directly, view it on GitHub
<#129>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZHC6VYVJXJMUI5KZQR52S3YJ62JTAVCNFSM6AAAAABAY32CS6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2DKNRWGUZDEOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
如果确保anaconda运行环境正确(从prop中启动jupyter),以及正确安装了 Kaleido,则将默认的渲染器设置为图像类的,之后的都可以正常显示。比如绘图前设置:
|
之前我发现这种设置vscode可以,jupyterlab不行的原因是我启动jupyterlab是直接cmd进入的,没有进入base环境中,如果直接从prompt中进入就没有这个问题。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Book_1_Ch_11,第16页,代码 4. 用 Plotly 生成平面等高线 | Bk1_Ch11_04.ipynb
这段代码,Latex语法在vscode和jupyter notebook中都没有生效,感觉plotly.graph_objects对于Latex支持可能有一点问题。
在vscode中,latex默认渲染是vscode,可以修改渲染器生效,例如:
但是chrome中使用jupyter notebook,默认渲染是“plotly_mimetype+notebook",目前渲染器我设置为browser才可以,不清楚怎么回事。
The text was updated successfully, but these errors were encountered: