aboutsummaryrefslogtreecommitdiffstats
path: root/examples/graphs/axis.jl
blob: 915414eadb894b03d5d4e93e6b1f230a4001210d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

# Original Python:
#from pyx import *
#
#g = graph.graphxy(width=8,
#                  x=graph.axis.log(min=1e-1, max=1e4, title=r"$x$-axis"),
#                  y=graph.axis.lin(max=5, title=r"$y$-axis"))
#g.plot(graph.data.function("y(x)=tan(log(1/x))**2"))
#g.writeEPSfile("axis")
#g.writePDFfile("axis")
#g.writeSVGfile("axis")

using PyX
using LaTeXStrings

g = graph.graphxy(width=8,
                  x=graph_axis.log(min=1e-1, max=1e4, title=L"$x$-axis"),
                  y=graph_axis.lin(max=5, title=L"$y$-axis"))
plot(g, graph_data_function("y(x)=tan(log(1/x))**2"))
writeEPSfile(g, "axis")
writePDFfile(g, "axis")