ASYMPTOTE FREQUENTLY ASKED QUESTIONS 22 Mar 2017 This is the list of Frequently Asked Questions about Asymptote (asy). Index
· Section 1 About Asymptote · Section 2 Questions about installation and setup · Section 3 Questions about paths · Section 4 Questions about labels · Section 5 Questions about arrows · Section 6 Questions about 2D graphs · Section 7 Questions about programming · Section 8 Questions about differences between Asymptote and MetaPost · Section 9 Questions about output Section 1, About Asymptote · Question 1.1 What is Asymptote? · Question 1.2 How do I obtain Asymptote? · Question 1.3 Where can I ask questions about Asymptote? · Question 1.4 Why was the name Asymptote chosen? · Question 1.5 In the internal Asymptote source code, what does the name camp refer to? Section 2, Questions about installation and setup · Question 2.1 Is it possible to install Asymptote on Mac OS X? · Question 2.2 Why do I get the error Bad CPU type in executable on installing Asymptote from the MAC OS binary? · Question 2.3 What do I do if I get the error: Error: pdfetex (file pdftex.cfg): cannot open config file...texinfo.tex appears to be broken? · Question 2.4 What do I do if I get the error: ! Undefined control sequence. l.6 @copying? · Question 2.5 Is it possible to integrate Asymptote into LaTeX? · Question 2.6 Is it possible to integrate Asymptote into latex or pdflatex? · Question 2.7 Do I need the tkinter package to install an Asymptote rpm binary? · Question 2.8 What does the path %USERPROFILE%\.asy\config.asy mean? · Question 2.9 Why do I get the error "string not terminated" when I try to set settings.dir="C:\asymptote\";? · Question 2.10 How do I change environment variables in Microsoft Windows, for example, in order to change the default PostScript viewer? · Question 2.11 Under Microsoft Windows XP, why do I get an error like "Invalid Parameter - 432x432"? · Question 2.12 Why does Asymptote freeze upon trying to draw a label with my MikTex installation under Microsoft Windows? Section 3, Questions about paths · Question 3.1 Why do I get a syntax error message when I specify an integer value for the path tension? · Question 3.2 Shouldn't dots always be the same size? Section 4, Questions about labels · Question 4.1 How do I get Greek letters like omega to show up in my labels? · Question 4.2 Can Asymptote use matrices as labels? · Question 4.3 How do I tell Asymptote to load a particular LaTeX package, like mathptmx? · Question 4.4 How can I use international fonts in Asymptote labels? · Question 4.5 How can I use Fourier fonts? · Question 4.6 Is there any way to change the default appearance of the decimal separator, using a comma instead of a dot? · Question 4.7 How can I get a rotated label with the filled box rotated as well so that it fits the text? · Question 4.8 How can I rotate labels in a 3D figure? · Question 4.9 How can I draw some squares and circles of a fixed size and put a label in the middle of them? · Question 4.10 The binary operator * can be used to scale the color of a pen by a real number. Does this scaling factor have to be less than 1? · Question 4.11 Why is the space after the comma decimal separator in my locale so large? · Question 4.12 How can I prevent texpreamble("\usepackage[pdftex]{hyperref}") from changing the page size? Section 5, Questions about arrows · Question 5.1 How do I draw two arrows at arbitrary positions along a path? · Question 5.2 How do I reverse the direction of an arrowhead? · Question 5.3 How do I change the size of all arrows? · Question 5.4 Can I create other arrowhead styles? Section 6, Questions about 2D graphs · Question 6.1 How can I draw x axis ticks on the right side, with the tick labels on the left side (relative to the axis path)? · Question 6.2 How can I reposition the x axis label to three-quarters along the axis length? · Question 6.3 How can I move the x axis label down 10bp? · Question 6.4 Can I use different pens for the axis, the axis label, and the tick labels? · Question 6.5 How can I change the font type of the axes label? · Question 6.6 How can I change the font type of the tick labels on an axis? · Question 6.7 How can I prevent axes tick labels from rendering on top of each other? · Question 6.8 How do I make the plot region of a graph, ignoring labels and legends, have a fixed size? · Question 6.9 How can I plot a function f(x) within [0,1]x[0,2] without explicitly calculating the x values for which f(x) hits the boundary? · Question 6.10 Is it possible to define customized palettes? · Question 6.11 Is there an easy way to graph factorial functions nicely? · Question 6.12 How do I indicate that a certain length should be exactly the size I prescribe with no rescaling, within a picture which has its own size? · Question 6.13 How can I make the y axis display base-2 logarithmic values? · Question 6.14 How can I align the x axes of two graphs on the same figure? · Question 6.15 How can I change the direction of the y-axis, such that negatives values are on the upper y-axis? · Question 6.16 How can I fill a path with a function that defines the color of each location? · Question 6.17 Is there a way to draw a function that is not explicitly given, such as (y - 2)^2 = x - 1 ? · Question 6.18 Is it possible to reverse or stretch an axis? · Question 6.19 Why can't I use the UnFill option to draw graphs with empty markers? · Question 6.20 How can I force several images to use the same palette range (e.g. the entire 0-255 grayscale range)? Section 7, Questions about programming · Question 7.1 Is Asymptote an interpreter or a compiler? · Question 7.2 What is the difference between a frame and a picture? · Question 7.3 What is the difference between a path and a guide? · Question 7.4 What is a convenient way to declare and initialize an array of pictures? · Question 7.5 Is there a way to define functions that act on arrays in general (i.e. work for arrays of any type)? · Question 7.6 Is there any way to declare structures ahead of their definition, e.g. where struct A performs some operation on struct B, but B contains an A member? · Question 7.7 Where are static variables in for loops allocated? · Question 7.8 Is there a debugger for asy? · Question 7.9 Do you accept patches for Asymptote? Section 8, Questions about differences between Asymptote and MetaPost · Question 8.1 What is the equivalent of the MetaPost c[a,b] interpolation operator? · Question 8.2 How does picture scaling differ in Asymptote and MetaPost? · Question 8.3 How can I avoid automatic scaling of a picture? · Question 8.4 What is the equivalent of MetaPost ... command? · Question 8.5 What is the equivalent of the MetaPost pickup command? · Question 8.6 What is the equivalent of the MetaPost whatever command? · Question 8.7 What is the equivalent for the MetaPost command for lray - horiz*v - verti*u = whatever*(LightSource - R), a system of three linear equations for three unknowns: horiz, verti, whatever? · Question 8.8 In MetaPost, it is possible to have a drawing remain the same size in different pictures by defining a unit u and explicitly multiply all the coordinates by u. Is there a better way to do this in Asymptote? · Question 8.9 In MetaPost, one could produce tiling pictures by generating a picture, and then clipping the picture to a rectangle of fixed dimensions around the center of the picture. How is that done in Asymptote? Section 9, Questions about output · Question 9.1 How can I disable automatic invocation of the PS viewer after an asy file is done processing? · Question 9.2 How do I output jpeg images? · Question 9.3 Can I embed bitmaps (photos) into my drawings and position and scale them? · Question 9.4 Does Asymptote support direct PDF output? · Question 9.5 How to I produce large pictures of high quality in raster format (e.g. png, giff etc). · Question 9.6 Is it possible to produce multi-page documents with asymptote?