FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Feature request - default themes for Python interactive window · Issue #3725 · microsoft/vscode-jupyter · GitHub

Repository navigation

Feature request - default themes for Python interactive window  #3725

Closed

Description

Consider the possibly to change the style of the Python Interactive window, especially when using jupyter, and providing a list of default themes, a style "JupyterLab" would be nice for example.

It would allow us to enhance the results, like Markdown Preview Enhanced enhances the markdown output (and provides a list of default themes) or VS Code Jupyter Notebook Previewer enhances its own window viewer.

Activity

  1. PierreMarchand20 commented on Dec 24, 2018

    Author

    An example: I like the solarized dark theme but it gives me the following highlighting


    which is not really readable (especially the blue for functions and black for operations). Strangely enough, it is different from my python highlighting

    At least, it would be nice to have the same colors as in the '.py' file.

  2. rchiodo commented on Jan 2, 2019

    Contributor

    We have an outstanding issue (#3107) to fix up the colors for the python in the interactive window.

    Are you asking for more than just matching the python colors? Did you want theming for graphs and such too?

  3. PierreMarchand20 commented on Jan 4, 2019

    Author

    Oh Well I do not know, a good start would be to have the same syntax coloring as in the editor. Because the python parts of the interactive window really hurt the eyes.

    But then, it would be nice to have the option to have something like https://github.com/jithurjacob/vscode-nbpreviewer or the Jupiter lab, with a white background. Because for example, if I want to show something "live", it would be more readable.

  4. stevenlis commented on Jan 12, 2019

    I have the same issue. The jupyter window is much more readable if I change the theme to Light. So I wonder if it is possible to set different themes for those two separate windows.


  5. stevenlis commented on Jan 14, 2019

    a new issue was opened for this request by Ian Huff (@IanMatthewHuff).

  6. PierreMarchand20 commented on Jan 15, 2019

    Author
  7. PierreMarchand20 commented on Jan 15, 2019

    Author

    But I guess that at the end, the goal is to have all these features in vscode-python

  8. stevenlis commented on Jan 15, 2019

  9. stevenlis commented on Jan 31, 2019

    Rich Chiodo (@rchiodo) The version 2019.1.0 somehow converts the tick label to white in fivethirtyeight theme. Is this expected?

  10. rchiodo commented on Jan 31, 2019

    Contributor

    Yes that's expected. You have to do this instead (as we are applying a dark background to matplotlib when the theme is dark):

    #%%
    with plt.style.context('fivethirtyeight', True):
        fix, ax = plt.subplots()
    

    Without the after_reset style argument, I get this:

    With after_reset set to True, I get this:

  11. stevenlis commented on Jan 31, 2019

    How should I specify this if I use plt.use.style()?

  12. rchiodo commented on Jan 31, 2019

    Contributor

    You'd put that command before your plot. Like so:

    plt.style.use('fivethirtyeight')
    fix, ax = plt.subplots()
    

    This goes into more detail:
    https://matplotlib.org/users/style_sheets.html

    Essentially imagine we have a plt.style.use('dark_background') at the very top of your file (because that's what we do when you startup with a dark scheme)

    If you want to override just parts of it, this works:

    plt.style.use(['fivethirtyeight', 'dark_background'])
    fix, ax = plt.subplots()
    

    I end up with this result then:

  13. stevenlis commented on Feb 1, 2019

    Thanks for the information man... I just want the text labels to be black and eventually end up using:

    plt.style.use(['seaborn', 'fivethirtyeight'])
    
  14. stefandeml commented on Feb 26, 2019

    +1 to fix this issue

    currently the interactive window is really hard to be used with dark themes

  15. 51 remaining items

  16. PierreMarchand20 commented on Jul 20, 2019

    Author

    One point I was making with this thread was that I did not how to do it. Then, reading the messages in the thread, you can either use the option ignoreVsCodeTheme or use in your code the following line: mpl.rcParams.update(_VSCode_defaultMatplotlib_Params). But the latter is not rendering well for me so I would suggest the former.

    By the way, I noticed that there is no more issue with the background error color right ? If so, I agree that we could close this issue since we can set a light Color theme to the interactive window (which was what I was asking for at the beginning). But the default theme with a dark theme has really improved so I actually do not use this option ^^ thank you !

  17. wqp89324 commented on Jul 21, 2019

    Pierre Marchand (@PierreMarchand20) Thanks! I tried ignoreVsCodeTheme, which kinda work (interactive window is all light theme now), but still not as good as Spyder (the screenshot I attached earlier), and I attach another one below.

    In Spyder, the dark theme works everywhere except for the figures, which is really the behavior I'm after. What do you think?

  18. PierreMarchand20 commented on Jul 21, 2019

    Author

    Well then you can try the second approach I suggested, it will be closer to what you want. The idea is to change the parameter of matplotlib. But Rich Chiodo (@rchiodo) will know better than me about this.

  19. PierreMarchand20 commented on Jul 21, 2019

    Author

    actually, I got decent results with just mpl.style.use('classic')

  20. rchiodo commented on Jul 22, 2019

    Contributor

    Closing this as the original issue is resolved.

  21. rchiodo commented on Jul 22, 2019

    Contributor

    Sorry wrong issue. Not sure we're going to do themes for the interactive window though.

  22. PierreMarchand20 commented on Jul 22, 2019

    Author

    As I said in my previous message, I am ok to close it since allowing we can know use a light theme and most of the issues with colouring has been solved

  23. rchiodo commented on Jul 22, 2019

    Contributor

    Thanks. Will close then.

  24. locked as resolved and limited conversation to collaborators on Jul 29, 2019
  25. unlocked this conversation on Nov 14, 2020
  26. locked as resolved and limited conversation to collaborators on May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL