Tag Archives: matplotlib

corrplot function in Python

Tweet We’ve implemented a corrplot function in Python, which is available in BioKit package – github https://github.com/biokit/biokit – pypi https://pypi.python.org/pypi/biokit For illustration, let us create some random data sets:

The correlation matrix is stored in the Pandas dataframe called … Continue reading

Posted in Python | Tagged , , , | 2 Comments

About matplotlib colormap and how to get RGB values of the map

Tweet matplotlib comes with lots of colormaps. First, let us see where and how to find them. Then, we will see how to extract individual colors (e.g., in RGB) from the colormap itself. Let us first creat an image

Continue reading

Posted in Python | Tagged | Leave a comment

matplotlib: difference between pcolor, pcolormesh and imshow

Tweet If you have a matrix and want to plot its content as an image, matplotlib provides some functions such as imshow and pcolor. Differences between imshow and pcolor Let us use a simple 3 by 3 matrix and call … Continue reading

Posted in Python | Tagged | 7 Comments

How to plot left and right axis with matplotlib

Tweet Sometimes, it is convenient to plot 2 data sets that have not the same range within the same plots. One will use the left y-axes and the other will use the right y-axis. With matplotlib, you need to create … Continue reading

Posted in Python | Tagged , | Leave a comment

matplotlib: latex strings are not interpreted

Tweet If the LaTeX strings are not intepreted in matplotlib (e.g., in the xlabel), check your configuration file ( see previous post for matplotlib configuration file). You can either do it for one session :

or permanently within the … Continue reading

Posted in Python | Tagged , | Leave a comment

Matplotlib configuration

Tweet Note 4/Sept/2013: the new location is /home/user/.config/matplotlib If you have ipython, try this command

and if you have Qt, you can change the backend (library used for plotting) and use qt as follows:

Matploltib set up a … Continue reading

Posted in Python | Tagged , | Leave a comment