mcPLOT-MATPLOTLIB(1)

πŸ“¦
version 3.5+3.5.19 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute

✨ 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 using mpld3 (linux only, so don't come for me on other platforms 😭)
  • --format FORMAT β€” saves the plot to pdf/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 --format instead. 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.json
  • http://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.4
  • mcplot-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