Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[kalman_2] Error in LaTeX conversion #7

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

Closed
mmcky opened this issue Mar 18, 2025 · 3 comments · Fixed by #12
Closed

[kalman_2] Error in LaTeX conversion #7

mmcky opened this issue Mar 18, 2025 · 3 comments · Fixed by #12

Comments

@mmcky
Copy link
Contributor

mmcky commented Mar 18, 2025

The following error is being reported

! LaTeX Error: Unicode character 随 (U+968F)
               not set up for use with LaTeX.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.29 {\sffamily $E[y_t]$ 随
                            时间变化}%
No pages of output.

when trying to render

fig, ax = plt.subplots(1, 2)

ax[0].plot(y_hat_t, label=r'$E[y_t| y^{t-1}]$')
ax[0].set_xlabel('时间')
ax[0].set_ylabel(r'$E[y_t]$')
ax[0].set_title(r'$E[y_t]$ 随时间变化')
ax[0].legend()

ax[1].plot(u_hat_t, label=r'$E[u_t|y^{t-1}]$')
ax[1].axhline(y=u_0, color='grey', 
            linestyle='dashed', label=fr'$u_0={u_0:.2f}$')
ax[1].set_xlabel('时间')
ax[1].set_ylabel(r'$E[u_t|y^{t-1}]$')
ax[1].set_title('推断的工作伦理随时间变化')
ax[1].legend()

fig.tight_layout()
plt.show()
@mmcky
Copy link
Contributor Author

mmcky commented Mar 18, 2025

@HumphreyYang do we have the local fonts for matplotlib added to this repo yet?

@HumphreyYang
Copy link
Collaborator

HumphreyYang commented Mar 18, 2025

@HumphreyYang do we have the local fonts for matplotlib added to this repo yet?

No not yet, I can migrate them here but I might assign the task of adding the matplotlib paramters to the RAs since not every lecture needs it.

Usually it wouldn't cause execution error as we had in the intro series. I am not sure why it causes an error here : /

@mmcky
Copy link
Contributor Author

mmcky commented Mar 18, 2025

thanks @HumphreyYang good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants