Skip to content

Instantly share code, notes, and snippets.

View nipunbatra's full-sized avatar

Nipun Batra nipunbatra

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap as Basemap
from matplotlib.colors import rgb2hex
from matplotlib.patches import Polygon
import pandas as pd
m = Basemap(projection='merc')
shp_info = m.readshapefile(
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OS: Linux-3.5.0-36-generic-x86_64-with-Ubuntu-12.10-quantal
System version: 2.7.3 (default, Apr 10 2013, 05:13:16)
[GCC 4.7.2]
Numpy version: 1.6.2
Matplotlib version: 1.1.1
Pandas version: 0.11.1.dev-58642a6
Scikit-learn version: 0.12.1
from nilmtk.plots import latexify, format_axes
import matplotlib.pyplot as plt
latexify(columns=1)
from mpltools import style
style.use('ggplot')
x = ["India", "USA", "China", "Korea", "Australia"]
y = [47, 29, 34, 26, 20]
fig, ax = plt.subplots()
ax.bar(range(len(y)), y)
format_axes(ax)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.