package external; import java.awt.Color; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URISyntaxException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.text.ParseException; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; import org.das2.datum.DatumRange; import org.das2.graph.DasColorBar; import org.das2.graph.DefaultPlotSymbol; import org.das2.graph.PlotSymbol; import org.das2.graph.PsymConnector; import org.das2.util.ClassMap; import org.python.core.Py; import org.python.core.PyInteger; import org.python.core.PyObject; import org.python.core.PyString; import org.autoplot.RenderType; import org.autoplot.ScriptContext; import org.autoplot.datasource.DataSourceUtil; import org.autoplot.dom.Application; import org.autoplot.dom.CanvasUtil; import org.autoplot.dom.Column; import org.autoplot.dom.DataSourceFilter; import org.autoplot.dom.DomNode; import org.autoplot.dom.DomUtil; import org.autoplot.dom.Plot; import org.autoplot.dom.PlotElement; import org.autoplot.dom.Row; import org.das2.qds.QDataSet; import org.autoplot.jythonsupport.JythonOps; import org.autoplot.jythonsupport.PyQDataSetAdapter; import org.das2.datum.DatumRangeUtil; import org.das2.graph.FillStyle; import org.das2.graph.Renderer; import org.das2.graph.SeriesRenderer; import org.das2.qds.DataSetUtil; import org.das2.qds.ops.Ops; import org.das2.util.monitor.NullProgressMonitor; import org.python.core.PyJavaInstance; import org.python.core.PyList; import org.python.core.PyMethod; /** * new implementation of the plot command allows for keywords in the * Jython environment. *
* @see http://autoplot.org/help.plotCommand * @author jbf */ public class PlotCommand extends PyObject { private static final Logger logger= org.das2.util.LoggerManager.getLogger("autoplot"); public static final PyString __doc__ = new PyString("{@code * plot( 0, ripples(20) ) * plot( 1, ripples(20), color=Color.BLUE ) * plot( 2, ripples(20), renderType='series>color=blue' ) *}
xlog ylog zlog | explicitly set this axis to log (or linear when set equal to 0.). |
[xyz]title | set the label for the axis. |
index | plot index\n |
title | title for the plot\n |
renderType | explcitly set the render type, to scatter, series, nnSpectrogram, digital, etc\n |
color | the line colors.\n |
fillColor | the color when filling volumes.\n |
colorTable | the color table to use, like white_blue_black or black_red.\n |
symbolSize | set the point (pixel) size\n |
symbolFill | none, outline, or solid (solid is default)\n |
lineWidth | deprecated--the line thickness in points (pixels)\n |
lineThick | the line thickness in points (pixels)\n |
lineStyle | the line style, one of solid,none,dotfine,dashfine |
symbol | the symbol, e.g. dots triangles cross\n |
isotropic | constrain the ratio between the x and y axes.\n |
legendLabel | add label to the legend |
title | title for the plot\n |
xpos | override horizontal position of plot, eg. '50%+1em,100%-2em'\n | " + "
ypos | override vertical position of plot, eg. '0%+1em,25%-2em', 0 is top\n | " + "
[xy]drawTickLabels | False turns off the x or y tick labels for the plot\n | " + "
[xy]tickValues | explicitly control the tick locations. | " + "
[xyz]autoRangeHints | hints to the autorange, see http://autoplot.org/AxisAutoRangeHints\n | " + "
renderer | add custom renderer, a class extending org.das2.graph.Renderer, see http://autoplot.org/CustomRenderers | " + "
rightAxisOf | specify a plot where a new plot with a new yaxis. | " + "
topAxisOf | specify a plot where a new plot with a new xaxis above. | " + "
overplotOf | a plot or plot element with which this should share axes. Note something should reset the plot! | " + "