For most scientists, there is a ton of utility in switching between colormaps. Here I describe a less commonly-used method to get even more from your colormap.

If you’re like me and you learn by reading code, feel free to skip to the end for a code snippet from MATLAB.

When would you want to do this?


Joining tables is an art and the benefits and consequences of joining are not always be clear. Here, I’ll describe a simple case that works well even for a beginner learning to use tables.

Joining for enhanced boxplots

Here, I’ll use the generic join to spruce up a boxplot and accentuate a pattern in…


I used to agonize over adding best fit lines and shaded error plots to my data. There were occasionally custom .m files passed between people online or in the lab, but these would quickly break or fail to apply to my particular use case. …


If you’re lucky enough to have imaging data that you can analyze without turning to contemporary machine learning approaches or you just need a first pass, MATLAB’s regionprops is a handy tool with a lot of functionality.

Today I’ll show how you can combine some of the

First let’s make…


As you acquire, store and analyze data, you will likely encounter many different variable types and data structures in MATLAB. These different data types may appear in your MATLAB workspace as the product of built-in or custom MATLAB functions, but you may also find that for some of your data…


In MATLAB, the outputs of sort and unique go beyond what their names suggest. They are both valuable tools for data analysis.

There are situations when you may want to return the order of your data. For example, to sort another data set. Other times, however, you may want to…


When it comes to making a custom vector or matrix containing exactly the data you want, accumarray offers a fast and readable solution.

That’s it. That’s the post! Basically, accumarray gives you the ability to throw elements of a second array (colored squares) into the positions specified by the first…


One of the problems with some of MATLAB’s built-in statistics functions is that they break when any of the input values are NaN. In this post I’ll show you a great opportunity to build on some of MATLAB’s extremely useful NaN-friendly versions of sum, mean, and std. …


Many of the tips that I outline in my ‘30 Days of MATLAB Tips’ rely on setting properties that most people don’t know about. Anyone can use the set function without any arguments to peek at all the possible properties and settings of a MATLAB object. Many of these properties…


If you want to make plots with displays that you can manipulate, this is the post for you. However, unless you already have experience using dynamic cursor mode, you will want to first jump over to my posts from Day 10 and Day 11.

It’s great to show the averages…

Neurojojo

Neuroscientist and data scientist at Columbia University. On Twitter: @NeuroJoJo

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store