Skip to content

Commit

Permalink
replaced code block with function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Sandberg committed Nov 11, 2024
1 parent 613c5c0 commit 3776803
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions python/preliminaries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,11 @@
"from DTA.enrichment_plotters import polar_plot, get_file_list, get_helices, read_rep\n",
"from DTA.polarDensity_helper import Coord_Get, get_header_info\n",
"from DTA.site_distributions import outline_site, make_symmetric_sites, combine_sites, plot_density, Site\n",
"from plotting import make_custom_colormap\n",
"my_cmap = make_custom_colormap()\n",
"plt.rcParams['axes.grid'] = False "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Enrichment plot colormap\n",
"from matplotlib.colors import ListedColormap\n",
"depleted = plt.cm.get_cmap('RdGy_r', 256)\n",
"enriched = plt.cm.get_cmap('bwr', 256)\n",
"newcolors = np.concatenate([depleted(np.linspace(0.35, 0.5, 128)), enriched(np.linspace(0.5,1,128))])\n",
"my_cmap = ListedColormap(newcolors)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -382,7 +370,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "jupEnv",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -396,7 +384,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 3776803

Please sign in to comment.