Skip to content

Instantly share code, notes, and snippets.

@ahmohamed
Last active October 16, 2015 22:37
Show Gist options
  • Save ahmohamed/3e7ed858c13480b852c4 to your computer and use it in GitHub Desktop.
Save ahmohamed/3e7ed858c13480b852c4 to your computer and use it in GitHub Desktop.
Specdraw interactive view mode: 2D HSQC spectra of amygdalin

This example demonstrate using SpecdrawJS in interactive view mode. This mode is most suitable for spectral databases, as it allows zooming, viewing of multiple spectra (i.e datasets) in the same App. Interactive view mode doesn't support peak picking, integration, binning or saving spectra as images.

NB: Use mouse wheel (scroll) to zoom on the z-axis (intensify peaks in the spectrum).

For details about SpecdrawJS.

For more examples see NMRPro.

<!DOCTYPE html>
<meta charset="utf-8">
<title>SpecdrawJS: Full client-side mode - SampleSet spectra</title>
<link rel="stylesheet" href="https://rawgit.com/ahmohamed/specdraw.js/master/specdraw.min.css" type="text/css">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="https://rawgit.com/ahmohamed/specdraw.js/master/specdraw.js"></script>
<style type="text/css">
#container {
width:960px;
height:500px;
}
</style>
<body>
<div id="container"></div>
<script>
var spec_app = specdraw.App().config(2)
.data('http://mamitsukalab.org/tools/nmrpro/nmrpro/spectrum/bmse000139_hsqc.ft2?connected=0');
d3.select('#container').call(spec_app);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment