Giter Club home page Giter Club logo

gads11-nyc-summer2014's People

Contributors

aidaliz avatar aribajahan avatar benjaminmgross avatar benjaminsingleton avatar datadave avatar deeps17 avatar dinob0t avatar dmitriymolchanov avatar drueda avatar dturbay2 avatar dukesan01 avatar dutycycle avatar gehui avatar guccithecarpenter avatar harshigopal avatar jrcarli avatar julialintern avatar justindata avatar krupny avatar lelgohary avatar lemonsoup avatar mshait avatar patwmcnamara avatar podopie avatar raphillips avatar robertdavidwest avatar saurabh-ga avatar seanpquig avatar venus35 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gads11-nyc-summer2014's Issues

Displaying a pandas.DatetimeIndex as a date inside matplotlib.pyplot.colorbar()

If I run the following lines of code I get a nice scatter plot of two variables from the dataframe with the dateseries visualized using color over the scatterplot using a colormap. So I also add the colorbar:

import pandas
import numpy
import matplotlib.pyplot as plt

dates = pandas.date_range('1/1/2000', periods=8)
df = pandas.DataFrame(randn(8, 2), index=dates, columns=['A', 'B'])
plt.scatter(df['A'],df['B'],c=df.index)
plt.colorbar()

and you get the following output:

colorbar_example

I would like to display the dates as dates rather than integers in the colorbar. I've tried to run the following:

import pandas
import numpy
import matplotlib.pyplot as plt
import matplotlib

dates = pandas.date_range('1/1/2000', periods=8)
df = pandas.DataFrame(randn(8, 2), index=dates, columns=['A', 'B'])
plt.scatter(df['A'],df['B'],c=df.index)
plt.colorbar(format=matplotlib.dates.DateFormatter('%b %d %Y'))

but I get this error:

OverflowError: signed integer is greater than maximum

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.