package external; import java.util.HashMap; import java.util.logging.Logger; import org.autoplot.ScriptContext; import org.autoplot.dom.Application; import org.autoplot.dom.DomOps; import org.python.core.Py; import org.python.core.PyObject; import org.python.core.PyString; /** * Jython command for fixLayout. * @author jbf */ public class FixLayoutCommand extends PyObject { private static final Logger logger= org.das2.util.LoggerManager.getLogger("autoplot"); public static final PyString __doc__ = new PyString("

fixLayout([named parameters])

" + "fixLayout cleans up the layout of the canvas.\n" + "See http://autoplot.org/fixlayout
\n" + "
named parameters:\n" + "" + " \n" + " \n" + " " + " " + " " + " " + "
horizontalSpacing=1em Spacing between plots, such as 1em
verticalSpacing=1em Spacing between plots, such as 1em
hideTitles=True turn off all but the top title\n
hideTimeAxes=True turn off all but the bottom axis\n
hideYAxes=True turn off y-axes between plots
moveLegendsToOutsideNE=True move legends from default inside position to outside, when there is no colorbar.
" + ""); /** * implement the python call. * @param args the "rightmost" elements are the keyword values. * @param keywords the names for the keywords. * @return None */ @Override public PyObject __call__(PyObject[] args, String[] keywords) { FunctionSupport fs= new FunctionSupport( "annotation", new String[] { "horizontalSpacing", "verticalSpacing", "hideTitles", "hideTimeAxes", "hideYAxes" }, new PyObject[] { Py.None, Py.None, Py.None, Py.None, Py.None } ); fs.args( args, keywords ); int nparm= args.length - keywords.length; HashMap controls= new HashMap(); for ( int i=nparm; i