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
2
votes
1 answer

How to change the color key using Gadfly's `Scale.color_discrete_manual` in Julia?

I have imported a DataFrame as below: julia> df 100×3 DataFrames.DataFrame │ Row │ ex1 │ ex2 │ admit │ ├─────┼─────────┼─────────┼───────┤ │ 1 │ 34.6237 │ 78.0247 │ 0 │ │ 2 │ 30.2867 │ 43.895 │ 0 │ │ 3 │ 35.8474 │ 72.9022 │ 0 …
Jay Wang
  • 2,650
  • 4
  • 25
  • 51
2
votes
0 answers

Adding color for legend causes bars to be all positive

using Gadfly, DataFrames v = DataFrame(x = [1,2,3], y = [0.5,-0.7,1.2], label = ["a","b","c"]) plot(v , x=:x, y=:y, Geom.bar, Theme(bar_spacing = 2mm), Guide.title("geneX"), Guide.ylabel("fold change"), Guide.xlabel("technique"), color =…
spaenigs
  • 152
  • 1
  • 10
2
votes
1 answer

System image building in Julia

I'm trying to compile a custom system image of Julia to speed up the loading of some libraries, specially Gadfly. I tried the docs tutorial but Julia complains about undefined paths (it makes me require every single library) and after linking all of…
RedPointyJackson
  • 675
  • 8
  • 17
2
votes
1 answer

How to change font size for text in compose in a Gadfly plot?

I'm trying to figure out how to change the font size for text written using compose.jl. The text is being written within a Gadfly plot using Guide.annotation, and I can see how to change other font sizes within the plot (i.e. key_title_font_size…
Ian Marshall
  • 709
  • 1
  • 5
  • 14
2
votes
1 answer

How to decrease the points border line width in gadfly

I'm trying to plot 100k points in a scatter plot. I couldn't distinguish between the points as the line width around the points is too big. Is there any way to remove this line or decrease the width of the line? plot(x=A, y=C, …
Ashoka Lella
  • 6,631
  • 1
  • 30
  • 39
2
votes
2 answers

Gadfly.jl Display Actual Values on Chart

I'm trying to determine if it's possible to display the underlying data points on a Gadfly chart. I know that I can display the labels associated with a particular point, but how can I show the actual values on the chart, itself? For example, from…
Jeremy McNees
  • 787
  • 4
  • 16
2
votes
3 answers

Plot portfolio composition map in Julia (or Matlab)

I am optimizing portfolio of N stocks over M levels of expected return. So after doing this I get the time series of weights (i.e. a N x M matrix where where each row is a combination of stock weights for a particular level of expected return).…
aberdysh
  • 1,634
  • 2
  • 13
  • 34
2
votes
1 answer

How to send parameter to Geom.histogram when using Geom.subplot_grid in Gadfly?

I am trying to plot several histograms for the same data set, but with different numbers of bins. I am using Gadfly. Suppose x is just an array of real values, plotting each histogram works: plot(x=x, Geom.histogram(bincount=10)) plot(x=x,…
Tudor Berariu
  • 4,910
  • 2
  • 18
  • 29
2
votes
1 answer

R style axis ticks with Gadfly.jl

I don't like the way Gadfly chooses axis limits when plotting, for example one of the plots I produced only had data in the center quarter of the canvas. A MWE could be: plot(x=[2.9,8.01],y=[-0.01,0.81]) Gadfly then picks an x-axis range of…
Sam Mason
  • 15,216
  • 1
  • 41
  • 60
2
votes
2 answers

Gadfly Histogram Appears to Select the Wrong Support

I am new to Julia, and I am exploring the ways in which I can visualize distributions. Ultimately, I may fall back on the more robust matplotlib code base, but I really enjoy the dynamic visualization element that IJulia offers in the Notebook. …
Marvin Ward Jr
  • 1,019
  • 1
  • 11
  • 30
1
vote
0 answers

how to draw this with gadfly in julia

I have got this dataset so far: julia>import Downloads julia>using DLMReader, VegaLite, InMemoryDatasets julia>data=Downloads.download("https://raw.githubusercontent.com/akshdfyehd/salary/main/ds_salaries.csv")…
hahaha
  • 183
  • 5
1
vote
1 answer

'stack order' in Gadfly histogram

When plotting a "stacked histogram", I would like the "stack order" to be the same as the legend order - Fair (first / bottom) and Ideal (last / top) - so that the colors are in order from light to dark. Like in this example. Any idea how to do…
René
  • 4,594
  • 5
  • 23
  • 52
1
vote
0 answers

Using Geom.abline in Gadfly without using Geom.point

I'm trying to plot a few straight lines in Gadfly using Geom.abline. This only works for me when I add a few dummy points, and use Geom.point as well. For instance, the following snippet produces the desired plot, jut with some dummy points I don't…
c_lienk
  • 11
  • 1
1
vote
1 answer

How to modify superscripts in Julia (labels of Gadfly plots)?

Could somebody suggest me how to initiate and end the superscript in a Gadfly plot using Julia correctly? Or if there are any other better solutions instead of using , please also share them with me. Thanks so much. using Gadfly ticks =…
1
vote
2 answers

How do I sort a bar chart in ascending or descending order in Julia's Gadfly? (Does anyone know a less hacky way?)

I've made a dict-of-counts style df to make a barplot from and am interested in sorting the bars in descending order by size. In the R world I'd do something like this and was wondering 1) what a tidy way to do this would be and 2) if something like…