Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # savefig("myplot.png") # Saves the CURRENT_PLOT as a .png
- # savefig(p,"myplot.pdf") # Saves the plot from p as a .pdf vector graphic
- using Plots
- using Random
- using ORCA
- using Plots.PlotMeasures
- plotly()
- function pltsv()
- colz = distinguishable_colors(41)
- colz = colz[2:end]
- my = maximum(y)
- p1 = plot(
- leg=false,
- x,
- y,
- title=ttl,
- # label=["ok","noop"],
- xlabel=xlb,
- ylabel=ylb,
- # labels = ["Apples" "Oranges" "Hats" "Shoes"],
- lw=3,
- xtickfont=xf,
- titlefont=10,
- seriestype=:bar,
- # ann=["Apples","Oranges","Hats","Shoes"],
- color=shuffle(colz),
- yticks=0:round(Int,my/11):my,
- ylim=(0,my*1.15),
- # bar_position = :dodge,
- # scatter,bar,pie,curves,hline,line,scatterpath,sticks
- fmt = :png,
- size=(1400,900),
- xrotation=-5,
- # xmirror=true
- # bottom_margin = 200px,
- )
- scatter!(p1, x, (x -> x+my/20).(y),
- txts = map(i->text(y[i], font(round(Int, 15+15*y[i]/my))), 1:length(x)),
- ms=0,
- markeralpha=0,
- leg=false,
- # formatter=x->"",
- )
- Plots.savefig(p1,"$ttl.png")
- end
- x = split("
- ### x-values go here
- ",'\n')
- x=x[2:end-1]
- y = (x -> parse(Int,x)).(split("
- ### y-values go here ###
- "))
- ttl="### title goes here ###"
- xlb="### x-label goes here ###"
- ylb="### y-label goes here ###"
- xf=13
- pltsv()
- # run(`gwenview $ttl.png`)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement