Kader,
When you call twinx, a second set of x and y labels are created. You can
turn the labels off if you’d like
frame1.axes.get_xaxis().set_ticks([])
frame1.axes.get_yaxis().set_ticks([])
I’d also recommend not importing metpy.calc.thermo. When you import
metpy.calc all of those functions are included. See this tutorial:
https://unidata.github.io/MetPy/latest/tutorials/upperair_soundings.html#sphx-glr-tutorials-upperair-soundings-py
Best,
John Leeman, Ph.D.
Software Engineer
UCAR/Unidata
303-497-8621
On July 6, 2017 at 12:54:38 AM, Abdelkader Merzougui (
abdelkader.merzougui@xxxxxxxx) wrote:
Thank you John,
I send you as an attachment the code. Other calculations are included that
are not part of the plot.
Best Regards.
Kader
------------------------------
*De:* "John Leeman" <jleeman@xxxxxxxx>
*À:* "Abdelkader Merzougui" <abdelkader.merzougui@xxxxxxxx>,
python-users@xxxxxxxxxxxxxxxx
*Envoyé:* Mercredi 5 Juillet 2017 15:36:11
*Objet:* Re: [python-users] MetPy thermo.cape_cin function
Kader,
Would you mind sharing the code you are using to create this plot? Without
seeing it, I’m unable to tell what is causing the labels to be doubled.
Thank you,
John Leeman, Ph.D.
Software Engineer
UCAR/Unidata
303-497-8621
On July 3, 2017 at 6:34:13 AM, Abdelkader Merzougui (
abdelkader.merzougui@xxxxxxxx) wrote:
HI John,
Thank you for your help, I have another question regarding the plot.
By making this graph, I have the y-axis indices that are duplicated and
superimposed with those of the x-axis
I send you an example in attachment.
Best Regards.
Kader
------------------------------
*De:* "John Leeman" <jleeman@xxxxxxxx>
*À:* "Abdelkader Merzougui" <abdelkader.merzougui@xxxxxxxx>,
python-users@xxxxxxxxxxxxxxxx
*Envoyé:* Vendredi 30 Juin 2017 15:31:10
*Objet:* Re: [python-users] MetPy thermo.cape_cin function
Hello Kader,
Are you running the current master branch from GitHub? The CAPE/CIN
calculation was just added and is not in an official release of MetPy yet.
The calling syntax would look something like:
import metpy.calc as mpcalc
cape, cin = mpcalc.cape_cin(…….)
As you’ve probably noticed, this is a recent addition (as of this week) to
MetPy. We’re working on some convenience functions to help with surface
based, mixed layer, and most unstable CAPE, as well as doing the virtual
temperature correction for you. This base function assumes nothing, so
don’t forget to apply the relevant corrections to your data.
As far as SRH, there is a PR for it that will hopefully be merged soon (
https://github.com/Unidata/MetPy/pull/462). The team will be at the SciPy
conference in a few weeks hosting a sprint in which we hope to work towards
getting these additional calculations in master.
John Leeman, Ph.D.
Software Engineer
UCAR/Unidata
303-497-8621
On June 30, 2017 at 7:16:47 AM, Abdelkader Merzougui (
abdelkader.merzougui@xxxxxxxx) wrote:
Hello,
I'm trying to calculate cape, cin values with cape_cin function which can
be found in MetPy thermo module,
but I encounter the error: *AttributeError: 'module' object has no
attribute 'cape_cin'*
Also I wanrt to calculate the SRH "Storm Relative Helicity", is there a
formula in MetPy to do that?
Kind Regards
Kader Merzougui
_______________________________________________
NOTE: All exchanges posted to Unidata maintained email lists are
recorded in the Unidata inquiry tracking system and made publicly
available through the web. Users who post to any of the lists we
maintain are reminded to remove any personal information that they
do not want to be made public.
python-users mailing list
python-users@xxxxxxxxxxxxxxxxxxxxxxxx
For list information, to unsubscribe, or change your membership options,
visit: http://www.unidata.ucar.edu/mailing_lists/