Skip to content
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

Some odd problem: GR3_ERROR_INVALUD_VALUE #72

Open
rubyFeedback opened this issue Sep 3, 2022 · 1 comment
Open

Some odd problem: GR3_ERROR_INVALUD_VALUE #72

rubyFeedback opened this issue Sep 3, 2022 · 1 comment

Comments

@rubyFeedback
Copy link

Error is:

/root/.gem/gems/ruby-gr-0.66.0.0/lib/gr3.rb:128:in `block (2 levels) in <module:CheckError>': GR3 error /home/Temp/rbt/gr-0.66.0/lib/gr3/gr3.c 1988 GR3_ERROR_INVALID_VALUE (RuntimeError

I tried the following sample you supplied:

# frozen_string_literal: true

# RDatasets
# https://github.com/kojix2/rdatasets

require 'rdatasets'
require 'gr/plot'

passenger = RDatasets.datasets.AirPassengers
time = passenger.at(0).to_a
value = passenger.at(1).to_a

opts = { title: 'Air Passenger numbers from 1949 to 1961',
         ylabel: "Passenger numbers (1000's)",
         xlabel: 'Date' }
GR.plot(time, value, opts)
sleep 1.5
GR.step(time, value, opts)
sleep 1.5
GR.stem(time, value, opts)
sleep 1.5
GR.barplot(time, value, opts)
sleep 1.5

volcano = RDatasets.datasets.volcano.to_matrix.to_a.transpose

# Fixme
volcano = Numo::DFloat.cast(volcano)

opts = { title: "Auckland's Maunga Whau Volcano" }
GR.contour(volcano, opts)
sleep 1.5
GR.tricont(volcano, opts)
sleep 1.5
GR.contourf(volcano, opts)
sleep 1.5
GR.heatmap(volcano, opts)
sleep 1.5
GR.surface(volcano, opts)
sleep 1.5
GR.trisurf(volcano, opts)
sleep 1.5
GR.wireframe(volcano, opts)
sleep 1.5

Not sure what the error is. I installed the latest GR Linux 64 binary. gem install
for GR worked too.

Prior to the above error I get tons of this:

GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine POLYLINE
GKS: GKS not in proper state. GKS must be either in the state WSAC or SGOP in routine TEXT

I'll try some of the simpler examples next.

@kojix2
Copy link
Member

kojix2 commented Sep 4, 2022

The error is occurring at the C gr3.
Do the other samples work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants