<jupyter_start><jupyter_text>Simple plot of a 2D image![plot2D](img/plot2D_sino.png)- http://www.silx.org/doc/silx/dev/modules/gui/plot/plotwindow.html- http://www.silx.org/doc/silx/dev/modules/gui/plot/getting_started.html  load data from data/sinogram.edf<jupyter_code>import numpy
from silx.gui.plot import Plot2D

import fabio 
data=fabio.open('data/sinogram.edf').data<jupyter_output><empty_output><jupyter_text>Plot the image- using Plot2D class    - addImage<jupyter_code>...<jupyter_output><empty_output><jupyter_text>Change the color map- using setDefaultColormap    - a colormap id defined by a dictionnary :        - colormap = {'name': 'inferno', 'normalization': 'linear',            'autoscale': True, 'vmin': 0.0, 'vmax': 1.0}<jupyter_code>...<jupyter_output><empty_output><jupyter_text>origin keyword- define the center of the image to (100, 100) during the call of addImage(..., origin=(...), ...)<jupyter_code>...<jupyter_output><empty_output><jupyter_text>scale keyword- scale the image of a factor (0.1, 0.1) during the call of addImage<jupyter_code>...<jupyter_output><empty_output><jupyter_text>multiple imagecreate the ascent plot (data is in data/ascent.h5) using only :- data- Plot2D functions![ascents plot](img/plot2D_ascent_double.png)  load data<jupyter_code># input using .hdf5
import h5py
dataPath='data/ascent.h5'
f=h5py.File(dataPath)
data=data = numpy.array(f['data'], dtype='float64')<jupyter_output><empty_output><jupyter_text>plot data<jupyter_code>...<jupyter_output><empty_output><jupyter_text>Control axes- change title, X and Y labels    - setGraphTitle    - setGraphXLabel    - setGraphYLabel<jupyter_code>...<jupyter_output><empty_output><jupyter_text>x and y limitsget the following display:    - using setGraphXLimits    - using setGraphYLimits![lena](img/plot2D_ascent_area.png).<jupyter_code>...<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1372863247863248, 'fraction_numerical': 0.015491452991452992, 'mean_word_length': 5.71326164874552, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '638226', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 710, 'n_tokens_neox': 688, 'n_words': 127, 'path': 'silx/plot/Plot2DExercise.ipynb', 'repo_name': 't20100/silx-training', 'size': '1872'}