New in the Wolfram Language: PlotThemes for Gauges
March 27, 2015 — Tim Shedelbower, Visualization Developer
The first gauge I remember was a blue wrist watch I received from my parents as a child. Their hope was probably to correct my tardiness, but it proved valuable for more important tasks such as timing bicycle races. Today digital gauges help us analyze a variety of data on smart phones and laptops. Battery level, signal strength, network speed, and temperature are some of the common data elements constantly monitored.
Gauges have been a part of the Wolfram Language for a few years.
PlotTheme is an exciting new addition to gauges that provides instant styling. A theme name is the only item required. The theme automatically calls the necessary options to create a pre-styled gauge.
Here is a sample of the themes for AngularGauge.
Incorporating gauges into your work is simple. In fact, you might find using multiple gauges in the same notebook a common occurrence. Set the theme for an entire notebook with the global variable $PlotTheme. For example, to set all gauges of a notebook to the “Web” theme, just evaluate $PlotTheme = “Web”. $PlotTheme can also be used for a cluster of gauges within a single cell, as in the following time zone example.
As with time, the weather always seems to have our attention. A weather dashboard is a convenient way of monitoring current weather conditions. Construct the dashboard using WeatherData, which is included in the Wolfram Language. It gives current and historical weather data for all standard weather stations worldwide. AngularGauge will display the wind direction and speed, while VerticalGauge displays the temperature. GeoGraphics is used for the location.
Interested in building your own weather station? Arnoud Buzing explains the details in a previous blog post. Interested in styling your own gauges? I can help. You might be wondering if it’s possible to change a particular aspect of a theme. User options automatically override PlotTheme, so altering a theme component or color is absolutely possible and encouraged. In essence, a theme can be a starting point for creating your own gauge styles.
The world is full of constantly changing data, so what better way to visualize the data than with a colorful gauge from the Wolfram Language. PlotTheme handles the task of styling, so implementing a gauge has never been easier. Visit the Gauges documentation page for more information. PlotTheme details can be found in the options section of each gauge documentation page. The gauges are AngularGauge, BulletGauge, ClockGauge, HorizontalGauge, ThermometerGauge, and VerticalGauge.
Version 10.1 of the Wolfram Language is now supported in Mathematica and rolling out in all other Wolfram products.