mcPLOT-MATPLOTLIB(1)
β¨ mcPLOT-MATPLOTLIB β¨ β the manual page, bestie edition π
okay so this is the manual page for mcplot-matplotlib, from section 1 of the manual (that's the "user commands" section, iykyk). it plots your mcstas simulation results with Matplotlib. let's get into it π«Ά
πΈ NAME πΈ
mcplot-matplotlib β plotting the results of a mcstas simulation using Matplotlib π
π¦ SYNOPSIS π¦
mcplot-matplotlib [-h] [-t] [--html] [--format FORMAT] [--output OUTPUT]
[--log] [--backend BACKEND] [simulation ...]
π DESCRIPTION π
so the front-end mcplot-matplotlib is a program that makes plots of all the monitors in a simulation, which means it's literally the fastest way to get a quick overview of your simulation results. main character energy fr fr π
easiest possible case? you just type mcplot-matplotlib and that's it. no arguments, no drama. it will plot any simulation data sitting in the current directory, which β fun fact β is exactly where simulations store their results by default. the defaults are defaulting, periodt.
but if you used the --dir or --file options, then you gotta pass the name of that file or directory to mcplot-matplotlib, like:
mcplot-matplotlib dir
or
mcplot-matplotlib file
you can also plot one single text (not binary!) data file from a given monitor β just hand its name over to mcplot-matplotlib. and if you want the full list of valid options, the -h option will give it to you. no gatekeeping π
heads up bestie: that data file has to be text, not binary. don't try it with the binary one, it's not giving what you want it to give π
also, real talk: this is the Matplotlib plotting tool. that's the whole vibe.
β¨ OPTIONS β¨
simulationβ the file or directory you want to plot π-h,--helpβ shows you this help message and then dips (exits) π-t,--testβ mccode data loader test run π§ͺ--htmlβ saves the plot to html usingmpld3(linux only, so don't come for me on other platforms π)--format FORMATβ saves the plot topdf/png/eps/svg... without bringing up a window. it's giving silent but deadly (in a good way) π--output OUTPUTβ saves the plot to the given file, again without bringing up a window. you can put the extension (pdf/png/eps/svg, etc.) right in the file name, or you can specify it with--formatinstead. your call, queen π--logβ kicks off the plot(s) with the log of signal π--backend BACKENDβ uses a non-default backend for the matplotlib plot π§
π FILES π
/usr/share/mcstas/resources/usr/share/mcstas/tools/Python/mccodelib/mccode_config.json~/.mcstas/mccode_config.jsonhttp://www.mcstas.org
these are the spots it looks at, plus the mcstas website for good measure π
π₯ EXAMPLES π₯
Run and plot the Test_SX example (Single crystal diffraction) β iconic, honestly:
mcrun Test_SX.instr -d output_dir -n 1e7 TTH=13.4mcplot-matplotlib output_dir
like, run it, then plot it. two steps, zero stress β¨
π AUTHORS π
mcstas Team (mcstas.org) π«Ά
π SEE ALSO π
mcstas(1), mcdoc(1), mcplot(1), mcrun(1), mcgui(1), mcdisplay(1)
the whole friend group, all linked up π§
π AUTHORS (again, yes really) π
MCSTAS neutron Ray Tracing Team. they said it twice because they ate and they know it π
okay that's the whole page bestie!! this version is from the git source, and it's the mcPLOT-MATPLOTLIB(1) page. go plot something gorgeous πΈβ¨π¦
π¦ where this page comes from
- debian trixie: mcstas-mcplot-matplotlib 3.5+3.5.19+ds5-2 Β· GPL-3.0-only
- ubuntu questing: mcstas-mcplot-matplotlib 3.5+3.5.19+ds5-2
- ubuntu resolute: mcstas-mcplot-matplotlib 3.5+3.5.19+ds5-2build1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms