Skip to content

Commit

Permalink
Merge pull request #1688 from pllim/doc-imviz-multi-plot-options
Browse files Browse the repository at this point in the history
DOC: Imviz plot options example with select all
  • Loading branch information
pllim authored Sep 30, 2022
2 parents 544694c + fa66066 commit 970a915
Showing 1 changed file with 59 additions and 1 deletion.
60 changes: 59 additions & 1 deletion notebooks/concepts/imviz_load_fits_hdu.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,64 @@
"imviz.show()"
]
},
{
"cell_type": "markdown",
"id": "7dddb1d6",
"metadata": {},
"source": [
"To programmatically control Plot Options so you can set some stuff for all data at once, see https://jdaviz.readthedocs.io/en/latest/api/jdaviz.configs.default.plugins.plot_options.plot_options.PlotOptions.html.\n",
"\n",
"The example below sets the same colormap for all images."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "436974df",
"metadata": {},
"outputs": [],
"source": [
"plot_options = imviz.plugins['Plot Options']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2b1d2bdf",
"metadata": {},
"outputs": [],
"source": [
"dir(plot_options)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dabf30e4",
"metadata": {},
"outputs": [],
"source": [
"plot_options.select_all()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a57719f5",
"metadata": {},
"outputs": [],
"source": [
"plot_options.image_colormap = 'Viridis'"
]
},
{
"cell_type": "markdown",
"id": "b1cce96a",
"metadata": {},
"source": [
"Close the FITS file pointer when you are done with this notebook."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -130,7 +188,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.4"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 970a915

Please sign in to comment.