Ejemplo n.º 1
0
  /**
   * Constructor.
   *
   * @param dimNames names of main plot dimensions (typically "X", "Y", etc);
   * @param useAux whether auxiliary axes are used
   * @param useLabel whether point text labelling is used
   * @param errNdim number of axes for which errors can be plotted
   */
  public PlotStateFactory(String[] dimNames, boolean useAux, boolean useLabel, int errNdim) {
    mainDimNames_ = dimNames;
    useAux_ = useAux;
    useLabel_ = useLabel;
    errNdim_ = errNdim;

    gridParam_ = new BooleanParameter("grid");
    gridParam_.setPrompt("Draw grid lines?");
    gridParam_.setDescription(
        new String[] {
          "<p>If true, grid lines are drawn on the plot.", "If false, they are absent.", "</p>",
        });
    gridParam_.setDefault(true);

    seqParam_ = new DefaultMultiParameter("sequence", ',');
    seqParam_.setPrompt("Defines plot order of subsets");
    seqParam_.setUsage("<suffix>,<suffix>,...");
    seqParam_.setDescription(
        new String[] {
          "<p>Can be used to control the sequence in which different",
          "datasets and subsets are plotted.",
          "This will affect which symbols are plotted on top of,",
          "and so potentially obscure,",
          "which other ones.",
          "The value of this parameter is a comma-separated list of the",
          "\"<code>" + TABLE_VARIABLE + SUBSET_VARIABLE + "</code>\"",
          "suffixes which appear on the",
          "parameters which apply to subsets.",
          "The sets which are named",
          "will be plotted in order, so the first-named one will be",
          "at the bottom (most likely to be obscured).",
          "Note that if this parameter is supplied, then only those sets",
          "which are named will be plotted,",
          "so this parameter may also be used to restrict which plots appear",
          "(though it may not be the most efficient way of doing this).",
          "If no explicit value is supplied for this parameter,",
          "sets will be plotted in some sequence decided by STILTS",
          "(probably alphabetic by suffix).",
          "</p>",
        });
    seqParam_.setNullPermitted(true);

    aaParam_ = new BooleanParameter("antialias");
    aaParam_.setPrompt("Use antialiasing for lines?");
    aaParam_.setDescription(
        new String[] {
          "<p>Controls whether lines are drawn using antialiasing,",
          "where applicable.",
          "If lines are drawn to a bitmapped-type graphics output format",
          "setting this parameter to true smooths the lines out by",
          "using gradations of colour for diagonal lines, and setting it",
          "false simply sets each pixel in the line to on or off.",
          "For vector-type graphics output formats, or for cases in which",
          "no diagonal lines are drawn, the setting of this parameter",
          "has no effect.",
          "Setting it true may slow the plot down slightly.",
          "</p>",
        });
    aaParam_.setDefault(true);
  }
Ejemplo n.º 2
0
    /**
     * Constructor.
     *
     * @param axName axis name
     */
    public AxisParameterSet(String axName) {
      axName_ = axName.toLowerCase();
      loParam_ = new DoubleParameter(axName_ + "lo");
      loParam_.setPrompt("Lower bound for " + axName_ + " axis");
      loParam_.setDescription(
          new String[] {
            "<p>The lower limit for the plotted " + axName_ + " axis.",
            "If not set, a value will be chosen which is low enough",
            "to accommodate all the data.",
            "</p>",
          });
      loParam_.setNullPermitted(true);

      hiParam_ = new DoubleParameter(axName_ + "hi");
      hiParam_.setPrompt("Upper bound for " + axName_ + " axis");
      hiParam_.setDescription(
          new String[] {
            "<p>The upper limit for the plotted " + axName_ + " axis.",
            "If not set, a value will be chosen which is high enough",
            "to accommodate all the data.",
            "</p>",
          });
      hiParam_.setNullPermitted(true);

      logParam_ = new BooleanParameter(axName_ + "log");
      logParam_.setPrompt("Logarithmic scale on " + axName_ + " axis?");
      logParam_.setDescription(
          new String[] {
            "<p>If false (the default), the scale on the " + axName_,
            "axis is linear; if true it is logarithmic.",
            "</p>",
          });
      logParam_.setDefault("false");

      flipParam_ = new BooleanParameter(axName_ + "flip");
      flipParam_.setPrompt("Reversed direction on " + axName_ + "axis?");
      flipParam_.setDescription(
          new String[] {
            "<p>If set true, the scale on the " + axName_ + " axis",
            "will increase in the opposite sense from usual",
            "(e.g. right to left rather than left to right).",
            "</p>",
          });
      flipParam_.setDefault("false");

      labelParam_ = new Parameter(axName_ + "label");
      labelParam_.setPrompt("Label for axis " + axName_);
      labelParam_.setDescription(
          new String[] {
            "<p>Specifies a label to be used for annotating axis " + axName_ + ".",
            "A default values based on the plotted data will be used",
            "if no value is supplied for this parameter.",
            "</p>",
          });
      labelParam_.setNullPermitted(true);
    }