<jupyter_start><jupyter_text>Export- Save Images  we can choose the format of the saving image in R.  - pdf  - png  - svg  Save ImagesWe can choose the format of the saving image in Python. To execute this examples, first, we have to import sample data.Write an image of the specified type to the specified file, at the specified scaling factor.Note: the file is written to the file system of the computer upon which R is running, not Cytoscape – in those cases where they are different. It is saved to the working directory.<jupyter_code># import data from url
from py2cytoscape.data.cyrest_client import CyRestClient

# Create REST client for Cytoscape
cy = CyRestClient()

# Reset current session for fresh start
cy.session.delete()

# Load a sample network
network = cy.network.create_from('http://chianti.ucsd.edu/~kono/data/galFiltered.sif')

# Apply layout to the cytoscape network object
cy.layout.apply(network = network)<jupyter_output><empty_output><jupyter_text>Save image as png---------------------------------------<jupyter_code># png
from IPython.display import Image
network_png = network.get_png()
Image(network_png)<jupyter_output><empty_output><jupyter_text>Save image as svg---------------------------------------<jupyter_code># svg
from IPython.display import SVG
network_svg = network.get_svg()
SVG(network_svg)<jupyter_output><empty_output><jupyter_text>Save image as pdf---------------------------------------<jupyter_code># pdf
network_pdf = network.get_pdf()

# save the file
f = open('resultImage/scale_free_500.pdf', 'wb')
f.write(network_pdf)
f.close()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14950372208436724, 'fraction_numerical': 0.0024813895781637717, 'mean_word_length': 3.772189349112426, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '611984', 'license': 'MIT', 'n_tokens_mistral': 490, 'n_tokens_neox': 474, 'n_words': 161, 'path': 'notebooks/cookbook/Python-cookbook/Export.ipynb', 'repo_name': 'idekerlab/cyrest-examples', 'size': '1612'}