-
Notifications
You must be signed in to change notification settings - Fork 1
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
post/matplotlib_better_code/ #10
Comments
大受启发,不知道大佬能不能多分享一些Python作图或者处理数据模块化技巧,正在逐步学习你的方法 |
最后一段写的太有道理了!牛! |
这篇仅仅是搬运翻译,对这种方法感兴趣的话可以看看原作者博客里的代码。并且我也对这种方法抱有疑问:定义一些没有参数,变量要到全局去找的函数总让我感觉有点不舒服;而如果把函数定义得太详尽,在后续的修改过程中又必须来来回回修改。 |
确实,有时候追求函数的完美反而要花费更多的时间,但是函数确实能让我的代码结构更加清晰 |
是这样的,必要的函数封装能够大大方便后续的使用。不过对于大一点的代码而言有时需要定义很多的函数,反而增加了不少工作量。这个时候可以考虑写一个类来处理了 |
|
有大佬搞地理真的是幸事 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
编写科研作图代码有更好的方法 - 炸鸡人博客
A minimal Hugo theme with nice theme color.
https://zhajiman.github.io/post/matplotlib_better_code/
The text was updated successfully, but these errors were encountered: