Wolfram Blog
Tim Shedelbower

New in the Wolfram Language: PlotThemes for Gauges

March 27, 2015 — Tim Shedelbower, Visualization Developer

Array of gauges

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.

Multi-column customizable gauges

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.

Using PlotTheme to create a pre-styled gauge

Here is a sample of the themes for AngularGauge.

themes for gauges using the AngularGauge function

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.

Using $PlotTheme to create 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.

Using WeatherData to create a dashboard displaying weather with gauges in a specific 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.

Creating your own gauge style within PlotTheme

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.

Download this post as a Computable Document Format (CDF) file.

Leave a Comment

6 Comments


Lou

Great visuals! It seems that the dynamic demo with 3 clocks generates ann error (about Ticks specification). Hope to see this soon in Mathematica Home Edition.

Posted by Lou    March 29, 2015 at 5:13 am
Tim

Thanks for the comment Lou. If you remove $PlotTheme=”Business” the demo will work properly in earlier versions.

Posted by Tim    March 31, 2015 at 11:34 am
John

Cool feature! If you could post the code as text and not as a picture it would be easier to try out.

Posted by John    May 8, 2015 at 3:47 pm
Tim Shedelbower

A notebook with the code should be available for download soon.

Posted by Tim Shedelbower    May 14, 2015 at 11:43 am
Gary Bass

How simple would this translate to Apple watch on two or three screens?..

Posted by Gary Bass    October 2, 2015 at 9:23 pm
Tim Shedelbower

Gary, the blog “Instant Apps for the Apple Watch with the Wolfram Language” has an example at the end which uses ClockGauge.

http://blog.wolfram.com/2015/04/28/instant-apps-for-the-apple-watch-with-the-wolfram-language/

Posted by Tim Shedelbower    October 5, 2015 at 10:42 am


Leave a comment in reply to Tim

Loading...

Or continue as a guest (your comment will be held for moderation):