summaryrefslogtreecommitdiff
path: root/36670-t/images/src/fig2.xp
diff options
context:
space:
mode:
authorRoger Frank <rfrank@pglaf.org>2025-10-14 20:06:17 -0700
committerRoger Frank <rfrank@pglaf.org>2025-10-14 20:06:17 -0700
commitd55ced9895c3cfa6779d483f9eaac8b7b88fafa9 (patch)
tree1514dd9cf797f8d2d92e82eed1c395f3ea142c13 /36670-t/images/src/fig2.xp
initial commit of ebook 36670HEADmain
Diffstat (limited to '36670-t/images/src/fig2.xp')
-rw-r--r--36670-t/images/src/fig2.xp36
1 files changed, 36 insertions, 0 deletions
diff --git a/36670-t/images/src/fig2.xp b/36670-t/images/src/fig2.xp
new file mode 100644
index 0000000..591e5d8
--- /dev/null
+++ b/36670-t/images/src/fig2.xp
@@ -0,0 +1,36 @@
+/* -*-ePiX-*- */
+#include "epix.h"
+using namespace ePiX;
+
+std::string f(double t, unsigned int prec, unsigned int base)
+{
+ std::ostringstream buf;
+ buf << "$";
+ if (t == 0)
+ buf << "\\phantom{-}";
+
+ else if(0 < t)
+ buf << "+";
+
+ buf << t << "$";
+ return buf.str();
+}
+
+int main()
+{
+ picture(P(-4,0), P(4,1), "5 x 0.5in");
+
+ begin();
+ bold();
+ axis Ax(P(xmin(),0), P(xmax(),0), xsize(), P(3,10), tl);
+ Ax.align(t);
+
+ line(P(xmin(),0), P(xmax(),0), 20);
+ Ax.label_rep(f).draw();
+
+ label(P(xmin() - 0.5,0), P(0, 14), "$\\cdots$", l);
+ label(P(xmax() + 0.5,0), P(0, 14), "$\\cdots$", r);
+
+ tikz_format();
+ end();
+}