Wolfram Computation Meets Knowledge

New in the Wolfram Language: PlotThemes for Gauges

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

Download CDF

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.

Comments

Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.

6 comments

  1. 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.

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

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

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

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

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

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

    Reply