Avatar

Plotly Blog

@plotlyblog / blog.plotly.com

Avatar

Streamtubes in Plotly with Python

🌟 Before we introduce this seriously cool visualization, we’d like to announce that plotly.py has surpassed 5 million downloads! Thank you for helping us reach this milestone! 🙌

Once Upon a Time 🕰 It was the year 2008. If you wanted to create 3-D plots for interactive scientific data visualization, the Mayavi Python library was your go-to. The charts may have looked slick for their time, but it doesn't take a rocket scientist to tell you that we've come a long way. See for yourself:

Mayavi Streamtube Example, circa 2008

Plotly Streamtube Example, 2018

Avatar

Cone Plots in Plotly with Python

So what's a 3-D vector?

∙ A vector is a geometric object that has magnitude and direction. ∙ A 3-D vector is useful in any physical space where both magnitude and direction matter. ∙ In 3-D space, vectors are identified with triples of scalar components. In the case of the example image below: a = (ax, ay, az)

Avatar

What is a FIPS code? County-level charts in Python

FIPS codes are five-digit codes that are assigned to each U.S. county.The first two digits identify the state and the last three identify the county. Think of it like a fancy version of a ZIP Code or postal code that distinguishes a county. FIPS codes are easier to utilize in data and information systems than state and county names. This makes datasets that come packaged with FIPS codes a portal into national, state, and county-level graphical and/or statistical analyses for a variety of topics.

Avatar

Where science meets art

Data visualizations such graphs, charts, presentations, and reports represent the intersection point of your company’s data, statistics, and numbers (i.e. science) and its brand, style, and personality (i.e. art). However, this “marriage” of science and art will only be a successful one if the platform it is presented on is simple, effective, and beautiful. “Design is not just what it looks like and feels like. Design is how it works.” -Steve Jobs This is where Plotly’s dashboards, reports, and presentations come in — to bridge the gap between what your creation looks and feels like, and how it works. Plotly gives you the tools and examples to make beautiful dashboards and reports, even if you’re not trained in design. In this post, we’ll teach you how to be situationally aware when it comes to choosing graph types. Additionally, we’ll show you how easy it is to apply your brand’s style guide, from the logo to the color palette, to a Plotly product. Inspiration for this post stems from IBM’s Design Language data visualization guidelines and therefore we created some IBM-branded graphs, reports, and presentations in Plotly. We recently provided some dashboard and slide deck templates that you can use — now we’ll expand on that work, personalizing your figures and applying industry-leading techniques to ensure the best visualizations possible.

How it works

Let’s go through several different chart types. We’ll address how to best utilize each type of graph according to IBM’s data visualization language. We’ll later use these to construct our Dashboard and Report. Line chart, costs vs revenues: “Line graphs are used to track changes over short and long periods of time. When smaller changes exist, it’s better to use line graphs than bar graphs. Line graphs can also be used to compare changes over the same period of time for more than one group.”

Line chart, units sold over time: “Avoid [line charts] if not comparing values over time, as it might create confusion. Select a bar graph in this case.”

Bar chart, revenue by year: “Rectangular bars with lengths proportional to the values they represent. Bar graphs should be used to compare different values that are hierarchically equivalent. Using a colored element among gray elements makes the focus of the chart clear to the reader.”

Stacked bar chart, evaluation of manager by department: “A variant of the bar graph, where each rectangle is divided in multiple parts. Stacked bar charts are good for comparing elements across categories. In this example, a diverging palette is especially effective — the two opposing values have a positive/negative connotation.”

Pie chart, comparison of revenue subdivision: “Use only when the different values add up to a total and there is a need to highlight percentages.”

Bubble chart, students by faculty: “Used to show values among categories or groups with circles, avoiding any kind of axis. Use it as alternative to bar chart.”

Map, temperature variations across the USA: “Cartography is used to display geographical data. Use it when the focus of the analysis is geography, and when it’s important to zoom in on different places.”

What it looks like

Notice we’ve applied IBM’s color palette and logo to our dashboard and slide deck below [click here to reference the color palette]. If you’re on a Mac, you can use Digital Color Meter to ‘color pick’ off your screen. Windows users might try paint. Pro tip: simple touches like this not only make your figures look more sleek but also reputable, professional—it readies it for the big stage (i.e. a presentation for the execs) in a jiffy.

When using Slide Deck, make your graphs as large as possible and use at least 50 size-font for slide titles; match your charts background color to the color of the slide deck (we recommend white or light gray). Your presentation should tell a story and not be a lecture — your goal should be to not only convey information to your audience, but inject some of your passion and expertise about the topic(s) into them. Consider it a journey that you are taking together and reach the finish line at the same time! A limited text-plentiful graphic combination will set you on the right path…

Avatar

Teach Yourself Code-Free Chart Animations with Secret Messages

Plotly's latest invention? Something akin to "invisible ink." That's right -- Plotly users can harness our new animation functionality to create charts, code-free (!), with secret messages. One of the earliest writers to mention invisible ink was Aeneas Tacticus over 2400 years ago. Since then, several others applied varying techniques to craft secret messages: Pliny the Elder and the Roman poet Ovid gave advice on the use of plant juices and milk to write secret messages, similar to what George Washington used during the American Revolution. But this is not George Washington's invisible ink -- this is the 21st century edition: 1. Keep your hands clean: no sticky substances like plant juice and milk needed to create it. 2. No ultraviolet light needed to read it. 3. All digital! Super flash.

From this:

To this:

Avatar

Bioinformaticians in Plotly

Bioinfo-what?! At Plotly, we're proud of our diverse and talented user base. In this post, we show off the work of our bioinformaticians. In case you didn't know: Bioinformatics is an interdisciplinary field that develops methods and software tools for understanding biological data. As an interdisciplinary field of science, bioinformatics combines computer science, statistics, mathematics, and engineering to analyze and interpret biological data.

You are using an unsupported browser and things might not work as intended. Please make sure you're using the latest version of Chrome, Firefox, Safari, or Edge.