<jupyter_start><jupyter_text>Most examples work across multiple plotting backends, this example is also available for:* [Bokeh - scatter_economic](../bokeh/scatter_economic.ipynb)<jupyter_code>import pandas as pd
import holoviews as hv
from holoviews import dim, opts

hv.extension('matplotlib')
hv.output(dpi=100)<jupyter_output><empty_output><jupyter_text>Declaring data<jupyter_code>macro_df = pd.read_csv('http://assets.holoviews.org/macro.csv', '\t')
key_dimensions   = [('year', 'Year'), ('country', 'Country')]
value_dimensions = [('unem', 'Unemployment'), ('capmob', 'Capital Mobility'),
                    ('gdp', 'GDP Growth'), ('trade', 'Trade')]
macro = hv.Table(macro_df, key_dimensions, value_dimensions)<jupyter_output><empty_output><jupyter_text>Plot<jupyter_code>gdp_unem_scatter = macro.to.scatter('Year', ['GDP Growth', 'Unemployment'])
gdp_unem_scatter.overlay('Country').opts(
    opts.Scatter(color=hv.Cycle('tab20'), edgecolors='k', show_grid=True,
                 aspect=2, fig_size=250, s=dim('Unemployment')*20,
                 show_frame=False),
    opts.NdOverlay(legend_position='right'))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1582608695652174, 'fraction_numerical': 0.009565217391304347, 'mean_word_length': 6.19375, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '383686', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 432, 'n_tokens_neox': 404, 'n_words': 65, 'path': 'examples/gallery/demos/matplotlib/scatter_economic.ipynb', 'repo_name': 'ppwadhwa/holoviews', 'size': '1150'}