Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a log plot in Julia?

Tags:

plot

julia

Is there a simple way to make a log-log plot or semilog plot in Julia? This link provides a sort of clunky way to do it, but given the general ethos of Julia I suspect there's a shorter way.

like image 870
Yly Avatar asked Jul 20 '18 15:07

Yly


1 Answers

As described here, you can accomplish this with magic arguments yaxis=:log or xaxis=:log.

using Plots 
x = 1:100
# log-log plot
plot(x.^2, xaxis=:log, yaxis=:log)
# semilog plot 
plot(x.^2, xaxis=:log) 
like image 100
Yly Avatar answered Oct 21 '22 13:10

Yly