<div dir="ltr">Dear Adrien,<div> Thanks again for your kindly help. My problem is solved. I could get the plot I needed, which is attached here. I had to plot one more data file and had to use two fill_between calls. </div><div><br></div><div>Regards,</div><div>akhilesh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 30, 2018 at 7:23 AM, <a href="mailto:vincent.adrien@gmail.com">vincent.adrien@gmail.com</a> <span dir="ltr"><<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Akhilesh,<br>
<br>
I am not totally sure that I understand what is your remaining issue. To me, it seems that it is just a matter of building the “correct” common abscissa vector to pass to ``fill_between``. See for example the attached snippet for another kind of abscissa vector that would be possible and maybe better suited to what you want.<br>
<br>
Regards,<br>
Adrien<span class=""><br>
<br>
On 05/28/2018 10:50 PM, Akhilesh Nautiyal wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Adrien,<br>
<br><span class="">
    Thanks a lot for your kind help. With this I am getting an extra filled region as the abscissa of N_46 is getting extended. I will try to play around with this to find some solution.<br>
<br>
Regards,<br>
akhilesh<br>
<br></span><div><div class="h5">
On Fri, May 25, 2018 at 6:10 PM, <a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.com</a> <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a>> <<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.com</a> <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a>>> wrote:<br>
<br>
    Hi Akhilesh,<br>
<br>
    Then I guess that you need to somehow interpolate your data to share<br>
    the same abscissa values, at least for the “fill between” step. I am<br>
    not very used to do this kind of things but please find attached a<br>
    script that may be helpful to you (it produces to attached PNG, with<br>
    Matplotlib 2.2). It uses Numpy to perform linear interpolation of<br>
    your data; scipy.interpolate may also be a good source of<br>
    interpolation tools if this is not good enough for you.<br>
<br>
    Best,<br>
    Adrien<br>
<br>
    PS : I also reattach the data files, to make it easier to play with<br>
    the script if somebody else wanted to propose a better solution.<br>
<br>
    On 05/25/2018 03:44 AM, Akhilesh Nautiyal wrote:<br>
<br>
        Dear Adrien,<br>
<br>
                   Thanks for the reply. I have tried all that. Actually<br>
        in my case the two  curves have different size of abscissa and<br>
        ordinates.  Suppose I make arrays like x1, y1 and x2, y2 from<br>
        two data files<br>
        attached in my previous mail, the arrays x1 and x2 have<br>
        different size and the arrays y1 and y2 have different size.<br>
        I will be grateful if you can help me how to fill the area<br>
        between these curves n this particular case.<br>
<br>
        With Regards,<br>
        akhilesh<br>
<br>
        On Thu, May 24, 2018 at 10:24 PM, <a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.com</a><br>
        <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a>><br></div></div>
        <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a><span class=""><br>
        <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a>>> <<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.com</a><br>
        <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a>><br></span>
        <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a><div><div class="h5"><br>
        <mailto:<a href="mailto:vincent.adrien@gmail.com" target="_blank">vincent.adrien@gmail.c<wbr>om</a>>>> wrote:<br>
<br>
             Hi Akhliesh,<br>
<br>
             For basic usage of Matpolotlib, the following tutorials may<br>
        be good<br>
             starting points:<br>
                *<br>
        <a href="https://matplotlib.org/tutorials/introductory/pyplot.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutoria<wbr>ls/introductory/pyplot.html</a><br>
        <<a href="https://matplotlib.org/tutorials/introductory/pyplot.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutori<wbr>als/introductory/pyplot.html</a>><br>
             <<a href="https://matplotlib.org/tutorials/introductory/pyplot.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutori<wbr>als/introductory/pyplot.html</a><br>
        <<a href="https://matplotlib.org/tutorials/introductory/pyplot.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutori<wbr>als/introductory/pyplot.html</a>>><br>
                *<br>
        <a href="https://matplotlib.org/tutorials/introductory/usage.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutoria<wbr>ls/introductory/usage.html</a><br>
        <<a href="https://matplotlib.org/tutorials/introductory/usage.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutori<wbr>als/introductory/usage.html</a>><br>
             <<a href="https://matplotlib.org/tutorials/introductory/usage.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutori<wbr>als/introductory/usage.html</a><br>
        <<a href="https://matplotlib.org/tutorials/introductory/usage.html" rel="noreferrer" target="_blank">https://matplotlib.org/tutori<wbr>als/introductory/usage.html</a>>><br>
             To enforce peculiar x- and y-ranges, I think that you may<br>
        want to<br>
             use `ax.set_xlim` and `ax.set_ylim` (or `plt.xlim` and<br>
        `plt.ylim` if<br>
             you prefer the interactive Pyplot interface rather than the<br>
             object-oriented one).<br>
