[Matplotlib-users] Help needed to fill_between two curves

vincent.adrien at gmail.com vincent.adrien at gmail.com
Thu May 24 12:54:37 EDT 2018


Hi Akhliesh,

For basic usage of Matpolotlib, the following tutorials may be good 
starting points:
   * https://matplotlib.org/tutorials/introductory/pyplot.html
   * https://matplotlib.org/tutorials/introductory/usage.html
To enforce peculiar x- and y-ranges, I think that you may want to use 
`ax.set_xlim` and `ax.set_ylim` (or `plt.xlim` and `plt.ylim` if you 
prefer the interactive Pyplot interface rather than the object-oriented 
one).

Besides, you may find the following example useful:
https://matplotlib.org/gallery/lines_bars_and_markers/fill_between_demo.html
to learn how to fill the aerea between 2 curves.

Hopefully this will help you a bit.

Best regards,
Adrien

On 05/24/2018 05:13 AM, Akhilesh Nautiyal wrote:
> Dear Sir/Madam,
> 
>                     I am plotting with matplotlib using two data files 
> with different x and y ranges. I need to fill up the region between the 
> two curves. I request you to kindly help me in this regard. I am 
> attaching the files with
> this e-mail. the plot range should be between x->0.93 to 1.0 and y->0 to 
> 0.25.
> 
> Thanking you,
> Sincerely,
> akhliesh
> 
> -- 
> ***********************************************************************************************
> *    Dr. Akhilesh Nautiyal
> *   Assistant Professor
> *   Department of Physics
> *   Malaviya National Institute of Technology Jaipur
> *   JLN Marg Jaipur-302017
> *    Mo: +91-9 <tel:%2B91-9445520847>549657939
> ***********************************************************************************************
> 
> 
> This body part will be downloaded on demand.
> 



More information about the Matplotlib-users mailing list