当前位置:网站首页>How to solve the image pop-up problem when pycharm calls Matplotlib to draw
How to solve the image pop-up problem when pycharm calls Matplotlib to draw
2022-07-01 23:37:00 【Yisu cloud】
PyCharm call matplotlib How to solve the problem of image pop-up when drawing
Today I'd like to share with you PyCharm call matplotlib How to solve the problem of image pop-up when drawing , Detailed content , Clear logic , I believe most people still know too much about this knowledge , So share this article for your reference , I hope you will gain something after reading this article , Now let's take a look .
Problem description
stay PyCharm Call in matplotlib When drawing an image , The default image will appear in Console output ( Pictured ), When drawing More images when , The console output mode is not intuitive .
Problem solving
Hope that in PyCharm Call in matplotlib When drawing an image , You can directly pop up Figure window .
Click on In the menu bar File→Settings→Python Scientific, The check box appears on the right , If checked, it will output ( Default ), If not checked, the image will pop up directly .
Additional attention plt.show()
Bloggers are starting to learn systematically Matplotlib when , Because it is in Jupyter Notebook Check the learning materials on , There is no ( There's no need (Jupyter Notebook The last line of command is output by default )) Input plt.show()
Careless bloggers just follow the gourd painting PyCharm Enter the same code in , After operation , No report error , But there has been no image output .
Based on this , Bloggers search for a lot about call matplotlib There is no solution to image pop-up when drawing , Operate in various ways to solve , A meal operation as fierce as a tiger , No effect .
Finally, I suddenly found , Han Han blogger forgot the last plt.show() The command …
import matplotlib.pyplot as pltimport matplotlib as mplfig, ax = plt.subplots() # Create one that contains a axes Of figureax.plot([1, 2, 3, 4], [1, 4, 2, 3]) # The plot plt.show()
That's all “PyCharm call matplotlib How to solve the problem of image pop-up when drawing ” All the content of this article , Thank you for reading ! I believe you will gain a lot after reading this article , Xiaobian will update different knowledge for you every day , If you want to learn more , Please pay attention to the Yisu cloud industry information channel .
边栏推荐
- 物联网开发零基础教程
- PostgreSQL notes (10) dynamically execute syntax parsing process
- What category does the Internet of things application technology major belong to
- 2022年最佳智能家居开源系统:Alexa、Home Assistant、HomeKit生态系统介绍
- Similarities and differences between the defined identity execution function authid determiner and PostgreSQL in Oracle
- 【ES实战】ES上的安全性运行方式
- Overview of edge calculation
- Leetcode(34)——在排序数组中查找元素的第一个和最后一个位置
- Redis RDB snapshot
- Why is PHP called hypertext preprocessor
猜你喜欢
Why is PHP called hypertext preprocessor
Redis data types and application scenarios
SWT / anr problem - SWT causes kernel fuse deadlock
ARP message header format and request flow
深度学习 | 三个概念:Epoch, Batch, Iteration
软件架构的本质
Yunxin small class | common cognitive misunderstandings in IM and audio and video
SWT/ANR问题--SWT 导致 kernel fuse deadlock
BlocProvider为什么感觉和Provider很相似?
2021 robocom world robot developer competition - preliminary competition of undergraduate group
随机推荐
Redis AOF log
每日三题 6.29
Who do you want to know when opening a stock account? Is it safe to open an account online?
Matplotlib常用設置
Typescript enumeration
【无标题】
Create Ca and issue certificate through go language
Notes to problems - file /usr/share/mysql/charsets/readme from install of mysql-server-5.1.73-1 glibc23.x86_ 64 c
Write some suggestions to current and future doctoral students to sort out and share
云信小课堂 | IM及音视频中常见的认知误区
[must] bm41 output the right view of the binary tree [medium +]
from pip._ internal. cli. main import main ModuleNotFoundError: No module named ‘pip‘
共享电商的背后: 共创、共生、共享、共富,共赢的共富精神
Is there a piece of code that makes you convinced by human wisdom
Redis 主从同步
Reproduction process and problems of analog transformer (ICLR 2022 Spotlight)
Chapter 6 data flow modeling
Applet form verification encapsulation
第六章 数据流建模
ARP message header format and request flow