[Thread Prev][Thread Next][Index]
Re: [ferret_users] How to make a plot with 2 Y axis
- To: Olivier Marti <olivier.marti@xxxxxxxxxxxx>
- Subject: Re: [ferret_users] How to make a plot with 2 Y axis
- From: William Kessler - NOAA Federal <william.s.kessler@xxxxxxxx>
- Date: Mon, 8 Nov 2021 11:46:11 -0700
- Arc-authentication-results: i=2; mx.google.com; dkim=pass header.i=@noaa.gov header.s=google header.b=IJJLifNR; spf=pass (google.com: domain of william.s.kessler@xxxxxxxx designates 209.85.220.41 as permitted sender) smtp.mailfrom=william.s.kessler@xxxxxxxx; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=noaa.gov
- Arc-authentication-results: i=1; mx.google.com; dkim=pass header.i=@noaa.gov header.s=google header.b=IJJLifNR; spf=pass (google.com: domain of william.s.kessler@xxxxxxxx designates 209.85.220.41 as permitted sender) smtp.mailfrom=william.s.kessler@xxxxxxxx; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=noaa.gov
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-archive:list-help:list-post:list-id:mailing-list:precedence :references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:dkim-signature; bh=0kUJE+6TYzb50huyO5HUSS5XJZD2U1N+Tzn8es6XUrE=; b=oGU/26nOB5gGDURxiVCzAr48ivW/cs0rzQ2Ultb2FCiqaUVAEIPon9vtBPL19PE4ni 78SodRbryaxP1e7xh32jpWrPNM/18d6rXg1Ql9dEXnMg1xiAQRmtsanSLoLubrIlb3QX ZL4CsUPAAFoEetUz3VZgKh9ss6YnGyyMNfb+EPMDyhWjLUxHZpSw0/DpZtePVNVE1HuY 0utEZKnGLISb4UMdHxCaTIsd7fonwJzncSVIXe/HbkiM5T2XzwBpjTqu2U0kPjbkX9C9 F1hgS5AwLMdDO3FfzwmfA8wNOki96QufvqSev1i+dpsf0Fci5OUUNFanZW6tcPQyBDEs v3Iw==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:dkim-signature; bh=0kUJE+6TYzb50huyO5HUSS5XJZD2U1N+Tzn8es6XUrE=; b=M0b2JnfNLJpgnUWcnGSK+vnYdg7T6i3b67XlM35betbJLjhOCg0nCg5yOTeRPfx+w1 7/C7vuH4O5MiLr9nNkwcvzKH4FyHXix7Ce1BzxLtTFzN5545SZGHTs1VCjSkvhxOusB4 Twxjh37H630A5idFwAA1IcMfUTC3neU0VkOyEPP8nTin503DwUSeAZ0TBohpIfOQAmIJ Hxld2WFtHkt5OiEFVlJF5XwoDVj3uyy+omYEMrZIq8Kx3iWZxDYqdT5yBSC6ksn2WFUv R/bN8mQsOIH4EduTi0fjErKnmQl37t44aA+Bc3rmDUiC5eL6HY5gderNqy0VRGvTNaJx DaeA==
- Arc-seal: i=2; a=rsa-sha256; t=1636397176; cv=pass; d=google.com; s=arc-20160816; b=XhmQrCDwUTnjwmu90KhKhn47q5ZVKNrGLEHpNROHgnNUJZG9gOqIfky6UMLMo28z1R 63Z8xcjPH5JNxVok2DBLsqqrLAqQISjEEseKGdevMsKhbknHJKeq5TNzU+pG+YZXctvI /2uOhhdmlfnsqHEUgi+n5FH4pUj904+GA7Pq8Tq8FdhDVc7fd1ljuYgVgrOtKjCtx+4q YgeZsm7LRCGCyT3vwNwgHxs23DWXkwjaU10/4YScaS+IUejvi4XTImPem5COCAZfemr/ db5BfywvpYXuEZmZfvZwt4qgGzwDvF6i7LKfy3QrbJEBURYwyR1pc2KEzKIPP71CNlym CxKw==
- Arc-seal: i=1; a=rsa-sha256; t=1636397175; cv=none; d=google.com; s=arc-20160816; b=HDei5vjjfVdR5kbpF01kTJWwEbutPQ12+/gmmqgqTbdrnKGRTheDSiKj0/hFPqOHVC 4uL7iDJKDhrIfMgZlUwZXnRwcHBYnyrnE7psiSotYeNZ6/WlM06TqQBXG+MNh71UcyQX ejTWCVD0EOHVYLwrgAn0gcaY7aMJYguNijsidB/9BfotlQhJJYcGglynPdARy8t45oBw w1es98V0Hk0cr5l7XJIQMnkOQ4EO32KDHrgNcquN1haHqHrJYrgpPQGAUcOHPE45dAyL SImDLTykzdewIVPKBHpnCJY6LFf+T8Bi0KmDiYoLORwZipypKXTzMltnKt/F7AmfhZz0 MJxA==
- Cc: "Friedlingstein, Pierre" <P.Friedlingstein@xxxxxxxxxxxx>, "ferret_users@xxxxxxxx" <ferret_users@xxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noaa.gov; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive; bh=0kUJE+6TYzb50huyO5HUSS5XJZD2U1N+Tzn8es6XUrE=; b=olKSlm7YquzQkJY9HDDmbS1IunfUG17ZWmpdn14gMMiIEWvMFMJCa+u4I8dDYx9yyx luzuoMBfeRZhGetIuadyos4p7n1/IJL+tOLTWQqDsyTHEOuMOGK6o94DVCy8WtmRBJkz YBHPQfSzieZaTPs0FNfbzvYNru23c7i1R7yX15lnDRyZB5fFUhnKm+tiSytHrhYnR6Hi N2W2mXda79eIPa9cYNGAJk2VBhyMOa1g5bWzEXQU33+VRCEhaXmKsZW+7usa/6HolO3n E9sJ4iohP6r7S/seOnJJKRaTFn8KpNvkWA0pBbP0MtmzHwxFSCp/ucoCYis/ycv94kZU A6xA==
- In-reply-to: <755F4ED9-3AA0-49C0-9422-23577A53D879@lsce.ipsl.fr>
- List-archive: <https://groups.google.com/a/noaa.gov/group/ferret_users/>
- List-help: <https://support.google.com/a/noaa.gov/bin/topic.py?topic=25838>, <mailto:ferret_users+help@noaa.gov>
- List-id: <ferret_users.noaa.gov>
- List-post: <https://groups.google.com/a/noaa.gov/group/ferret_users/post>, <mailto:ferret_users@noaa.gov>
- Mailing-list: list ferret_users@xxxxxxxx; contact ferret_users+owners@xxxxxxxx
- References: <0d516c79a41245e19b9463c7fcb9a6ec@dlr.de> <CAEwQpaJ8a5rvD99fxF-4wwFLirGVOMROaazjZWStRSB++Wx_Yg@mail.gmail.com> <c61842c592904fa5b93606ce585d7ec6@dlr.de> <LO2P265MB4839DAA1FF0D949D2784B9BAB6919@LO2P265MB4839.GBRP265.PROD.OUTLOOK.COM> <755F4ED9-3AA0-49C0-9422-23577A53D879@lsce.ipsl.fr>
- Sender: owner-ferret_users@xxxxxxxx
Yes, this is the way to do this … but it’s important to be careful because what will appear as a single plot (i.e. with Ferret’s checking of how the plotted values fit with the axis values and the other variable plotted) might not be. Right? You could plot anything at all in the overlaid viewport and it will not be checked. It requires more attention to make sure you’re not fooling yourself and your audience.
One way to do this would be to do a test plot showing all axes in both viewports. That way it will be clear (to you) that everything is as it should be. Then remove the right or left axes in the final plot as Olivier suggests.
As Bob Dylan said “To live outside the law you must be honest”.
Billy
> On Nov 8, 2021, at 10:44 AM, Olivier Marti <olivier.marti@xxxxxxxxxxxx> wrote:
>
> The solution is to define two viewports with the exact same parameters : same location, same margins.
>
> I can send you a go file that duplicate a viewport.
>
> Olivier
>
>> Le 8 nov. 2021 à 15:30, Friedlingstein, Pierre <P.Friedlingstein@xxxxxxxxxxxx> a écrit :
>>
>> Hi all,
>> I’m trying to make a plot with 2 time series, each on a separate Y axis (one on the left side and one on the right side of the plot).
>> I’ve tried left_axis_plot and right_axis_plot.
>> also tried multi_yaxis_plot1 and multi_yaxis_overlay.
>>
>> Nothing really works well as I can’t find the way to get the 2nd Y axis at the right side of my plot. It’s either on the left of the main axis (using “-“ for multi_yaxis_overlay), or it’s just at the right of the left plot, ie in the middle of the figure ! (“+” for multi_yaxis_overlay, see screenshot)
>>
>> Also I don’t know how to control the format of the axis anymore (ppl xfor, yfor, etc…).
>>
>> I can send my data but essentially, it’s two time series. For example:
>> DEFINE AXIS/T=2021:2030:1/UNIT=year tax
>> DEFINE GRID/T=tax my_grid
>> SET GRID my_grid
>> Var1 = 500 - 50*(T-2020)
>> Var2 = 25/(10-(T-2020))
>>
>> Thanks for any help.
>> Pierre
>
> —
> Olivier Marti
> LSCE Bât 714 p. 1049
> MERMAID Team
> Normal situation : +33 1 69 08 77 27
> Corona lockdown : +33 6 45 36 43 74
> mailto:olivier.marti@xxxxxxxxxxxx
>
>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement