1 hour ago · Tech · hide · 0 comments

Yesterday’s post included this plot: I figured it was worth a quick post to show how I made it. I had already done most of the work back in 2022 in a Mathematica notebook I made to support my original orbital curvature post. So I copied the pertinent calculations from that notebook, pasted them into a new one, and made the adjustments necessary to produce the plot. Here’s the new notebook: The bottom half of the notebook is where the plotting commands are. The key items are: The definitions of xGrid, xTicks, yGrid, and yTicks. These produce lists of values used to lay out the grid spacing and tick mark labels. Most of this is self-explanatory, but I do want to call out the use of NumberForm to format the tick labels with two decimal places. NumberForm[x, {3, 2}] is very much like Python’s {x:3.2f} in an f-string. Like most things in Mathematica, it’s kind of verbose, but it is readable. The call to ParametricPlot includes the option AspectRatio -> .25/.05 AspectRatio sets the ratio of…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.