Class ShaderLegend


  • public class ShaderLegend
    extends java.lang.Object
    Generates a graphic in SVG format showing labelled colourmaps.
    Since:
    1 Sep 2022
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      ShaderLegend​(int ncol)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Shader[] getAllShaders()
      Returns all the shaders generally available from Plot2 graphics.
      static void main​(java.lang.String[] args)
      Main method invoked to write SVG to standard output.
      java.lang.String toSvg​(Shader[] shaders)
      Returns an SVG representation of a legend labelling a given list of shaders.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShaderLegend

        public ShaderLegend​(int ncol)
        Constructor.
        Parameters:
        ncol - number of columns for output
    • Method Detail

      • toSvg

        public java.lang.String toSvg​(Shader[] shaders)
        Returns an SVG representation of a legend labelling a given list of shaders.
        Parameters:
        shaders - shader list
        Returns:
        SVG output
      • getAllShaders

        public static Shader[] getAllShaders()
        Returns all the shaders generally available from Plot2 graphics.
        Returns:
        somewhat ordered list of shaders
      • main

        public static void main​(java.lang.String[] args)
        Main method invoked to write SVG to standard output. Use -help flag for usage information.
        Parameters:
        args - flag array