[Thread Prev][Thread Next][Index]

Re: [ferret_users] How to make a plot with 2 Y axis



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