Menu
  • HOME
  • TAGS

Are Gadfly plots currently composable?

ggplot2,julia-lang,gadfly

There is add_plot_element(), which can add stuff to an existing layer: xs = [0:0.1:pi] l = layer(x=xs, y=sin(xs)) add_plot_element(l, Guide.title("Now it has a title")) You can then plot the layer using plot(l), and invoke either draw or display to actually show something. Further down, there's a bunch of overloads that...

Plot real-valued function with variable parameters

julia-lang,calculus,gadfly

See plotting functions and expressions in the Gadfly manual. For your example, something like plot([x->x^2+1, x->(x-4)+(x+3)], -2, 2) should do the trick using anonymous functions. It's not currently possible to do this with multivariate functions as far as I'm aware....

Gadfly for Julia, plotting multiple dimension in Bar Chart

julia-lang,gadfly

If I understand the question right, you can generate the plot you're looking for (minus the change in alpha value for different months) with using DataFrames, Gadfly data = DataFrame() data[:DrinkType] =["Coke","Coke","Coke","Coke","Pepsi","Pepsi","Pepsi","Pepsi"] data[:Country] = ["UK", "US", "UK", "US","UK", "US", "UK", "US"] data[:Month] = ["April", "April", "March", "March","April", "April", "March", "March"]...