generate bubble plots - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Statistics : Statistics/BubblePlot

Statistics[BubblePlot] - generate bubble plots

Calling Sequence

BubblePlot(X, Y, Z, plotoptions)

BubblePlot['interactive'](X, Y, Z)

Parameters

X

-

first data sample

Y

-

second data sample

Z

-

third data sample

plotoptions

-

options to be passed to the plots[display] command

Description

• 

The BubblePlot command generates a bubble plot for the specified data. The center of each bubble is defined by the values of the corresponding points in the first and the second data sets. The size of the bubbles is proportionate to the magnitude of the corresponding point in the third data set. Filled bubbles represent positive values.

• 

The first parameter X is the first data sample - given as a Vector for example.

• 

The second parameter Y is the second data sample - given as a Vector for example.

• 

The third parameter Z is the third data sample - given as a Vector for example. Note, that X, Y, and Z must have the same number of elements.

• 

If the parameters X, Y, and Z all contain time series data (either time series objects or time series references), an animated plot will be generated by default, where the corresponding time series will define the position and size of the bubbles over time. This will not work with the ['interactive'] option.

• 

If the ['interactive'] option is used, a dialog box appears that allows for customized creation of the plot.

Examples

withStatistics:

X:=1,2,3,4,5,6,7,8,9,9:

Y:=1,4,2,3,3,1,5,1,5,5:

Z:=5,2,3,4,5,2,1,2,1,1:

This is the command to create the plot from the Plotting Guide using the data above.

BubblePlotX,Y,Z

Use time series data to create animated plots. Compare the GDP, industry share of GDP, and services share of GDP of a few countries.

withDataSets:

ds1:=VectorReferencequandl,WORLDBANK/USA_NV_SRV_TETC_ZS,Referencequandl,WORLDBANK/CAN_NV_SRV_TETC_ZS,Referencequandl,WORLDBANK/DEU_NV_SRV_TETC_ZS,Referencequandl,WORLDBANK/JPN_NV_SRV_TETC_ZS

ds1:=Data setUnited States: Services, etc., value added (% of GDP)Quandl WORLDBANK/USA_NV_SRV_TETC_ZSup to 42 rows (annual), 1 column1970-12-31 - 2011-12-31Data setCanada: Services, etc., value added (% of GDP)Quandl WORLDBANK/CAN_NV_SRV_TETC_ZSup to 41 rows (annual), 1 column1970-12-31 - 2010-12-31Data setGermany: Services, etc., value added (% of GDP)Quandl WORLDBANK/DEU_NV_SRV_TETC_ZSup to 41 rows (annual), 1 column1970-12-31 - 2010-12-31Data setJapan: Services, etc., value added (% of GDP)Quandl WORLDBANK/JPN_NV_SRV_TETC_ZSup to 43 rows (annual), 1 column1970-12-31 - 2012-12-31

(1)

ds2:=VectorReferencequandl,WORLDBANK/USA_NV_IND_TOTL_ZS,Referencequandl,WORLDBANK/CAN_NV_IND_TOTL_ZS,Referencequandl,WORLDBANK/DEU_NV_IND_TOTL_ZS,Referencequandl,WORLDBANK/JPN_NV_IND_TOTL_ZS

ds2:=Data setUnited States: Industry, value added (% of GDP)Quandl WORLDBANK/USA_NV_IND_TOTL_ZSup to 42 rows (annual), 1 column1970-12-31 - 2011-12-31Data setCanada: Industry, value added (% of GDP)Quandl WORLDBANK/CAN_NV_IND_TOTL_ZSup to 41 rows (annual), 1 column1970-12-31 - 2010-12-31Data setGermany: Industry, value added (% of GDP)Quandl WORLDBANK/DEU_NV_IND_TOTL_ZSup to 44 rows (annual), 1 column1970-12-31 - 2013-12-31Data setJapan: Industry, value added (% of GDP)Quandl WORLDBANK/JPN_NV_IND_TOTL_ZSup to 43 rows (annual), 1 column1970-12-31 - 2012-12-31

(2)

ds3:=VectorReferencequandl,ODA/USA_PPPGDP,Referencequandl,ODA/CAN_PPPGDP,Referencequandl,ODA/DEU_PPPGDP,Referencequandl,ODA/JPN_PPPGDP

ds3:=Data setUnited States Country GDP based on PPP Valuation, USD BillionsQuandl ODA/USA_PPPGDPup to 40 rows (annual), 1 column1980-12-31 - 2019-12-31Data setCanada Country GDP based on PPP Valuation, USD BillionsQuandl ODA/CAN_PPPGDPup to 40 rows (annual), 1 column1980-12-31 - 2019-12-31Data setGermany Country GDP based on PPP Valuation, USD BillionsQuandl ODA/DEU_PPPGDPup to 40 rows (annual), 1 column1980-12-31 - 2019-12-31Data setJapan Country GDP based on PPP Valuation, USD BillionsQuandl ODA/JPN_PPPGDPup to 40 rows (annual), 1 column1980-12-31 - 2019-12-31

(3)

BubblePlotds1,ds2,ds3,data_legend=Services share of GDP,Industry share of GDP,GDP (PPP),bubble_legend=USA,Canada,Germany,Japan

Set the time range to one year, frames to daily, half the bubble sizes, and add a title.

BubblePlotds1,ds2,ds3,data_legend=Services share of GDP,Industry share of GDP,GDP (PPP),bubble_legend=USA,Canada,Germany,Japan,time_range=1999-01-01..1999-12-31,frames=daily,bubble_scale=0.5,title=GDP in 1999

Generate a single non-animated plot with time series.

BubblePlotds1,ds2,ds3,data_legend=Services share of GDP,Industry share of GDP,GDP (PPP),bubble_legend=USA,Canada,Germany,Japan,time_range=2005-03-15

See Also

Statistics, Statistics[PointPlot], Statistics[QuantilePlot], Statistics[Visualization]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam