Code Monkey home page Code Monkey logo

visualize's Introduction

Visualize


Here are some plots:

2D Plots (Scatter-plot, Step-plot, Bar-plot, Fill Between-Plot)

fig, axes = plt.subplots( 1, 4, figsize=(12,3))
axes[0].scatter( x, x + 0.25*np.random.randn( len(x)))
axes[0].set_title("scatter")

axes[1].step( n, n**2, lw=2 )
axes[1].set_title("step")

axes[2].bar( n, n**2, align="center", width=0.5, alpha=0.5)
axes[2].set_title("bar")

axes[3].fill_between( x, x**2, x**3, color="green", alpha=0.5 )
axes[3].set_title("fill_between")

2D Plots

A 3D Plot (Contour plots with projection)

fig = plt.figure( figsize=( 12,10 ) )
ax = fig.add_subplot( 1,1,1, projection='3d' )
ax.plot_surface( X, Y, Z, rstride=4, cstride=4, alpha=0.25,cmap='plasma' )
cset = ax.contour( X, Y, Z, zdir='z', offset=-np.pi, cmap='gist_earth' )
cset = ax.contour( X, Y, Z, zdir='x', offset=-np.pi, cmap='gist_earth' )
cset = ax.contour( X, Y, Z, zdir='y', offset=3*np.pi, cmap='gist_earth' )
ax.set_xlim3d( -np.pi, 2*np.pi)
ax.set_ylim3d( 0, 3*np.pi )
ax.set_zlim3d( -np.pi, 2*np.pi )

3D plot

Heatmap

flights = sns.load_dataset( 'flights' )
fpt=flights.pivot_table( index='month',columns='year',values='passengers' )
sns.heatmap( fpt, cmap='coolwarm' )

Heatmaps

Linear Model Plot

tips = sns.load_dataset('tips')
sns.lmplot(x='total_bill',y='tip',data=tips,hue='sex',markers=['o','v'],scatter_kws={'s':100})

LM Plot

Joint Plot

tips = sns.load_dataset('tips')
sns.jointplot(x='total_bill',y='tip',data=tips,kind='hex')

Joint Plot

visualize's People

Contributors

subhamsarangi avatar

Watchers

James Cloos avatar  avatar

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.