Skip to content

Commit

Permalink
improve plot.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Mar 17, 2024
1 parent 46da5c2 commit 0d84eff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ function plotx(X, Y...; labels=nothing, fig="", title="")
ax=[]
for y in Y
subplot=100len+10+i
push!(ax, plt.subplot(subplot))
if i==1
push!(ax, plt.subplot(subplot))
else
push!(ax, plt.subplot(subplot, sharex=ax[1]))
end
if i==1
plt.suptitle(title, fontsize=14) # Super title
end
Expand All @@ -43,6 +47,9 @@ function plotx(X, Y...; labels=nothing, fig="", title="")
plt.plot(X, y, label=lbl)
plt.ylabel(lbl, fontsize=14);
plt.grid(true)
if i < len
plt.setp(ax[i].get_xticklabels(), visible=false)
end
i+=1
end
plt.xlabel("time [s]", fontsize=14)
Expand Down

0 comments on commit 0d84eff

Please sign in to comment.