I saw a blog post somewhere with plots like these which seem quite popular in the R ecosystem. I've encountered something similar with the package nxviz. How can this kind of graph be replicated in Python's plotly and matplotlib? I'm interested in a somewhat general solution as I've seen lots of things being put inside the grid's boxes. (Note I do know about subplots and scatter matrices by I can't find an option to have lines, nor do I know how to fill the resulting boxes with color-coded circles, text etc, only plots).
I'm trying to create a heatmap for stock returns like the one used in https://finviz.com/map.ashx, which looks like:
Does anyone know how to create something like this in python? The closest I've found is "Heatmap with Unequal Block Sizes" for plotly, https://plotly.com/python/heatmaps/. I could probably make that work by subdividing everything into dozens of smaller heatmaps and then gluing them together in Dash, but is there a better way? Does anyone know of a tool that makes this type of graph, or would I have to make it from scratch?
I made a bunch of plots using stuff like
plot_to_delete_later = mlab.points3d(...)
I want to remove this later on, but keep the other plots. I can do this in the GUI (see image), but can't seem to find the trick to doing it in code.
Any help much appreciated.
I know there are several questions about this in stackoverflow, but the current solution still has some problems.
I am following the solution provided by http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb using LineCollection.
Actually it works. But when I save the figure into PDF file. After zooming in, it looks not very good. The size of PDF file is hundreds of times of simply plot without changing color. I understand why it looks like this. Is there any idea to plot the color-line smoother?
I would like to know if there is a way to combined several figures created with matplotlib in one unique figure.
Most of the existing topics are related to multiple plots within one figure. But here, I have several functions which all create one elaborated figure (not just a plot, the figure itself is a multiple plot with texts, title, legends,...)
So instead of just doing the layout of those several figures using a software like Word, is there a way to directly combined all my figures in one unique figure under python ?
Thank you in advance !
The concept of figure in matplotlib does not allow to have a figure inside a figure. The figure is the canvas for other artists, like axes. You may of course add as many axes to a figure as you like. So for example instead of one figure with 4 axes and another figure with 6 axes, you can create a figure with 10 axes.
A good choice may be to use the gridspec, as detailed on the respecive matplotlib page.
After additional researches, it seems my problem has no easy solution within Matplotlib itself. Multiple figures layout needs external post-processing of plots.
For those having the same problem, here is an interesting link :
Publication-quality figures with matplotlib and svgutils