Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 04:13
    YP-Ye closed #1305
  • Aug 13 04:13
    YP-Ye commented #1305
  • Aug 13 00:09
    davidanthoff commented #1292
  • Aug 12 22:14
    Mattriks commented #1305
  • Aug 12 08:52
    YP-Ye opened #1305
  • Aug 11 22:36
    quinnj commented #1292
  • Aug 11 17:48
    bjarthur commented #1303
  • Aug 11 17:46
    bjarthur commented #1292
  • Aug 11 17:43
    tlnagy commented #1303
  • Aug 11 17:35
    bjarthur commented #1303
  • Aug 11 17:27
    tlnagy commented #1303
  • Aug 11 15:30
    Moelf synchronize #1303
  • Aug 11 13:24
    bjarthur commented #1303
  • Aug 08 23:43
    cmcaine commented #1292
  • Aug 07 06:23
    tlnagy commented #1304
  • Aug 07 01:01
    pnadon opened #1304
  • Aug 04 00:22
    Moelf opened #1303
  • Jul 30 23:42
    tlnagy commented #1302
  • Jul 30 23:41
    tlnagy labeled #1302
  • Jul 30 12:39
    Mattriks opened #1302
Daniel C. Jones
@dcjones
Oh, hmm. I don't that function will work anymore. There are methods in Color.jl to display arrays of colors though.
Something like this will generate colors by the same method that Gadfly does any render them to an SVG.
using Color

n = 12
cs = distinguishable_colors(n, ColorValue[LCHab(70, 60, 240)],
                            transform=c -> deuteranopic(c, 0.5),
                            lchoices=Float64[65, 70, 75, 80],
                            cchoices=Float64[0, 50, 60, 70],
                            hchoices=linspace(0, 330, 24))

writemime(STDOUT, MIME("image/svg+xml"), cs)
Neil Panchal
@neilpanchal
Perfect, thank you Jones
Emil Bay
@emilbayes

Isn't it possible to plot negative values with Gadfly's Geom.bar? The following produces only positive bars, but a y axis that has adjusted to the negative values:

