java.lang.Object
simpa.acc.api.utils.GnuPloter
Minimal GnuPlot helper for quick visualization of field-at-points files.
Produces a data file with X Y Z Fx Fy Fz and a small gnuplot script to render
either a 2D plot of magnitude or a 3D splot of magnitude.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlaunchGnuplotScript(String scriptContent) Launch a gnuplot script with the specified content and element name.static StringplotFieldAtPoints(String elementName, boolean launch) Original method kept for compatibility: color-coded magnitude display by default.static StringplotFieldAtPoints(String elementName, boolean launch, boolean vectorField) static StringplotFieldAtPoints(String elementName, boolean launch, boolean vectorField, double scalingFactor) Plot the field at points.
-
Field Details
-
CHECK_FIELD_COMMANDS
- See Also:
-
OPTICS_COMMANDS
- See Also:
-
-
Method Details
-
launchGnuplotScript
Launch a gnuplot script with the specified content and element name.- Parameters:
scriptContent- The content of the gnuplot script.- Throws:
IOException
-
plotFieldAtPoints
Original method kept for compatibility: color-coded magnitude display by default.- Throws:
IOException
-
plotFieldAtPoints
public static String plotFieldAtPoints(String elementName, boolean launch, boolean vectorField) throws IOException - Throws:
IOException
-
plotFieldAtPoints
public static String plotFieldAtPoints(String elementName, boolean launch, boolean vectorField, double scalingFactor) throws IOException Plot the field at points. If vectorField is false, displays a color-coded magnitude scatter. If vectorField is true, displays arrows (vectors) using the Fx,Fy,Fz components. The scalingFactor parameter only affects the vector display. The method returns the path to the generated gnuplot script.- Throws:
IOException
-