JSB to PNG: Difference between revisions

Jump to navigation Jump to search
1,526 bytes added ,  27 February 2020
Added instructions for use
(Added instructions for use)
Line 8: Line 8:
[[File:JSB-lines.png|thumb|A lines plot of a 2D table]]
[[File:JSB-lines.png|thumb|A lines plot of a 2D table]]
[[File:JSB-line.png|thumb|A lineplot of a 1D table]]
[[File:JSB-line.png|thumb|A lineplot of a 1D table]]
==Instructions==
Requires python with plotly.express and plotly.graph_objects libraries (recent version).<br />
When run, a folder will be created in working folder named same as the jsb input filename, but without the xml extension.<br />
In that folder PNG of the tables will be output, it '''will''' overwrite images if the folder is not empty.<br />
Each table in the JSB input file that you want to graph '''must''' have name attribute in the <table> tag. That name will also be used a Y-axis title in the graphs. Do not have multiple tables with same name since its used in naming the image files also.<br />
For 2D and 3D tables <independentVar> tags '''must''' all have lookup attributes.<br />
Example:
<syntaxhighlight lang="xml">
                <table name="Groundeffect normal force">
                    <independentVar lookup="row">aero/h_b-mac-ft</independentVar>
                    <independentVar lookup="column">aero/alpha-deg</independentVar>
                    <tableData>
                              0.0    5.0    15.0    90.0
                        0.0  0.0000  0.2000  0.6500  -0.2500
                        2.2  0.0000  0.0000  0.0000  0.0000
                    </tableData>
                </table>
</syntaxhighlight>
For 2D and 3D tables it will graph both a lines and a carpet plot.<br />
'''Commandline:''' python jsb-to-png.py [filename]<br />
If no filename is specified as commandline argument then "jsb-test.xml" is assumed.


==See also==
==See also==
[https://github.com/alanjt/Jiff Jiff]
[https://github.com/alanjt/Jiff Jiff (C++ program that does approx the same thing]


==External links==
==External links==
574

edits

Navigation menu