```julia
using Gadfly

using Gadfly
plot(x=[1, 2, 3, 4], y=[-1, 2, -3, 1], Geom.bar)
Kiet Lam
@kietdlam
Hi, I was wondering if Gadfly supports having different markers other than the closed_dot for Geom.point? #627
Daniel C. Jones
@dcjones
Afraid not, @kietdlam. It's sorely lacking.
This is issue #66, by the way.
Lyndon White
@oxinabox
Does GadFly have tooltips? I think tool tips would be super handy in scatter plots
Daniel C. Jones
@dcjones
@oxinabox It does not currently. That is something I would like to add eventually.
Shriphani Palakodety
@shriphani
for a plot generated using this https://gist.github.com/shriphani/d8d35f357c87757ee478, how can I add a legend / tooltips?
Daniel C. Jones
@dcjones
In this case you can change the labels by mapping the color aesthetic. Like plot(..., color=["savings(x, 0.01)", ...]).
Darwin Darakananda
@darwindarak
Hi @dcjones, are there plans for major changes coming up? I’m thinking of documenting Gadfly’s pipeline to make it easier for new developers to work on it.
Daniel C. Jones
@dcjones
That would be terrific. There aren't any major changes planned beyond the Measures.jl thing, which actually isn't a very big change on the Gadfly side of things.
Darwin Darakananda
@darwindarak
Cool! I'll start documenting my walk-through of the code then
Darwin Darakananda
@darwindarak
Wow, I did not realize how much of the code is for figuring out and propagating defaults.
Neil Panchal
@neilpanchal
@darwindarak that's awesome. Thanks
Zac Cranko
@ZacCranko
Is there any easy way to set the opacity of a layer?
Alex
@axsk
Does anyone have an example how to use the rectbin plot with, x_min, x_max, y_min, y_max? When I tried using rectbin with just the x,y bindings I got basically background with some small, almost pixel-like rects... (maybe 3x1 pixels each).
Daniel C. Jones
@dcjones
@axsk What does your data look like? Have you tried Geom.histogram2d?
Alex
@axsk
i am using a 2-parameter clustermethod and have a scorefunction to measure the goodness of the results. the parameters itself arent equidistantly distributed, so bascially it looks like [40, 50, 80, 100, 150] X [60,70,90, 120] -> Real ( X denoting the cartesian product). As I dont coun't frequencies I dont think the hist2d would help.
Alex
@axsk
is it somehow possible to draw multiple figures in one ijulia cell (for example inside a for loop)?
Daniel C. Jones
@dcjones
Yes, just call display on each figure.
Diego Marinho
@dmoliveira
Hi. Is there a way to plot histogram with labels sorted by specific order? for example "< 360 days", "< 80 days", etc... when plotted using plot(df, x="update", Geom.histogram) I get the labels in a different order that I desire.
Daniel C. Jones
@dcjones
Hello. By default it respects the order in which the values appear in the data, but you can specify an explicit order with Scale.x_discrete(levels=["< 80 days", "< 360 days", ...]).
Diego Marinho
@dmoliveira
@dcjones Thanks for the piece of information. It solved the 'problem'. BTW, nice work with Gadfly..
Joe Greener
@jgreener64
Hi, loving Gadfly. Just wondering if it's possible to change the text size of the axis labels, scale labels and title? I'm finding I can change their size relative to the rest of the plot by changing the default plot size. But I am wondering if I can change them independently of that. I had a look at the docs but couldn't find it.
Darwin Darakananda
@darwindarak
There are some options you can set with the [Theme element] (http://gadflyjl.org/themes.html)
Joe Greener
@jgreener64
Great, thanks.
Diego Marinho
@dmoliveira

One quick question: For any reason x/y jitter are working for you guys?
For example:

Gadfly.plot(x=[1:10], y=fill(1,10), Stat.x_jitter(range=0.5), Stat.y_jitter(range=0.5), Geom.point)

It results in a clean graph (without noise in the data points.)

http://s14.postimg.org/ssn3te9k1/no_jittter_in_graph.png

I'm doing something wrong? I already checked the documentation.

Daniel C. Jones
@dcjones
@dmoliveira Not your fault, this was broken it seems. It's fixed now on master and I'll tag a new version soon.
Diego Marinho
@dmoliveira
@dcjones Thanks :-) nice work!
By the way, what to you think about a rug plot. I see great use of it. For example, I want to analyze a window time from users that do some action. It helps to get some characterization over the data.
alt
Daniel C. Jones
@dcjones
Just added marginal rug plots: dcjones/Gadfly.jl@c4c42e9
If you want just a rug plot, I think you can do that with Geom.vline, like plot(xintercept=rand(20), Geom.vline).
Diego Marinho
@dmoliveira
@dcjones Thanks one more time. I didn't know about the xintercept parameter.
Diego Marinho
@dmoliveira
This message was deleted
This message was deleted
Diego Marinho
@dmoliveira

@dcjones what do you think if we add a scatter matrix to Gadfly plots? I was doing some data analysis and I needed to use one. I think it was very helpful.

I based the gadfly version on these ones:

Scatter-Matrix R
Scatter-Matrix Python
then I created this one:
Scatter-Matrix
I added a notebook explain this proposition here
I can adjust it and make a pull request to add to Gadfly or if you prefer I can give you the code to you increment in there. But first I want to listen your opinion about that.

Daniel C. Jones
@dcjones
This would be a nice addition. I think it could be improved by not repeating axis labels, but feel free to make a PR and I can make those improvements.
Diego Marinho
@dmoliveira
@dcjones Great! I'll do that in next few days and come back after. any suggestion is welcome.
Ben J. Ward
@BenJWard

Hey, on my macbook and a nightly build of Julia - well actually whatever the current commit is. If I re-install Gadfly and do using Gadfly I get an error to do with Compose:

julia> using Gadfly
INFO: Precompiling module Gadfly...
ERROR: LoadError: LoadError: AssertionError: iterator.head == :in
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:392
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:392
 [inlined code] from boot.jl:264
 in anonymous at no file:0
 in eval at ./boot.jl:264
 [inlined code] from ./sysimg.jl:14
 in process_options at ./client.jl:254
 in _start at ./client.jl:377
while loading /Users/axolotlfan9250/.julia/v0.5/Compose/src/form.jl, in expression starting on line 189
while loading /Users/axolotlfan9250/.julia/v0.5/Compose/src/Compose.jl, in expression starting on line 66
ERROR: LoadError: Failed to precompile Compose to /Users/axolotlfan9250/.julia/lib/v0.5/Compose.ji
 in error at ./error.jl:21
 in compilecache at loading.jl:471
 in require at ./loading.jl:312
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:392
 [inlined code] from boot.jl:264
 in anonymous at no file:0
 in eval at ./boot.jl:264
 [inlined code] from ./sysimg.jl:14
 in process_options at ./client.jl:254
 in _start at ./client.jl:377
while loading /Users/axolotlfan9250/.julia/v0.5/Gadfly/src/Gadfly.jl, in expression starting on line 9
ERROR: Failed to precompile Gadfly to /Users/axolotlfan9250/.julia/lib/v0.5/Gadfly.ji
 in error at ./error.jl:21
 in compilecache at loading.jl:471
 in require at ./loading.jl:339
 in eval at ./boot.jl:264

Is this an issue I should make, or is it just me?

Daniel C. Jones
@dcjones
If you're on Gadfly master you'll probably need to be on Compose master as well.
Ben J. Ward
@BenJWard
I guess I'm on master, I just installed whatever version is labelled as current in METADATA with Pkg.add
Alex
@axsk
using gadfly (and maybe interact/react) in ijulia, is there any possibility to delete/redraw/update a plot? i would like to plot the current state of an iterative algorithm from within its for loop to have a live feedback of how it is doing
Xander Dunn
@xanderdunn
Is it possible to create a "legend" of arbitrary text? I'd like to be able to show a box beside the plot that lists all the parameters that went into making the plot, like alpha = 1, gamma = 2, etc.
Alex
@axsk
I'd actually now need to update a legend, as I am given a GadflyPlot by another Package which I need to annotate afterwards.
Cory Simon
@CorySimon

Does RGB no longer work?

myplot = plot(
 [layer(x=dfs[i][:P], y=dfs[i][:Loading_molec_UC_], Geom.point, Theme(default_color=RGB(.2, .2, .2))) for i =1:length(metals)]...,
Coord.Cartesian(xmin=0, xmax=.15)
)

yields

 LoadError: MethodError: `convert` has no method matching convert(::Type{Union{ColorTypes.Colorant{T,N},Void}}, ::Color.RGB{Float64})
This may have arisen from a call to the constructor Union{ColorTypes.Colorant{T,N},Void}(...),
since type constructors fall back to convert methods.
Closest candidates are:
  call{T}(::Type{T}, ::Any)
  convert{T}(::Type{T}, !Matched::T)
while loading In[21], in expression starting on line 1

 in call at /home/cory/.julia/v0.4/Gadfly/src/varset.jl:53
 in anonymous at no file
Cory Simon
@CorySimon
^ apparently I need to use Colors and not Color
i.e. using Colors
Alex
@axsk
can i use a datas dimension index for coloring the data? e.g. if i have a matrix of datapoints, where the first column represents one species, the second a second one and so on, and i want to plot a density plot, i want the color to represent the species. so far i have only managed to achieve this by creating an extra array via repeat(), but this is realy slow in my case.
Alex
@axsk
is there a reason why i cannot bind scales to layers? i want to apply different colorschemes to different layers, do you now of a nice way to do this?