I figured it out, the correct call is secondaryY(plt_data, etc. then it works.
If I use the default pic and then plot secondary axis (as in the example in the 2d graphs) everything works fine. If I name the graph say with picture plot_data; and execute all commands with a picture argument set to plt_data and do not try to add the secondary axis every works fine but if I then try to execute the secondary axis code I get the error -
if(!primary.scale.set) abort(noprimary);
^
/usr/local/share/asymptote/graph.asy: 1823.31: Primary axis must be drawn before secondary axis
I figured it out, the correct call is
secondaryY(plt_data,
etc. then it works.If I use the default pic and then plot secondary axis (as in the example in the 2d graphs) everything works fine. If I name the graph say with
picture plot_data;
and execute all commands with a picture argument set toplt_data
and do not try to add the secondary axis every works fine but if I then try to execute the secondary axis code I get the error -if(!primary.scale.set) abort(noprimary);
^
/usr/local/share/asymptote/graph.asy: 1823.31: Primary axis must be drawn before secondary axis
Here is the code -
Last edit: Alan Bromborsky 2024-06-08