# Multiple 2D plots with both axes logarithmically scaled

I’m doing some error analysis and it would be handy if I could display errors with both axes scaled logarithmically in multiple separate plot windows. See, I have four vectors (`diffc1`, `diffc2`, `diffc3`, `diffc4`) containing errors that I’d like to plot in separate windows with each plot window having logarithmically scaled axes. I know how to do this if only the y-axis has a logarithmic scale, namely using:

``````using PyPlot
PyPlot.figure(1)
# nc has my x-axis values
PyPlot.semilogy(nc, diffc1)
PyPlot.figure(2)
PyPlot.semilogy(nc, diffc2)
PyPlot.figure(3)
PyPlot.semilogy(nc, diffc3)
PyPlot.figure(4)
PyPlot.semilogy(nc, diffc4)
``````

and I know how to scale both axes logarithmically and produce just one plot window at a time, namely using:

``````using Plots
plot(nc, diffc1, xaxis=:log, yaxis=:log)
``````

but I don’t know how to produce multiple plots at a time with both axes scaled logarithmically. I’ve looked for an equivalent option for Plots to PyPlot’s `figure()`, but I cannot find one.

I solved my own problem. I did some research, but that actually didn’t solve the problem (as the results pertained to using PyPlot in Python), but I just typed `xscale` into a Julia prompt and lucked out that it was a defined function and I looked at its docs and figured out how to use it and its y-counterpart `yscale`.

This is the code required for my particular problem:

``````using PyPlot
PyPlot.figure(1)
PyPlot.plot(nc, diffc1);
xscale("log")
yscale("log")
PyPlot.figure(2)
PyPlot.plot(nc, diffc2);
xscale("log")
yscale("log")
PyPlot.figure(3)
PyPlot.plot(nc, diffc3);
xscale("log")
yscale("log")
PyPlot.figure(4)
PyPlot.plot(nc, diffc4)
xscale("log")
yscale("log")
``````