STILTS-PLOT2SPHERE(1)

🌸 NAME 🌸

hiii bestie, welcome to STILTS-PLOT2SPHERE(1) πŸ’– this is the page for the stilts-plot2sphere command and yes she is serving looks

stilts-plot2sphere β€” Draws a sphere plot πŸŽ€βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the whole invocation, verbatim, no cap:

stilts plot2sphere [xpix=<int-value>] [ypix=<int-value>]
                   [insets=<top>,<left>,<bottom>,<right>]
                   [omode=swing|out|cgi|discard|auto]
                   [storage=simple|memory|disk|policy|cache|basic-
                   cache|persistent|parallel] [seq=<suffix>[,...]]
                   [legend=true|false|null] [legborder=true|false]
                   [legopaque=true|false] [legseq=<suffix>[,...]]
                   [legpos=<xfrac,yfrac>] [title=<value>] [auxmap=<map-
                   name>|<color>-<color>[-<color>...]]
                   [auxclip=<lo>,<hi>] [auxflip=true|false]
                   [auxquant=<number>]
                   [auxfunc=log|linear|histogram|...] [auxmin=<number>]
                   [auxmax=<number>] [auxlabel=<text>]
                   [auxcrowd=<factor>] [auxwidth=<pixels>]
                   [auxvisible=true|false|null] [forcebitmap=true|false]
                   [compositor=0..1] [animate=<table>] [afmt=<in-
                   format>] [astream=true|false] [acmd=<cmds>]
                   [parallel=<int-value>] [crowd=<number>]
                   [labelangle=horizontal|angled|adaptive]
                   [frame=true|false] [minor=true|false]
                   [gridaa=true|false] [texttype=plain|antialias|latex]
                   [fontsize=<int-value>]
                   [fontstyle=standard|serif|mono]
                   [fontweight=plain|bold|italic|bold_italic]
                   [cx=<number>] [cy=<number>] [cz=<number>]
                   [scale=<number>] [phi=<degrees>] [theta=<degrees>]
                   [psi=<degrees>] [zoom=<factor>] [xoff=<pixels>]
                   [yoff=<pixels>] [zoomfactor=<number>]
                   [leglabelN=<text>] [layerN=<layer-type> <layerN-
                   specific-params>]

πŸ’… DESCRIPTION πŸ’…

so plot2sphere draws plots in an isotropic 3-dimensional space using spherical polar coordinates. the plotting volume is a cube, okay? and we view it from the outside, and it's usually bounded by a wire frame that's annotated by Cartesian coordinates. plot twist though: this viewing cube is not necessarily centered on the coordinate origin. periodt. πŸ‘‘

this plotting geometry is giving major plot2cube energy, BUT β€” and this is the important part β€” the coordinate unit size is always the same in the three dimensions, and the coordinates get specified differently. πŸ™ˆ

positional coordinates are specified as lon, lat, r triples, like literally:

plot2sphere layer1=mark in1=survey.fits lon1=RA lat1=DEC r1=REDSHIFT

content gets added to the plot by specifying one or more plot layers using the layerN parameter. the N part is a suffix that gets applied to all the parameters affecting a given layer, and bestie, any suffix may be used β€” including the empty string ✨

the layers available for this plot type are: mark, size, sizexy, link2, mark2, poly4, mark4, polygon, area, central, label, arealabel, line3d, contour, spheregrid. that's the whole roster, collect them all πŸ’–


✨ OPTIONS ✨

  • xpix=<int-value> β€” size of the output image in the X direction, in pixels. this includes space for any axis labels, padding, and other decoration sitting outside the plot area itself. see also insets. πŸ’«
  • ypix=<int-value> β€” size of the output image in the Y direction, in pixels. same deal: this includes space for axis labels, padding and other decoration outside the plot area itself. see also insets. πŸ’«
  • insets=<top>,<left>,<bottom>,<right> β€” defines how much space in pixels sits around the actual plotting area. that space is where axis labels and other decorations live, and whatever's left over just becomes an empty border. πŸ–ΌοΈ

the size and position of the actual plotting area is determined by this parameter along with xpix and ypix.

the value of this parameter is 4 comma separated integers: <top>,<left>,<bottom>,<right>. any or all of these values may be left blank, and if they are, that corresponding margin gets calculated automatically according to how much space is required. no manual labour needed πŸ’…

  • omode=swing|out|cgi|discard|auto β€” determines how the drawn plot will be output, see SUN/256. the choices are:
    • swing: the plot will be displayed in a window on the screen. this plot is "live" β€” it can be resized and (except for old-style plots) navigated around with mouse actions in the same way as plots in TOPCAT. main character energy fr πŸ–±οΈ
    • out: the plot will be written to a file given by out using the graphics format given by ofmt.
    • cgi: the plot will be written in a way suitable for CGI use direct from a web server. the output is in the graphics format given by ofmt, preceded by a suitable "Content-type" declaration.
    • discard: the plot is drawn, but discarded. there is no output. 😭 she did all that work for nothing
    • auto: behaves as swing or out mode depending on presence of the out parameter.
  • storage=simple|memory|disk|policy|cache|basic-cache|persistent|parallel β€” determines the way that data is accessed when constructing the plot. there are two main options here: cached or not. πŸ”₯

if no caching is used, then rows are read sequentially from the specified input table(s) every time they are required. this generally requires a small resource footprint (though that can depend on how the table is specified) and it makes sense if the data only needs to be scanned once, or maybe if the table is very large. if caching is used, then the required data is read once from the specified input table(s), then prepared and cached before any plotting is performed, and plots are done using this cached data. this may use a significant amount of storage for large tables, but it's usually more sensible (faster) if the data will need to be scanned multiple times. there are various options for cache storage, bestie. πŸ’Ύ

the options are:

  • simple: no caching, data read directly from input table
  • memory: cached to memory; OutOfMemoryError possible for very large plots πŸ’€
  • disk: cached to disk
  • policy: cached using application-wide default storage policy, which is usually adaptive (memory/disk hybrid)
  • persistent: cached to persistent files on disk, in the system temporary directory (defined by system property java.io.tmpdir). if this is used, plot data will be stored on disk in a way that means they can be re-used between STILTS invocations, so data preparation can be avoided on subsequent runs. note however it can leave potentially large files in your temporary directory. 🫣
  • cache: synonym for memory (backward compatibility)
  • basic-cache: dumber version of memory (no optimisation for constant-valued columns) πŸ™ˆ
  • parallel: experimental version of memory-based cache that reads into the cache in parallel for large files. this will make the plot faster to prepare, but interaction is a bit slower and sequence-dependent attributes of the plot may not come out right. this experimental option may be withdrawn or modified in future releases. ⚠️

the default value is memory if a live plot is being generated (omode=swing), since in that case the plot needs to be redrawn every time the user performs plot navigation actions or resizes the window, or if animations are being produced. otherwise (e.g. output to a graphics file) the default is simple.

  • seq=<suffix>[,...] β€” contains a comma-separated list of layer suffixes to determine the order in which layers are drawn on the plot. this can affect which symbols are plotted on top of, and so potentially obscure, which other ones. πŸ‘€

when specifying a plot, multiple layers may be specified, each introduced by a parameter layer<N>, where <N> is a different (arbitrary) suffix labelling the layer, and is appended to all the parameters specific to defining that layer.

by default the layers are drawn on the plot in the order in which the layer* parameters appear on the command line. however if this parameter is specified, each comma-separated element is interpreted as a layer suffix, giving the ordered list of layers to plot. every element of the list must be a suffix with a corresponding layer parameter, but missing or repeated elements are allowed. πŸ’…

  • legend=true|false|null β€” whether to draw a legend or not. if no value is supplied, the decision is made automatically: a legend is drawn only if it would have more than one entry. ✨
  • legborder=true|false β€” if true, a line border is drawn around the legend. πŸŽ€
  • legopaque=true|false β€” if true, the background of the legend is opaque, and the legend obscures any plot components behind it. otherwise, it's transparent. 🫧
  • legseq=<suffix>[,...] β€” determines which layers are represented in the legend (if present) and in which order they appear. the legend has a line for each layer label (as determined by the leglabelN parameter). if multiple layers have the same label, they will contribute to the same entry in the legend, with style icons plotted over each other. the value of this parameter is a comma-separated sequence of layer suffixes, which determines the order in which the legend entries appear. layers with suffixes missing from this list do not show up in the legend at all. 🚫

if no value is supplied (the default), the sequence is the same as the layer plotting sequence (see seq).

  • legpos=<xfrac,yfrac> β€” determines the internal position of the legend on the plot. the value is a comma-separated pair of values giving the X and Y positions of the legend within the plotting bounds, so for instance "0.5,0.5" will put the legend right in the middle of the plot. if no value is supplied, the legend will appear outside the plot boundary. πŸ“
  • title=<value> β€” text of a title to be displayed at the top of the plot. if null, the default, no title is shown and there's more space for the graphics. πŸ’–
  • auxmap=<map-name>|<color>-<color>[-<color>...] β€” color map used for Aux axis shading. 🌈

Okay so the mixed bag of colour ramps SUN/256 hands you is genuinely iconic and also extremely long, so buckle up bestie, here's the whole roster πŸ’–:

inferno, magma, plasma, viridis, cividis, cubehelix, sron, rainbow, rainbow2, rainbow3, pastel, cosmic, ember, gothic, rainforest, voltage, bubblegum, gem, chroma, sunset, neon, tropical, accent, gnuplot, gnuplot2, specxby, set1, paired, hotcold, guppy, iceburn, redshift, pride, rdbu, piyg, brbg, cyan-magenta, red-blue, brg, heat, cold, light, greyscale, colour, standard, bugn, bupu, orrd, pubu, purd, painbow, huecl, infinity, hue, intensity, rgb_red, rgb_green, rgb_blue, hsv_h, hsv_s, hsv_v, yuv_y, yuv_u, yuv_v, scale_hsv_s, scale_hsv_v, scale_yuv_y, mask, blacker, whiter, transparency.

Heads up bestie: a lot of these β€” including the rainbow-ish ones 🌈 β€” are frowned upon by the visualisation community. Not my rules, I'm just the messenger πŸ™ˆ.

And you don't have to settle for the premade menu either, because you can build your own custom colour map by giving a sequence of colour names separated by minus sign ("-") characters. When you do that, the ramp is a linear interpolation between each pair of colours you named, using the same syntax as when specifying a colour value. So like, "yellow-hotpink-#0000ff" would shade from yellow via hot pink to blue. Ate. ✨

  • auxclip=<lo>,<hi> β€” Defines a subrange of the colour ramp to be used for Aux shading. The value you pass is a (low,high) comma-separated pair of two numbers between 0 and 1.

If you use the full range 0,1, then the whole range of colours specified by the selected shader gets used. But if you give something like 0,0.5 for instance, only those colours at the left hand end of the ramp will be seen. πŸ‘€

If the null (default) value is chosen, a default clip will be used. This generally covers most or all of the range 0-1, but for colour maps which fade to white, a small proportion of the lower end may be excluded, to ensure that all the colours are visually distinguishable from a white background. This default is usually a good idea if the colour map is being used with something like a scatter plot, where markers are plotted against a white background. However, for something like a density map when the whole plotting area is tiled with colours from the map, it may be better to supply the whole range 0,1 explicitly.

  • auxflip=true|false β€” If true, the colour map on the Aux axis will be reversed. flip it, reverse it πŸ’…
  • auxquant=<number> β€” Lets the colour map used for the Aux axis be quantised. If you choose an integer value N, then the colour map will be viewed as N discrete evenly-spaced levels, so that only N different colours will appear in the plot. This can be used to generate a contour-like effect, and may make it easier to trace the boundaries of regions of interest by eye. πŸ‘‘

If left blank, the colour map is nominally continuous (though in practice it may be quantised to a medium-sized number like 256). iykyk.

  • auxfunc=log|linear|histogram|... β€” Defines the way that values in the Aux range are mapped to the selected colour ramp.

The available options are:

  • log: Logarithmic scaling, positive values only
  • linear: Linear scaling
  • histogram: Scaling follows data distribution, with linear axis
  • histolog: Scaling follows data distribution, with logarithmic axis, positive values only
  • asinh: Asinh scaling, wide dynamic range for both positive and negative values
  • sqrt: Square root scaling
  • square: Square scaling
  • acos: Inverse cosine Scaling
  • cos: Cosine Scaling

For all these options, the full range of valid data values is used, and displayed on the colour bar if applicable. Note that logarithmic-based options Log and HistoLog will ignore non-positive values β€” so like, zero and negatives are just not invited to the party 🚫. The Linear, Log, Square and Sqrt options just apply the named function to the full data range. The histogram options on the other hand use a scaling function that corresponds to the actual distribution of the data, so that there are about the same number of points (or pixels, or whatever is being scaled) of each colour. The histogram options are somewhat more expensive, but can be a good choice if you are exploring data whose distribution is unknown or not well-behaved over its min-max range. The Histogram and HistoLog options both assign the colours in the same way, but they display the colour ramp with linear or logarithmic annotation respectively; the HistoLog option also ignores non-positive values.

  • auxmin=<number> β€” Minimum value of the data coordinate on the Aux axis. This sets the value before any subranging is applied. If not supplied, the value is determined from the plotted data.
  • auxmax=<number> β€” Maximum value of the data coordinate on the Aux axis. This sets the value before any subranging is applied. If not supplied, the value is determined from the plotted data.
  • auxlabel=<text> β€” Sets the label used to annotate the aux axis, if it is visible. 🏷️
  • auxcrowd=<factor> β€” Determines how closely the tick marks are spaced on the Aux axis, if visible. The default value is 1, meaning normal crowding. Larger values result in more ticks, and smaller values fewer ticks. Tick marks will not however be spaced so closely that the labels overlap each other, so to get very closely spaced marks you may need to reduce the font size as well. no cap.
  • auxwidth=<pixels> β€” Determines the lateral size of the aux colour ramp, if visible, in pixels.
  • auxvisible=true|false|null β€” Determines whether the aux axis colour ramp is displayed alongside the plot.

If not supplied (the default), the aux axis will be visible when aux shading is used in any of the plotted layers. ✨

  • forcebitmap=true|false β€” Affects whether rendering of the data contents of a plot (though not axis labels etc) is always done to an intermediate bitmap rather than, where possible, being painted using graphics primitives. This is a rather arcane setting that may nevertheless have noticeable effects on the appearance and size of an output graphics file, as well as plotting time. For some types of plot (e.g. shadingN=auto or shadingN=density) it will have no effect, since this kind of rendering happens in any case.
    • When writing to vector graphics formats (PDF and PostScript), setting it true will force the data contents to be bitmapped. This may make the output less beautiful (round markers will no longer be perfectly round 😭), but it may result in a much smaller file if there are very many data points.
    • When writing to bitmapped output formats (PNG, GIF, JPEG, ...), it fixes shapes to be the same as seen on the screen rather than be rendered at the mercy of the graphics system, which sometimes introduces small distortions.
  • compositor=0..1 β€” Defines how multiple overplotted partially transparent pixels are combined to form a resulting colour. The way this is used depends on the details of the specified plot.

Currently, this parameter takes a "boost" value in the range 0..1. If the value is zero, saturation semantics are used: RGB colours are added in proportion to their associated alpha value until the total alpha is saturated (reaches 1), after which additional pixels have no further effect. For larger boost values, the effect is similar, but any non-zero alpha in the output is boosted to the given minimum value. The effect of this is that even very slightly populated pixels can be visually distinguished from unpopulated ones, which may not be the case for saturation composition. vibe check passed βœ…

  • animate=<table> β€” If not null, this parameter causes the command to create a sequence of plots instead of just one. The parameter value is a table with one row for each frame to be produced. Columns in the table are interpreted as parameters which may take different values for each frame; the column name is the parameter name, and the value for a given frame is its value from that row. Animating like this is considerably more efficient than invoking the STILTS command in a loop. πŸ”₯

The location of the animation control table. This may take one of the following forms:

  • A filename.
  • A URL.
  • The special value "-", meaning standard input. In this case the input format must be given explicitly using the afmt parameter. Note that not all formats can be streamed in this way.
  • A scheme specification of the form :<scheme-name>:<scheme-args>.
  • A system command line with either a "<" character at the start, or a "|" character at the end ("<syscmd" or "syscmd|"). This executes the given pipeline and reads from its standard output. This will probably only work on unix-like systems.

In any case, compressed data in one of the supported compression formats (gzip, Unix compress or bzip2) will be decompressed transparently. 🫢

  • afmt=<in-format> β€” Specifies the format of the animation control table as specified by parameter animate. The known formats are listed in SUN/256. This flag can be used if you know what format your table is in. If it has the special value (auto) (the default), then an attempt will be made to detect the format of the table automatically. This cannot always be done correctly however, in which case the program will exit with an error explaining which formats were attempted. This parameter is ignored for scheme-specified tables. πŸ’€
  • astream=true|false β€” okay so if you set this to true, then the animation control table (the one you pointed at with the animate parameter) gets read as a stream 🌊. You have to hand over the afmt parameter when you do that, no skipping it bestie. Depending on what operations you're running and which processing mode you're in, this can make the read straight-up fail 😭 β€” sometimes the table genuinely needs to be read more than once, and streaming doesn't vibe with that. Normally you don't need to touch this flag at all; most of the time the data just streams automatically when that's the best move. But sometimes it means using fewer resources when you're chewing through big files in certain formats (like VOTable). Also β€” this whole parameter is ignored for scheme-specified tables, so don't bother πŸ’….
  • acmd=<cmds> β€” tells it what processing to do to the animation control table (the one from the animate parameter), and it happens before any other processing kicks in. The value here is one or more of the filter commands from SUN/256. Got more than one? Separate them with semicolons (;) β€” periodt. You can repeat this parameter multiple times on the same command line to build up a whole list of processing steps, and that sequence is literally the processing pipeline that gets run on the table ✨.

You can also smuggle the commands in from an external file with the indirection character '@'. So a value of "@filename" makes it read the file filename for a list of filter commands to run. Inside the file, commands can be separated by newline characters and/or semicolons, and any blank lines or lines starting with a '#' get ignored β€” no cap πŸŽ€. A backslash character '\' at the end of a line joins that line with the following one.

  • parallel=<int-value> β€” how many threads run side by side when animation output is being produced 🧡. Only gets used if you supplied the animate parameter, otherwise it's just sitting there. The default value is however many processors the JVM reckons are apparently available to it.
  • crowd=<number> β€” controls how tightly the tick marks are crammed onto the wire frame axes πŸ‘€. Default value is 1, which means normal crowding. Bigger values = more grid lines, smaller values = fewer grid lines.
  • labelangle=horizontal|angled|adaptive β€” controls which way the numeric labels on the axes are facing. By default the labels get written parallel to the axes as long as they fit, but if they get too crowded they can be angled so they don't overlap. This option is the lil' switch that picks between parallel and angled labelling πŸ¦‹.

Your choices are:

  • horizontal: axis labels are horizontal
  • angled: axis labels are angled
  • adaptive: axis labels are horizontal if possible, but get angled if that's what it takes to fit more in
  • frame=true|false β€” if true, a cube wire frame with labelled axes gets drawn to show the limits of the plotted 3D region πŸ“¦. If false, no wire frame and no axes, absolutely nothing, ghost town πŸ«₯.
  • minor=true|false β€” if true, minor tick marks get painted along the axes too, alongside the major tick marks. Minor tick marks do not come with grid lines, just so you know ✨.
  • gridaa=true|false β€” if true, grid lines get drawn with antialiasing. Antialiased lines look smoother but can take perceptibly longer to draw ⏳. Only actually does anything for bitmapped output formats.
  • texttype=plain|antialias|latex β€” decides how label text becomes actual characters on the plot. plain and antialias both take the text at face value, but antialias smooths the characters 🌸. latex treats the text as LaTeX source code and typesets it accordingly, fancy girl.

When you're not using LaTeX, antialiased text usually looks nicer but can be perceptibly slower to plot. And at time of writing, on MacOS antialiased text seems to be required to stop the writing coming out upside-down for non-horizontal text (MacOS java bug πŸ›) β€” so yeah, watch out for that.

  • fontsize=<int-value> β€” size of the text font, in points πŸ”€.
  • fontstyle=standard|serif|mono β€” the font style for text.

Your choices are:

  • standard
  • serif
  • mono
  • fontweight=plain|bold|italic|bold_italic β€” the font weight for text.

Your choices are:

  • plain
  • bold
  • italic
  • bold_italic
  • cx=<number> β€” gives the central coordinate in the X dimension 🎯. If you don't supply it, it gets determined from the data range.
  • cy=<number> β€” gives the central coordinate in the Y dimension. Not supplied? Determined from the data range.
  • cz=<number> β€” gives the central coordinate in the Z dimension. Same deal β€” comes from the data range if you don't say otherwise.
  • scale=<number> β€” the length of the cube's sides, in data coordinates πŸ“. Determined from the data range if not supplied.
  • phi=<degrees> β€” first of the Euler angles, in the ZXZ sequence, defining the rotation of the plotted 3D space πŸŒ€. Units are degrees. This is the rotation around the initial Z axis, applied before the plot is viewed.
  • theta=<degrees> β€” second of the Euler angles, in the ZXZ sequence, defining the rotation of the plotted 3D space. Units are degrees. This one is the rotation towards the viewer πŸ‘€.
  • psi=<degrees> β€” second of the Euler angles, in the ZXZ sequence, defining the rotation of the plotted 3D space. Units are degrees.
  • zoom=<factor> β€” sets the magnification factor for viewing the plotted 3D region itself, without touching its contents πŸ”. Default value is 1, meaning the cube fits into the plotting space no matter how it's rotated. Crank the zoom much higher and parts of the plotting region and the axes get drawn outside the plotting region β€” which means invisible, gone, bye πŸ‘».
  • xoff=<pixels> β€” shifts the whole plot within the plotting region by the given number of pixels, horizontally ➑️.
  • yoff=<pixels> β€” shifts the whole plot within the plotting region by the given number of pixels, vertically ⬇️.
  • zoomfactor=<number> β€” sets how much the plot view zooms in or out for each unit of mouse wheel movement πŸ–±οΈ. A value of 1 means mouse wheel zooming does literally nothing. Higher value = the wheel zooms faster, a value nearer 1 = it zooms slower. Values below 1 are not permitted 🚫.
  • leglabelN=<text> β€” sets the presentation label for the layer with the given suffix 🏷️. This is the text displayed in the legend, if there is one. Multiple layers can share the same label, and when they do, they get combined into a single legend entry.

If no value is supplied (that's the default), the suffix itself is used as the label. Simple as that πŸ’….

  • layerN=<layer-type> <layerN-specific-params> β€” picks one of the available plot types for layerN πŸ‘‘. A plot is made of a plotting surface β€” set up with the various unsuffixed parameters of the plotting command β€” plus zero or more plot layers. Each layer gets introduced by a parameter named layer<N>, where that suffix <N> is a label identifying the layer and it gets appended to all the parameter names that configure that layer. Suffixes can be any string, including the empty string ✨.

This parameter can take one of these values, described in more detail in SUN/256:

  • mark
  • size
  • sizexy
  • link2
  • mark2
  • poly4
  • mark4
  • polygon
  • area
  • central
  • label
  • arealabel
  • line3d
  • contour
  • spheregrid

Every one of these layer types brings its own list of type-specific parameters to define the details of that layer, including some or all of these groups:

  • input table parameters (e.g. inN, icmdN)
  • coordinate params referring to input table columns (e.g. xN, yN)
  • layer style parameters (e.g. shadingN, colorN)

Every parameter notionally carries the same suffix N. But β€” and this is the serve β€” if the suffix isn't there, the application tries looking for a parameter with the same name and no suffix instead πŸ”Ž. So if several layers share the same value for a given parameter (input table, for instance), you can just supply it once with an unsuffixed parameter, instead of typing out the same value over and over with different suffixes. Work smarter bestie πŸ’–.


πŸ”— SEE ALSO πŸ”—

If the package stilts-doc is installed, the full documentation SUN/256 is available in HTML format: file:///usr/share/doc/stilts/sun256/index.html


🏷️ VERSION 🏷️

STILTS version 3.5.4-debian

This is the Debian version of Stilts, which lack the support of some file formats and network protocols. For differences see file:///usr/share/doc/stilts/README.Debian


πŸ‘‘ AUTHOR πŸ‘‘

Mark Taylor (Bristol University)


And that's a wrap on STILTS-PLOT2SPHERE(1) β€” this is the Debian build of STILTS 3.5.4-debian, dated Mar 2017, served to you fresh from the man pages πŸ’… Go make something gorgeous in 3D, bestie πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from