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
1
vote
1 answer

How to draw function returning elements of an array using gadfly

Hello i am trying to draw a function with Gadfly using Julia. I have no problem with function like this: function F(x) return x+5 end I use plot(F,1,10) and it works. Unfortunately for this function which is returning elements of an array it…
Dago
  • 788
  • 2
  • 9
  • 24
1
vote
1 answer

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

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…
epx
  • 799
  • 4
  • 12
1
vote
1 answer

Markers in Gadfly

is there any possibility to change the marker types in Gadfly plots? Or anything that could clearly distinguish different lines in a grayscale printout? Thanks, Dominik
CedeErwe
  • 83
  • 3
1
vote
2 answers

Plot real-valued function with variable parameters

This question sounds more difficult than it actually is. I wonder, how I can plot a mathematical function with julia? Until now I used Gadfly to plot. I now want to play around with a function (constrained optimization on convex functions) but I…
ruffy
  • 291
  • 1
  • 3
  • 13
1
vote
0 answers

Julia Gadfly 'Geom not defined' error

Having used Gadfly without issue since learning Julia, today I receice the error Gadfly.plot(x=1:10,y=rand(10),Geom.line) ERROR: Geom not defined I have updated packages with no change in functionality. See the attached screenshot:
Alexander Ridgers
  • 225
  • 1
  • 3
  • 10
1
vote
2 answers

Grid of Plots in Julia

How can I make a grid of plots in Julia using Gadfly? Lets say I have an array of plots p as an example p=[plot(y=[1:10],x=[1:10]),plot(y=[1:10],x=[1:10]),plot(y=[1:10],x=[1:10])] I want to put this in a 2x2 grid (note 3x1 and 1x3 are easy using…
bdeonovic
  • 4,130
  • 7
  • 40
  • 70
0
votes
1 answer

Gadfly xticks number in Julia histogram

suppose you have a dataframe with a column called c_lab that contains values from 0 to 100 and resembles a log-normal distribution. I plotted the histogram with this code using gadfly package in Julia: plot(df_plot, x = "c_lab",…
Jorge Paredes
  • 996
  • 7
  • 13
0
votes
1 answer

Using color of `Geom.hline` as aesthetic in Gadfly

In Gadfly, I am trying to color horizontal lines based on data. But since color of Geom.hline is not an aesthetic, but only an argument, my approach fails. How can I pass color form the data to the color argument? My attempt: using DataFrames,…
Thales
  • 585
  • 3
  • 9
0
votes
1 answer

Plotting nxn matrix as a headmap in Gadfly

Hi I am wondering how to plot a heatmap with Gadfly for a n x n matrix. From what I saw the closest thing is Geom.rect or Geom.rectbin, but I am unable to get it in the format of grid. using Gadfly: Geom, plot a = rand(3,3) plot(x = 1:9, y=1:9,color…
imantha
  • 2,676
  • 4
  • 23
  • 46
0
votes
1 answer

How to add point size to a Gadfly (Julia) scatter plot based on a variable

I am trying to reproduce this Seaborn plot using Gadfly. The code I have so far is: using CSV, DataFrames, Gadfly download("https://raw.githubusercontent.com/mwaskom/seaborn-data/master/mpg.csv", "mpg.csv"); mpg = DataFrame(CSV.File("mpg.csv")); p…
René
  • 4,594
  • 5
  • 23
  • 52
0
votes
2 answers

How to make lines with Julia using Gadfly (Facility location problem)?

Im trying to make the facility location problem algorithm ,and i got a possible solution , but dont know how to graph it,now im trying to use different layers by each binding line between the supplying center and the supplied point.For example , to…
0
votes
1 answer

Plotting multiple data files with Gadfly

I'm trying to plot different data files using Gadfly. I tried using a DataFrame, but with no result. I tried using the below code but it just plots the last data file. I don´t know how to plot all the data file in just one plot using Gadfly. data1 =…
0
votes
0 answers

Plot(...) as an output instead of a plot in Julia

with Julia 1.0.3 following this tutorial for plotting with Gadfly (it's from 2015: it might a bit old) I used the following code: using RDatasets, Gadfly, Cairo, Plots sleep = dataset("lme4", "sleepstudy"); plot(sleep, x = "Days", y = "Reaction",…
ecjb
  • 5,169
  • 12
  • 43
  • 79
0
votes
1 answer

how to use xticks in Gadfly spy function

I'm using spy function from Gadfly package to plot a heatmap or a matrix of values. and i want to show for each column a specific string but i cannot find the correct syntax plt = Gadfly.spy(mtx, x= ["a","b","c","d"]) #suppose mtx has 4…
inarighas
  • 720
  • 5
  • 24
0
votes
1 answer

How do I change the color of text in Geom.label?

Can't find any options here http://gadflyjl.org/stable/man/themes.html. Is this possible?
Ferris
  • 101
  • 1
  • 5