-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GnuplotRB loops undefinitely when trying to generate a histogram #10
Comments
Hi! Yeah, unfortunately there is a problem in this particular case because of difference in columns which should be used for lines and histogram plots. When you initialize the plot with require 'daru'
require 'gnuplotrb'
include GnuplotRB
days = %w(Monday Tuesday Wednesday Thursday Friday Saturday Sunday)
mean = [121.2, 95.6, 91.06, 133.037, 81.88, 82.33, 200.45]
std = [206.05, 94.35, 108.15, 208.53, 114.27, 104.77, 320.66]
cdata = Daru::DataFrame.new({ mean: mean, sd: std }, name: "test", index: days)
datasets = cdata.map { |df| Dataset.new(df, using: '2:xticlabels(1)') }
plot = Plot.new(*datasets,
style_data: 'histograms',
style_fill: 'pattern',
title: "Test")
plot.to_png 'test.png', size: [800, 420] Sorry for such a late answer, had problems with github`s 2FA since last summer. |
Thanks for the reply! Unfortunately, that visualization doesn't suit my needs. Good workaround, tough. |
@dread-uo, here's the error message I got from running your script.
This is what's getting sent to
I'm not sure how to fix it, but it's probably getting unexpected options or the options are in the wrong order. |
Hello! Thanks for looking at it again! Running the test script above doesn't raise errors; it just hangs indefinitely. When I kill the job with ctrl-c, the error I get is
I'm using ruby 2.4.1, gnuplotrb 0.3.4, on Fedora 25. |
@dread-uo, I think you misunderstand or I wasn't completely clear. The hanging you're seeing and the Another thing that I've found helpful when debugging is to run |
I got some issues when trying to generate a histogram. I had no problems with points and lines, just with histograms. Below is a minimal example that recreates the behavior - at least on my machine.
If I change
style_data
tolines
, it works as expected.I'm using Ruby 2.3.0, with gnuplotrb 0.3.4 and daru 0.1.4.1. Gnuplot is version 5.0 patchlevel 3.
Thanks for your work with this :)
The text was updated successfully, but these errors were encountered: