<jupyter_start><jupyter_text>Pan and ZoomThis widget ports the functionality of the yt pixelization function to Rust, and then to WebAssembly, so that the actual change in the image is conducted in the browser.  Once the display has been created, no further contact with the server is necessary to get new data!  It will pass some info back and forth (such as bounds and the like) but all of the actual visualization is occuring locally, in the browser, and is thus much faster with lower latency.It may appear blank at first, in which case you will need to toggle one of the viewable parameters, such as the colormap log scaling, to ensure an image appears.<jupyter_code>import widgyts
import yt<jupyter_output><empty_output><jupyter_text>yt has several example datasets (and a number of tutorials on reading and analyzing its data) that are available on [its webpage](http://yt-project.org/data/). This example will use the IsolatedGalaxy dataset. If you do not have IsolatedGalaxy on your machine, please download and unzip it from http://yt-project.org/data/IsolatedGalaxy.tar.gz. yt's load function searches a for a user-configurable datapath (in addition to the current working directory). If you'd like to learn more about setting up your datapath for yt so that you can store your data centrally, see the documentation on configuring the `test_data_dir` on [this page](http://yt-project.org/doc/reference/configuration.htmlavailable-configuration-options). The next cell loads IsolatedGalaxy as if it is in the `test_data_dir folder`.<jupyter_code>ds = yt.load_sample("IsolatedGalaxy")
s = ds.r[:, :, 0.5]
ss = s.display("density")
ss<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06399521531100479, 'fraction_numerical': 0.0011961722488038277, 'mean_word_length': 5.196296296296296, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '160922', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 468, 'n_tokens_neox': 446, 'n_words': 226, 'path': 'examples/galaxy_display.ipynb', 'repo_name': 'data-exp-lab/yt-canvas-widget', 'size': '1672'}