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

Plotting with DateTime fails with NoMethod error #462

Closed
danluu opened this issue Oct 15, 2014 · 6 comments
Closed

Plotting with DateTime fails with NoMethod error #462

danluu opened this issue Oct 15, 2014 · 6 comments

Comments

@danluu
Copy link

danluu commented Oct 15, 2014

This is with .3, fetched from 0.3-release and with updated packages from about 30 minutes before filing this issue (0.3.2-pre+55).

I have a dataframe with DateTime objects and Ints

23798x3 DataFrame
| Row   | x                   | y  | label     |
|-------|---------------------|----|-----------|
| 1     | 2014-09-17T13:54:00 | 5  | "Players" |
...

If I try to plot this with

julia> plot(df, x = :x, y = :y, color=:label, Geom.line)

I get

Error showing value of type Plot:
ERROR: `one` has no method matching one(::Type{DateTime})

This also fails the same way with this simplified code:

using Dates
using DataFrames
using Gadfly

a = [unix2datetime(100)]
b = [10]

df = DataFrame(x=a, y=b, label="wat")
plot(df, x=:x, y=:y, Geom.point)

As far as I can tell, I'm doing the same thing as #189.

@swadey
Copy link

swadey commented Oct 25, 2014

seeing exactly the same issue with Bars

@danluu
Copy link
Author

danluu commented Oct 25, 2014

@swadey BTW, if you need a quick workaround for this, converting to unix time and plotting against that works, if you don't mind either having huge numbers as x-labels or fixing up the x-labels.

@swadey
Copy link

swadey commented Oct 25, 2014

Yeah, I’ve been converting to string so that I can preserve the format of xlabels.

thanks,
wade

On Oct 25, 2014, at 2:27 PM, Dan Luu [email protected] wrote:

@swadey BTW, if you need a quick workaround for this, converting to unix time and plotting against that works, if you don't mind either having huge numbers as x-labels or fixing up the x-labels.


Reply to this email directly or view it on GitHub.

@danluu
Copy link
Author

danluu commented Dec 29, 2014

To follow up with a discussion on the mailing list with @StefanKarpinski, this fails with the current .3 release binary (not the nightly). There's also an odd bug in the current release's make that causes a -bash command not found to pop up, but that should probably be separate bug in julia base.

Editing to update: on a second build after a make cleanall, I didn't get the -bash command not found on building, so not sure what that's about.

@ihnorton
Copy link

Ping @quinnj

@dcjones
Copy link
Collaborator

dcjones commented Dec 30, 2014

This isn't exactly a regression or bug. There was only ever support for plotting Date, which I never got around to extending to DateTime.

The cryptic error message is really unfortunate. I need to figure out a better way of reporting a type as "unplottable" without it just failing mysteriously.

I'm working on adding DateTime support now.

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

4 participants