Skip to content

Instantly share code, notes, and snippets.

View natj's full-sized avatar

Joonas Nättilä natj

View GitHub Profile
julia> Pkg.add("Winston")
INFO: Initializing package repository /Users/jomo/.julia/v0.3
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
INFO: Cloning cache of BinDeps from git://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of Cairo from git://github.com/JuliaLang/Cairo.jl.git
INFO: Cloning cache of Color from git://github.com/JuliaLang/Color.jl.git
INFO: Cloning cache of Homebrew from git://github.com/JuliaLang/Homebrew.jl.git
INFO: Cloning cache of IniFile from git://github.com/JuliaLang/IniFile.jl.git
INFO: Cloning cache of Tk from git://github.com/JuliaLang/Tk.jl.git
INFO: Cloning cache of URIParser from git://github.com/loladiro/URIParser.jl.git
@natj
natj / colorbar.jl
Created January 18, 2014 08:54
Small and crude colorbar implementation to Winston
#colorbar
function colorbar(dmin, dmax; orientation="horizontal", colormap=_default_colormap, kvs...)
if orientation == "vertical"
p=FramedPlot(aspect_ratio=10.0)
setattr(p.x, draw_ticks=false)
setattr(p.y1, draw_ticks=false)
setattr(p.x1, draw_ticklabels=false)
setattr(p.y1, draw_ticklabels=false)
setattr(p.y2, draw_ticklabels=true)
@natj
natj / plot_DF.jl
Last active December 27, 2015 05:09
DataFrames integration to Winston by @jverzani
## DataFrames
# using Winston, RDatasets
# iris = data("datasets", "iris")
# clean_colnames!(iris)
# ## simple line graph
# plot(:Sepal_Length, :Sepal_Width, iris)
# ## scatterplot
@natj
natj / plot.jl
Created November 1, 2013 08:34
plothist & oplothist
output_surface = Winston.config_value("default","output_surface")
output_surface = symbol(lowercase(get(ENV, "WINSTON_OUTPUT", output_surface)))
import Cairo
using Color
export file,
imagesc,
loglog,
oplot,