# Set up acoustics graph parameters.
drop = [log10(i) for i in [500, 700, 900, 5000, 7000, 9000, 50000, 70000, 90000]];
xlist = [[1000:1000:9000]; [10000:10000:100000]]
ylist = [[400:100:900]; [1000:1000:9000]; [10000:10000:100000]];
labx = x -> x in drop ? "": @sprintf("%0.0f", 10^(Float64(x)-3));
laby = y -> y in drop ? "": y > log10(900) ? @sprintf("%.0f", 10^(Float64(y)-3)): @sprintf("%0.1f", 10^(Float64(y)-3));
xt, yt = [log10(i) for i in xlist], [log10(i) for i in ylist]
xl, yl, tit = "f (kHz)", "|Ze| (kΩ)", "High resolution LCR measurement of Prowave device.";
int = res["20160504-1"]["int"];
plt = DataFrame(f = f, absZe=abs(int[f]))
plot(plt, x = :f, y = :absZe, Geom.line,
Scale.x_log10(labels=labx), Scale.y_log10(labels=laby),
Guide.xlabel(xl), Guide.ylabel(yl), Guide.xticks(ticks = xt), Guide.yticks(ticks = yt), Guide.title(tit))
Created,
Wednesday, 4 May 2016
Beautiful acoustics log-log scales with GadFly
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment