gadfly

Remove automatically generated color key in Gadfly plot?

跟風遠走 提交于 2019-12-24 07:07:31
问题 I'm just starting out with Julia and trying to create a simple sin/cos plot using Gadfly. It all works well, however for some reason Gadfly insists on inserting its own Color... f1 f2 legends into the plot (see the red-outlined portion in the image). Could anyone please tell me what I should do to remove it? I've searched but couldn't find anything. The code that generates this is given below. I'm using Julia 0.4.6 on Windows 10. using Gadfly set_default_plot_size(9inch, 9inch/golden) πs =

Confusing error when updating packages in Julia 0.5.0

◇◆丶佛笑我妖孽 提交于 2019-12-24 06:38:06
问题 When attempting to update the installed packages on my Windows 10 laptop with Julia 0.5.0 installed, the following error appeared with regard to Rmath: C:\Users\CaitlinG>julia -e "Pkg.update()" INFO: Updating METADATA... INFO: Updating cache of ColorTypes... INFO: Updating cache of Gadfly... INFO: Updating cache of StatsBase... INFO: Updating cache of DataFrames... INFO: Updating cache of FixedPointNumbers... INFO: Updating cache of Colors... INFO: Updating cache of DataFrames... INFO:

How to plot a linear function using Gadfly.jl in Julia?

强颜欢笑 提交于 2019-12-12 12:22:14
问题 I am wondering how to graph a linear function (say y = 3x + 2) using Julia package Gadfly. One way I come up with is to plot two points on that line, and add Geom.line . using Gadfly function f(x) 3 * x + 2 end domains = [1, 100] values = [f(i) for i in domains] p = plot(x = domains, y = values, Geom.line) img = SVG("test.svg", 6inch, 4inch) draw(img, p) Are there any better way to plot lines? I have found the Functions and Expressions section on the Gadfly document. I am not sure how to use

Geom.ribbon in Gadfly (Julia) does not accept Int vectors as input

半世苍凉 提交于 2019-12-11 08:23:58
问题 So, I've been playing around with Gadfly in Julia and run into this issue. Geom.ribbon does't accept Int vectors as input for ymin and ymax when used in combination with Geom.smooth. I was wondering if this is a bug, is intended, or if I'm doing anything wrong and why? In [1]: x=[-10:10] y=[i^2 for i in -10:10] ymin = y-10 ymax = y+10; In [2]: plot(x=x, y=y, ymin=ymin, ymax=ymax, Geom.smooth, Geom.ribbon) Out[2]: `minvalmaxval` has no method matching minvalmaxval(::Int64, ::Float64, ::Int64,

Are Gadfly plots currently composable?

三世轮回 提交于 2019-12-08 16:10:28
问题 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 there currently a Gadfly equivalent? If not, is this on Gadfly's roadmap? 回答1: 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

Julia plotting unknown number of layers in Gadfly

☆樱花仙子☆ 提交于 2019-12-07 05:09:39
问题 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( layer(y=sim1.value[:,1,1],x=[sim1.range],Geom.line, Theme(default_color=color("red"))), layer(y=sim1.value[:,1,2],x=[sim1.range],Geom.line, Theme(default_color=color("blue"))), layer(y=sim1.value[:,1,3],x=[sim1.range],Geom.line, Theme(default_color=color("green"))) )

Julia plotting unknown number of layers in Gadfly

僤鯓⒐⒋嵵緔 提交于 2019-12-05 12:52:32
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( layer(y=sim1.value[:,1,1],x=[sim1.range],Geom.line, Theme(default_color=color("red"))), layer(y=sim1.value[:,1,2],x=[sim1.range],Geom.line, Theme(default_color=color("blue"))), layer(y=sim1.value[:,1,3],x=[sim1.range],Geom.line, Theme(default_color=color("green"))) ) but in general I want to be able to write a plot statement where I do not know the third dimension of

How to pass a function to julia Gadfly Theme parameter

非 Y 不嫁゛ 提交于 2019-12-01 16:31:58
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 density parts of the plot almost white. I would like to change the outer circle color of the points to black (or blue) to better show that the points are really there. From the Gadfly documentation it seems like the highlight_color argument of Theme() might do that, but it takes a function as argument. I don't understand how that is supposed to work. Any

How to pass a function to julia Gadfly Theme parameter

自古美人都是妖i 提交于 2019-12-01 15:32:51
问题 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 density parts of the plot almost white. I would like to change the outer circle color of the points to black (or blue) to better show that the points are really there. From the Gadfly documentation it seems like the highlight_color argument of Theme() might