PGPLOTOptions(3pm)

✨ PGPLOTOptions(3pm) β€” setting your PGPLOT options, bestie ✨

okay so this is the manual page for PDL::Graphics::PGPLOTOptions, a lil' slice of User Contributed Perl Documentation that is genuinely so useful once you get it. buckle up πŸŽ€


🌸 NAME 🌸

PDL::Graphics::PGPLOTOptions β€” setting PGPLOT options πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use PGPLOTOptions qw('default_options');

πŸ’– DESCRIPTION πŸ’–

So this package has one function in it right now (yes, just the one, she's lowkey an only child) and what she does is hand you back PDL::Option objects for the default settings of plot windows and plot commands. ✨

The vibe is that this should eventually be complemented by other functions that could affect it β€” things like file reading commands and whatever else β€” but for now it's just her doing her thing. no cap.


πŸ‘‘ OPTIONS πŸ‘‘

Here's the full rundown of every option that gets set in this file, what each one actually does, and what its default value is. we're going through all of them, no skipping, periodt.

🌈 Window specific options 🌈

These options change how your windows look, and they can also change the default settings for making plot axes and stuff. it's giving very main character.

  • Device β€” the default PGPLOT device to use. The default value is set to the PGPLOT_DEV environment variable if that's set, otherwise it's '?'. 🫢
  • AxisColour β€” the colour you draw axes with. Default value = 3 (Green) πŸ’š
  • HardLW, HardCH, HardFont, HardAxisColour, HardColour β€” the linewidth, character height, font and axis colour to use on hardcopy devices. The defaults are HardLW=1, HardCH=1.4, HardFont=2 (Roman), HardAxisColour=1 (Black), and HardColour=1 as well. That last one is the default plot colour to use on hardcopy devices. πŸ–¨οΈβœ¨
  • Axis β€” the axis style to use. Peep the PDL::Graphics::PGPLOT::Window documentation for the details. It defaults to 'Normal', which is a labelled box. The valid arguments are 'Empty', 'Box', 'Normal', 'Axes', 'Grid', 'LogX', 'LogY', 'LogXY'. πŸ“¦
  • AspectRatio β€” the aspect ratio of the output device. The default value is device dependent (so like, it depends on your device, bestie, she's not gonna guess).
  • WindowWidth β€” the width of the output window, in inches. Defaults to as big as possible. 🫧
  • WindowXSize and WindowYSize β€” these are alternatives to AspectRatio and WindowWidth.
  • WindowName β€” the name of the window. You can retrieve it later using name(). It defaults to 'Window' + Window ID.
  • NXPanel β€” the number of panels in the X-direction. Defaults to 1.
  • NYPanel β€” the number of panels in the Y-direction. Defaults to 1.
  • Justify β€” a boolean value which, if true, causes both axes to be drawn to the same scale. See the PGPLOT pgenv() command for more info. βš–οΈ
  • TightLabels β€” boolean value which, if true, causes axis labels to be pulled slightly closer to the main viewport than usual. That's handy for making multi-panel plots. Undef (the default) is equivalent to 0 for panels with NYPanels <= 1 and 1 for panels with NYPanels > 1. 🧚
  • TitleSize β€” the relative size of a plot or image title, compared to other annotations. Defaults to 1.0 (original behavior) but you can set it to, like, 1.5 to emphasize graph titles in a multipanel plot. πŸ’…
  • Border β€” adjust the spacing around the plot. See the documentation in PDL::Graphics::PGPLOT::Window for details.
  • CharSize β€” the default charsize for the plot, used when annotating the axes for instance. It defaults to 1.
  • PlotPosition β€” the position of the plot in normalised coordinates.
  • Erase β€” explicitly erase the plotting surface. This is normally required when making new plots with PlotPosition. 🧽

πŸ“ Plot specific options πŸ“

For the moment, see the "PDL::Graphics::PGPLOT::Window" documentation for these. (yes, that's the whole section, she's short and she knows it 😭)


πŸ’œ set_pgplot_options πŸ’œ

This function lets you set the default PGPLOT options. It's especially useful in the .perldlrc file, since you can do:

use PDL::Graphics::PGPLOTOptions ('set_pgplot_options');
set_pgplot_options('Device' => '/xs', 'HardLW' => 3);

like, for instance, to set the default values. πŸ”₯

The main drawback is that the routine is rather unflexible β€” no synonyms, no case-insensitivity. she's a little rigid, we still love her. πŸ™ˆ

okay bestie that's the whole page!! every last option accounted for, we ate and left no crumbs πŸ‘‘

this was the PGPLOTOptions page from perl v5.38.2, dated 2024-04-10 β€” tysm for reading, go make some gorgeous plots, mwah πŸ’–

πŸ“¦ where this page comes from