<br>
             Besides, you may find the following example useful:<br>
        <a href="https://matplotlib.org/gallery/lines_bars_and_markers/fill_between_demo.html" rel="noreferrer" target="_blank">https://matplotlib.org/gallery<wbr>/lines_bars_and_markers/fill_<wbr>between_demo.html</a><br>
        <<a href="https://matplotlib.org/gallery/lines_bars_and_markers/fill_between_demo.html" rel="noreferrer" target="_blank">https://matplotlib.org/galler<wbr>y/lines_bars_and_markers/fill_<wbr>between_demo.html</a>><br>
                    <<a href="https://matplotlib.org/gallery/lines_bars_and_markers/fill_between_demo.html" rel="noreferrer" target="_blank">https://matplotlib.org/galler<wbr>y/lines_bars_and_markers/fill_<wbr>between_demo.html</a><br>
        <<a href="https://matplotlib.org/gallery/lines_bars_and_markers/fill_between_demo.html" rel="noreferrer" target="_blank">https://matplotlib.org/galler<wbr>y/lines_bars_and_markers/fill_<wbr>between_demo.html</a>>><br>
             to learn how to fill the aerea between 2 curves.<br>
<br>
             Hopefully this will help you a bit.<br>
<br>
             Best regards,<br>
             Adrien<br>
<br>
             On 05/24/2018 05:13 AM, Akhilesh Nautiyal wrote:<br>
<br>
                 Dear Sir/Madam,<br>
<br>
                                      I am plotting with matplotlib<br>
        using two<br>
                 data files with different x and y ranges. I need to<br>
        fill up the<br>
                 region between the two curves. I request you to kindly<br>
        help me<br>
                 in this regard. I am attaching the files with<br>
                 this e-mail. the plot range should be between x->0.93<br>
        to 1.0 and<br>
                 y->0 to 0.25.<br>
<br>
                 Thanking you,<br>
                 Sincerely,<br>
                 akhliesh<br>
<br>
                 --                 *****************************<wbr>******************************<wbr>******************************<wbr>******<br>
                 *    Dr. Akhilesh Nautiyal<br>
                 *   Assistant Professor<br>
                 *   Department of Physics<br>
                 *   Malaviya National Institute of Technology Jaipur<br>
                 *   JLN Marg Jaipur-302017<br>
                 *    Mo: +91-9 <tel:%2B91-9445520847>54965793<wbr>9<br>
                        ******************************<wbr>******************************<wbr>******************************<wbr>*****<br>
<br>
<br>
                 This body part will be downloaded on demand.<br>
<br>
<br>
<br>
<br>
<br>
        --         *****************************<wbr>******************************<wbr>******************************<wbr>******<br>
        *    Dr. Akhilesh Nautiyal<br>
        *   Assistant Professor<br>
        *   Department of Physics<br>
        *   Malaviya National Institute of Technology Jaipur<br>
        *   JLN Marg Jaipur-302017<br>
        *    Mo: +91-9 <tel:%2B91-9445520847>54965793<wbr>9<br>
        ******************************<wbr>******************************<wbr>******************************<wbr>*****<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
******************************<wbr>******************************<wbr>******************************<wbr>*****<br>
*    Dr. Akhilesh Nautiyal<br>
*   Assistant Professor<br>
*   Department of Physics<br>
*   Malaviya National Institute of Technology Jaipur<br>
*   JLN Marg Jaipur-302017<br>
*    Mo: +91-9 <tel:%2B91-9445520847>54965793<wbr>9<br>
******************************<wbr>******************************<wbr>******************************<wbr>*****<br>
</div></div></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>***********************************************************************************************</div><div>*    Dr. Akhilesh Nautiyal<br>
*   Assistant Professor<br>
*   Department of Physics<br>
*   Malaviya National Institute of Technology Jaipur<br>
*   JLN Marg Jaipur-302017<br></div><div>*    Mo: <a href="tel:%2B91-9445520847" value="+919445520847" target="_blank">+91-9</a>549657939</div><div>***********************************************************************************************</div></div></div>
</div>