2 // asy -f <fmt> -tex <pdflatex|xelatex> sigmaxx
3 // DO NOT SPECIFY AN OUTPUT NAME (this confuses asy...)
14 // draw invisible box around image in order to provide a frame-of-reference
15 draw(box((0,0),(15,12.2)), invisible);
17 // place the plot and the color bar
18 label(graphic("field.png", format("height=%fcm", 12*s)),(6.1,6.1));
19 label(graphic("bar.png", format("height=%fcm", 11*s)),(14.5,6.1));
21 // add a label to the color bar
22 draw(rotate(90)*Label("$\sigma_{xx}\,\left[\unit{kPa}\right]$"), (12.8,6.1));
24 // fiddling parameters for the colorbar tick labels
27 real yscale(real v){return (v+yo)*yf;}
28 // create the tick labels for the colorbar
29 for(int i=0; i<=30; i+=5) {
30 label(format("$%d$",i), (14, yscale(i)), W);