简体   繁体   English

用python绘制填充

[英]Plotting fills with python

How could i plot two functions like in the image. 我如何绘制两个函数,如图像。 My question is not how to exactly define the functions from the plot but i am looking for a functionality for filling the areas under the functions: same color the common area(white) and different the others as in the pic (grey and green striped). 我的问题不是如何从图中准确定义功能,而是我正在寻找一种功能来填充功能下的区域:相同的颜色(白色)和白色(灰色和绿色条纹)相同。 Image this as a pdf 将其图像化为pdf 在此处输入图片说明

The matplotlib example gallery has a plot showing how to do this: matplotlib示例库中有一个图,显示了如何执行此操作:

http://matplotlib.org/examples/pylab_examples/fill_between_demo.html http://matplotlib.org/examples/pylab_examples/fill_between_demo.html

Usually, looking at the following page tells you how to do various things: 通常,查看以下页面会告诉您如何执行各种操作:

http://matplotlib.org/gallery.html http://matplotlib.org/gallery.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM