mxPLOT-MATPLOTLIB(1)

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

πŸ’– mxPLOT-MATPLOTLIB πŸ’–

okay bestie, welcome to mxplot-matplotlib, a.k.a. the part of mxPLOT that makes your simulation results look pretty. it's a manual page, it's in section 1, and it's literally about to become your new fave. πŸ¦‹


✨ SYNOPSIS ✨

mxplot-matplotlib [-h] [-t] [--html] [--format FORMAT] [--output OUTPUT]
[--log] [--backend BACKEND] [simulation ...]

like... look at her. so many flags. so much power. πŸ’…


🌸 DESCRIPTION 🌸

so the front-end mxplot-matplotlib is a program that produces plots of all the monitors in a simulation, and that's why it's genuinely so useful β€” it gives you a quick overview of your simulation results without you having to dig around. main character energy, fr fr. πŸ‘‘

in the simplest case you just type mxplot-matplotlib and that's it. no cap. it will plot any simulation data stored in the current directory β€” which is exactly where simulations store their results by default. so convenient it's giving ✨destiny✨.

but bestie, if the --dir or --file options have been used, then you gotta pass the name of the file or directory to mxplot-matplotlib, like this:

mxplot-matplotlib dir
mxplot-matplotlib file

and it is also possible to plot one single text (not binary!!) data file from a given monitor β€” just pass its name to mxplot-matplotlib and boom, plot. 🌈

and if you're ever lost, the -h option will list valid options. she's helpful like that. 🫢

also important: this is the Matplotlib plotting tool. that's the whole vibe of this page. πŸ’œ

πŸŽ€ OPTIONS πŸŽ€

  • simulation β€” the file or directory to plot. that's the thing you're pointing her at. πŸ“
  • -h, --help β€” show this help message and exit. your lil safety net. πŸ™ˆ
  • -t, --test β€” mxcode data loader test run. yes bestie, a test run. πŸ§ͺ
  • --html β€” save plot to html using mpld3 (linux only) ⚠️ heads up, it's linux-only, no cap.
  • --format FORMAT β€” save plot to pdf/png/eps/svg... without bringing up window. silent, sneaky, iconic. 🀫
  • --output OUTPUT β€” save plot to given file without bringing up window. and listen: the extension (e.g. pdf/png/eps/svg) can be specified in the file name or via --format. your choice, you flexible queen. πŸ’…
  • --log β€” initiate plot(s) with log of signal. logarithmic vibes only. πŸ“ˆ
  • --backend BACKEND β€” use non-default backend for matplotlib plot. for when the default just isn't serving. ✨

πŸ¦‹ FILES πŸ¦‹

these are the paths she cares about, bestie, write them down:

  • /usr/share/mcxtrace/resources
  • /usr/share/mcxtrace/tools/Python/mccodelib/mccode_config.json
  • ~/.mcxtrace/mccode_config.json
  • http://www.mcxtrace.org

🌈 EXAMPLES 🌈

okay so the glow-up demo: run and plot the Test_SX example (Single crystal diffraction) πŸ“

  1. mxrun Test_SX.instr -d output_dir -n 1e7 TTH=13.4
  2. mxplot-matplotlib output_dir

first you run it, then you plot it. that's the whole storyline and honestly? ate. πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

mcxtrace Team (mcxtrace.org)


πŸ’œ SEE ALSO πŸ’œ

mcxtrace(1), mxdoc(1), mxplot(1), mxrun(1), mxgui(1), mxdisplay(1)

go read those too, bestie, iykyk. 🧚


πŸ’… AUTHORS (again, yes really) πŸ’…

MCXTRACE xray Ray Tracing Team.


and that's the whole page, babes!! this one came from the git version of the docs β€” so if you're reading it, you're on the fresh build, slay. thanks for sticking around till the end, you're literally the bestie of all time. mwah. πŸ˜­πŸ’–πŸŽ€

πŸ“¦ where this page comes from