Set log scale in subplots with figure size undetermined

Variable numer of panels per row is not supported (yet). You can mess with -J to some extent but no guarantees. One option to consider if the rows differ is to plot several subplots, one for each row, and then move the plot focus up using -Yh. That may work better.

As for log axis. Our test suite has examples, e.g. test/modern/powlog.sh, so using questionmarks should work:

gmt begin powlog
  gmt subplot begin 2x2 -Fs3i -M5p -A -SCb -SRl -Bwstr -R1/100/0/100
    gmt basemap -JX?l/?p0.5
    gmt basemap -JX?l/?p0.5 -c
    gmt basemap -R0/100/1/100 -JX?p0.5/?l -c
    gmt basemap -R0/100/1/100 -JX?p0.5/?l -c
  gmt subplot end
gmt end show