Questions tagged [gadfly]

Gadfly is plotting package for the Julia programming language.

"Gadfly is a system for plotting and visualization based largely on Hadley Wickhams's ggplot2 for R, and Leland Wilkinson's book The Grammar of Graphics."

It is built upon Julia programming language

100 questions
14
votes
2 answers

How to add Legend in a graph when using package Gadfly.jl in Julia

I am using Julia for Financial Data Processing and then plotting graphs based on the financial data. on X-Axis of graph I am plotting dates (per day prices) on Y-Axis I am plotting Stock Prices, MovingAverage13 and MovingAverage21 I am currently…
10
votes
1 answer

Julia: Plot matrix with Gadfly.jl

I'm trying to plot a matrix with Gadfly, like I can do with PyPlot's matshow: using PyPlot p = eye(5) p[5,5] = -1 matshow(p) But I took a look at the docs, and found nothing. How can I do it with Gadfly?
prcastro
  • 2,178
  • 3
  • 19
  • 21
10
votes
1 answer

Are Gadfly plots currently composable?

Is there currently a way to add plot elements together in Gadfly.jl? For example, in R if I have another function that returns a ggplot and I want to add a title to it, I'd do the following: p <- makeMyPlot() p + ggtitle("Now it has a title") Is…
Ben Hamner
  • 4,575
  • 4
  • 30
  • 50
9
votes
1 answer

Render Gadfly plots directly to a Gtk canvas

Is it possible to render a Gadfly plot directly to a canvas? I would like to develop a Julia GUI using gtk which renders Gadfly plots. I am hoping for something along the lines of: some_plot = plot(x=[1,2,3],y=[4,5,6]) draw(ctx::CairoContext,…
Mageek
  • 4,691
  • 3
  • 26
  • 42
8
votes
1 answer

How to add custom color map in Gadfly.jl?

What is the best way of adding a custom color map to a theme in Gadfly.jl? Say if I create a new color map as follows: n = 12 color_map = distinguishable_colors(n, Color[LCHab(50, 60, 290)], transform=c -> deuteranopic(c, 1), …
tlnagy
  • 3,274
  • 4
  • 24
  • 37
7
votes
1 answer

Labelling functions in Gadfly plot

Plotting functions directly is easy in Gadfly: plot([sin, cos], 0, 25) This gives my two differently colored lines, automatically labelled in the legend as something like f_1 and f_2: How can I change the default names in the "Color" legend?
phipsgabler
  • 20,535
  • 4
  • 40
  • 60
7
votes
2 answers

How to I create a labelled scatter plot?

I would like to draw a labelled scatterplot, like shown below, in Gadfly. (Source: http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/images/renda.png) How can I do this? The scatter plot is easy: using Gadfly X = [1, 2, 2, 3, 3,…
Frames Catherine White
  • 27,368
  • 21
  • 87
  • 137
7
votes
2 answers

How to pass a function to julia Gadfly Theme parameter

I make a plot like this: plot( layer(x=sort(randn(1000),1), y=sort(randn(1000),1), Geom.point), layer(x=[-4,4], y=[-4,4], Geom.line(), Theme(default_color=color("black")))) As you can see, the white circle around the points makes the high…
Skeppet
  • 931
  • 1
  • 9
  • 17
7
votes
1 answer

setting point sizes when using Gadfly in Julia

In my attempts to practice Julia, I've made a program which draws a bifurcation diagram. My code is as follows: function bifur(x0,y0,a=1.3,b=0.4,n=1000,m=10000) i,x,y=1,x0,y0 while i < n && abs(x) < m x,y = a - x^2 + y, b * x …
Ali
  • 503
  • 6
  • 20
6
votes
2 answers

Does Gadfly support LaTeX in plot titles and labels?

I am interested in using Greek letters and math symbols in the title and labels for a Gadfly plot in Julia. Does anyone know of a way to do this, or is this not supported (yet)?
buruzaemon
  • 3,847
  • 1
  • 23
  • 44
6
votes
2 answers

Configuring the browser used to display Gadfly plots in Julia

I am using Julia 0.4.5 on Windows 7. When I invoke Gadfly.plot, Internet Explorer opens up to display the plot. How can I configure Julia to use a browser of my choice (like Google Chrome) to display Gadfly plots?
buruzaemon
  • 3,847
  • 1
  • 23
  • 44
5
votes
1 answer

How to set figure size or plot size in a Gadfly plot (using Julia)?

I would like to set the width (and height) of my Gadfly plot to adjust the aspect ratio in a hstack plot. Orginal plot: using Gadfly p1 = Gadfly.plot(x=[1,2], y=[3,4], Geom.line) hstack plot (to be adjusted): using Gadfly p1 = Gadfly.plot(x=[1,2],…
René
  • 4,594
  • 5
  • 23
  • 52
5
votes
2 answers

Julia plot function array issues

Having come from Matlab I am struggling to work out why the following does not work: plot(x=rand(10),y=rand(10)) Produces a graph correctly. x=rand(10) y=rand(10) plot(x,y) produces error: ERROR: plot has no method matching…
Alexander Ridgers
  • 225
  • 1
  • 3
  • 10
5
votes
1 answer

Julia plotting unknown number of layers in Gadfly

I'm trying to create a plot in Julia (currently using Gadfly but I'd be willing to use a different package). I have a multidimensional array. For a fixed dimension size (e.g. 4875x3x3 an appropriate plot would be: p=Gadfly.plot( …
bdeonovic
  • 4,130
  • 7
  • 40
  • 70
4
votes
1 answer

How to annotate a Gadfly heatmap?

Coming from Python I'm trying to reproduce this Seaborn plot in Julia using the Gadfly package. I've two questions: How to annotate this heatmap with the actual values per cell without "duplicating" lines of code? And how to modify the xticks to…
René
  • 4,594
  • 5
  • 23
  • 52
1
2 3 4 5 6 7