Skip to content

Instantly share code, notes, and snippets.

@anilnairxyz
Last active August 12, 2016 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anilnairxyz/90a7199ec72b37d345692e683fdc33dc to your computer and use it in GitHub Desktop.
Save anilnairxyz/90a7199ec72b37d345692e683fdc33dc to your computer and use it in GitHub Desktop.
Financial charts with Matplotlib
height:400

Some financial charts using Python package Matplotlib. The code for generation of these charts at Github.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="demobox">
<div class="button">
<h4 onclick="changeIt('candlestick');">candlestick</h4>
</div>
<div class="button">
<h4 onclick="changeIt('bollinger');">bollinger band</h4>
</div>
<div class="button">
<h4 onclick="changeIt('autoregress');">auto regression</h4>
</div>
<div class="button">
<h4 onclick="changeIt('regression');">regression</h4>
</div>
<div id="main">
<img class="large" src="candlestick.png"/>
</div>
</div> <!-- demobox -->
<script type="text/javascript">
function changeIt(type)
{
var obj = document.getElementById("main");
var imgTag = "<img class='large' src='"+type+".png'>";
obj.innerHTML = imgTag;
return;
}
</script>
</body>
</html>
#demobox { width: 620px; float: center; margin: auto; }
.button {
float: left;
margin: 10px 5px;
position: relative;
height: auto;
width: 142px;
border-radius: 5px;
background: url(thumbnail.png);
filter: blur(12px);
text-align: center;
}
.button h4 {
font-family: sans-serif;
color: lightgreen;
text-decoration: none;
cursor: pointer;
}
.large {
margin: 0 5px;
border-radius: 5px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment