Package edu.sc.seis.TauP
Class SvgUtil
java.lang.Object
edu.sc.seis.TauP.SvgUtil
Utility methods for SVG xy plots.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringclassForPhase(String phase) CSS class name for a phase.static StringBufferstatic voidcreateLegend(PrintWriter out, List<String> labels, List<String> labelClasses, String outerGcss, float xtrans, float ytrans) static StringBuffercreateNoneColorCSS(ColoringArgs coloringArgs) static StringBuffercreatePhaseColorCSS(List<PhaseName> phaseNames, ColoringArgs coloringArgs) static voidcreatePhaseLegend(PrintWriter out, List<SeismicPhase> phaseList, String outerGcss, float xtrans, float ytrans) static StringBufferstatic StringBuffercreateSurfaceWaveCSS(List<PhaseName> phaseNames) static StringBuffercreateTimeStepColorCSS(float timestep, float maxTime, ColoringArgs coloringArgs) static voidcreateTimeStepLegend(PrintWriter out, double timeStep, double maxTime, String outerGcss, float xtrans, float ytrans) static StringBuffercreateWaveTypeColorCSS(ColoringArgs coloringArgs) static voidcreateWavetypeLegend(PrintWriter out, boolean withBoth, float xtrans, float ytrans) static voidcreateXYAxes(PrintWriter out, double minX, double maxX, int numXTicks, boolean xEndFixed, double minY, double maxY, int numYTicks, boolean yEndFixed, float pixelWidth, float margin, String title, String xLabel, String yLabel) static voidendAutocolorG(PrintWriter writer) static StringescapeclassForCSS(String cssClassname) CSS class name for a cssClassname, with special character escaping.static StringformatTimeForCss(double timeVal) static StringBufferstatic StringBufferresizeLabels(int fontSize) static voidstartAutocolorG(PrintWriter writer) static voidtaupMetadata(PrintWriter out, String cmd, List<String> args, double[] minmax) static voidtaupMetadataGMT(PrintWriter out, String cmd, List<String> args, double[] minmax) static voidxyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList) static voidxyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, CharSequence extraCSS, double[] minmax) static voidxyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, CharSequence extraCSS, double[] minmax, CharSequence extraDefs) static voidxyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, String extraCSS)
-
Constructor Details
-
SvgUtil
public SvgUtil()
-
-
Method Details
-
xyplotScriptBeginning
-
xyplotScriptBeginning
-
xyplotScriptBeginning
public static void xyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, CharSequence extraCSS, double[] minmax) -
xyplotScriptBeginning
public static void xyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, CharSequence extraCSS, double[] minmax, CharSequence extraDefs) -
taupMetadata
-
taupMetadataGMT
-
createXYAxes
public static void createXYAxes(PrintWriter out, double minX, double maxX, int numXTicks, boolean xEndFixed, double minY, double maxY, int numYTicks, boolean yEndFixed, float pixelWidth, float margin, String title, String xLabel, String yLabel) -
createLegend
-
createPhaseLegend
public static void createPhaseLegend(PrintWriter out, List<SeismicPhase> phaseList, String outerGcss, float xtrans, float ytrans) -
createTimeStepLegend
public static void createTimeStepLegend(PrintWriter out, double timeStep, double maxTime, String outerGcss, float xtrans, float ytrans) -
createWavetypeLegend
public static void createWavetypeLegend(PrintWriter out, boolean withBoth, float xtrans, float ytrans) -
createCSSColors
-
createReflTransCSSColors
-
loadStandardCSS
-
createSurfaceWaveCSS
-
classForPhase
CSS class name for a phase.- Parameters:
phase- the phase- Returns:
- input phase prefixed with phase_
-
escapeclassForCSS
CSS class name for a cssClassname, with special character escaping. See CSS character escape sequences for details. Note this should be used in the CSS, not in the class attribute, where escaping is not used.- Parameters:
cssClassname- the cssClassname- Returns:
- input cssClassname prefixed with phase_ and escaped
-
createPhaseColorCSS
public static StringBuffer createPhaseColorCSS(List<PhaseName> phaseNames, ColoringArgs coloringArgs) -
createNoneColorCSS
-
formatTimeForCss
-
createTimeStepColorCSS
public static StringBuffer createTimeStepColorCSS(float timestep, float maxTime, ColoringArgs coloringArgs) -
startAutocolorG
-
endAutocolorG
-
resizeLabels
-
createWaveTypeColorCSS
-