Giter Site home page Giter Site logo

setten / periodic-table-plotter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wolverton-research-group/periodic-table-plotter

0.0 1.0 0.0 1.37 MB

Make periodic table map plots and pettifor-style trend plots.

License: MIT License

Python 100.00%

periodic-table-plotter's Introduction

periodic-table-plotter

Build Status

Make a periodic table that plots 1-4 values per tile, easily configure grids of pair-wise elemental data (with 1-4 values per tile) and create pettifor-style trend plots.

Periodic table with one value per tile

def eneg(elt):
    """Electronegativity"""
    return elt['electronegativity']

epd = ElementDataPlotter()
epd.ptable([eneg])
plt.show()

Single value colormap

Periodic table with two values per tile

def mass(elt):
    """Mass"""
    return elt['mass']

epd = ElementDataPlotter()
epd.ptable([eneg, mass])
plt.show()

Double value colormap

Periodic table with three values per tile

def rat(elt):
    """Mass/Electronegativity"""
    return elt['electronegativity']/elt['mass']

epd = ElementDataPlotter()
epd.ptable([eneg, mass, rat])
plt.show()

Triple value colormap

Periodic table with four values per tile

def atomic_number(elt):
    """Atomic number"""
    return elt['z']

epd = ElementDataPlotter()
epd.ptable([eneg, mass, rat, atomic_number])
plt.show()

Quadrupel value colormap

Pettifor style map:

elts = ['H', 'Li', 'Be', 'Fe', 'Ni', 'Pd', 'Pt', 'F', 'Xe', 'O', 'S']
epd = ElementDataPlotter(elements=elts)
epd.pettifor(mass, eneg)
plt.savefig('pettifor.png', bbox_inches='tight')
plt.show()

Pettifor map

Grid of pair-wise elemental data:

elts = [ 'Ti', 'V', 'Sc', 'Ni', 'Co', 'Fe' ]
epd = ElementDataPlotter()
epd.make_grid(xelts=elts, yelts=elts)
plt.show()

Pair data

periodic-table-plotter's People

Contributors

skirklin avatar wardlt avatar

Watchers

 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.