Skip to content
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

Customize the ipython shell displayed plot and font size in comint buffer. #4

Closed
hongyi-zhao opened this issue Oct 8, 2021 · 2 comments

Comments

@hongyi-zhao
Copy link

hongyi-zhao commented Oct 8, 2021

Currently, I'm using the comint-mime package with the following configuration:

(use-package comint-mime
  :straight (:host github :repo "astoff/comint-mime"
             :files (:defaults "*.py" "*.sh"))
  :hook ((shell-mode inferior-python-mode) . comint-mime-setup))

With the help of this package, I can display python matplotlib plot and LaTeX formula in Emacs comint buffer, as shown in the screenshot below:

image

But I want to know if I can customize the ipython shell displayed plot and font size in comint buffer. Any hints will be appreciated.

Regards, HZ

@hongyi-zhao hongyi-zhao changed the title Change the displayed font family and font size for the ipython output in comint buffer. Customize the displayed font family and font size for the ipython output in comint buffer. Oct 8, 2021
@astoff
Copy link
Owner

astoff commented Oct 8, 2021

For the LaTeX conversion, see org-format-latex-options (you could have discovered this by looking at the code to see which function handles LaTeX stuff).

As to the plot, they are just images, you can't do anything on the Emacs side. If you're making these images with Matplolib, then look up its documentation to see how to customize things.

@astoff astoff closed this as completed Oct 8, 2021
@hongyi-zhao
Copy link
Author

hongyi-zhao commented Oct 8, 2021

For the LaTeX conversion, see org-format-latex-options

Thank you. The following configuration does the trick:

(use-package comint-mime
  :straight (:host github :repo "astoff/comint-mime"
             :files (:defaults "*.py" "*.sh"))
  :hook ((shell-mode inferior-python-mode) . comint-mime-setup))
  :custom
  (org-format-latex-options '(plist-put org-format-latex-options :scale 1.5))

As to the plot, they are just images, you can't do anything on the Emacs side.

Based on the comments here, I find the following Emacs commands to do the trick:

image-increase-size
image-decrease-size
image-mouse-increase-size
image-mouse-decrease-size

@hongyi-zhao hongyi-zhao changed the title Customize the displayed font family and font size for the ipython output in comint buffer. Customize the displayed plot and font size of the ipython shell in comint buffer. Oct 9, 2021
@hongyi-zhao hongyi-zhao changed the title Customize the displayed plot and font size of the ipython shell in comint buffer. Customize the ipython shell displayed plot and font size in comint buffer. Oct 9, 2021
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

No branches or pull requests

2 participants