I want to use python to plot a diagram like the one in the image below. The purpose of it is to summarize the results of different models using multiple metrics to evaluate.
Is there a way to easily do it in Python, if not can someone refer me to the name of the diagram or a framework I can do it?
Thanks,
What you are trying to draw is called a radar chart.
matplotlib allows the drawing of such a chart.
The matplotlib example above is quite verbose and there may be other, simpler solutions out there. But hopefully, knowing the name of the type of chart will help you in your search. Best of luck!
Related
I have been using the Altair python API for a Data Visualization project, and everything went smoothly until I wanted to add a radar chart to my app.
I could not find anything on Altair's python API documentation about radar charts, however there seems to be an entry about that in Altair's core documentation but I couldn't access it.
I saw that plotly had that feature but I would really have liked using only one plotting framework...
Is there really no way to make a radar chart with Altair in python ?
This is currently not implemented in VegaLite, you can see the discussion in these two issues and open a new one if you think there is a good case to be made for radar charts:
https://github.com/vega/vega-lite/issues/3805
https://github.com/vega/vega-lite/issues/408
In Altair you might be able to hack something together by layering multiple mark_arc charts with a fillOpacity=0 and a colored stroke (although I don't think this will work since I can't see any way to get right of the lines going towards the middle.
I want to get some 3D models defined by implicit functions like F(x,y,z)=0.
It can be done using the 'isosurface' and 'isocaps' functions in MATLAB.
In my case, the constructed models need post-process in Python so it would be better if the modelling can be done in Python.
'mayavi.mlab.Contour3d' and 'plotly.graph_objects.Isosurface' are able to display the isosurface while 'skimage.measure.marching_cubes' can be used to extract the trangler mesh.
Can anyone help me find a way in Python to get the isosurface end-cap?
I'm looking for a way to do the exact same thing. Another user gave me the following solution for my own request.
Is there a way to fill one side of the gyroid surface by using Mayavi?
You have to use an extra tool for visualization to do it. I'm using Mayavi for generating the structures I need but I can't get the surface end-cap by using it.
Maybe the answer to my question can help you out.
In some research papers, I often met some elaborate visualization which combining the advantages of figures and tables.
An example I clipped from paper here is as follows:
The individual plots (scatter with error-bar) and the three-line table are all easy to prepare. However, I found it is difficult to generate an imitation using Python language.
Obviously, we can plot lines and text around the subplot to mimic the tables. But I was looking forward to some more advanced methods to achieve this task.
Any advices would be appreciated.
I would like to make a diagram in Python similar to the one shown below. From what I've seen so far, there is no a library that I could use directly. Can you suggest me where to start from, for example, would it be worth to improvise by stacking horizontally multiple subplots. Is there maybe a better approach?
Thanks!
I believe the name you're looking for is Parallel Coordinates Plot.
I'm sure Plotly supports it and there are tutorials online for other libraries as well.
Let me know if this helps.
Edit: and judging by this image from Plotly's docs your example image comes from there.
I have two sets of sampled points in 2d space[x ,y], each set represents one class. When I plot all points, it's mess and one can't see anything on it. I need somehow plot distribution of each set (if it's possible on same canvas with different colours, then better). Does anybody know about some good library for it?
Matplotlib is a very good library for that task. You can plot histograms, scatter plots and lot of other things. You just have to know what you want and then you can probably do it with that. I use that for similar tasks a lot.
[UPDATE]
As I said, you can do that with matplotlib. Here is an example from their gallery: http://matplotlib.org/examples/pylab_examples/scatter_hist.html
It's not so pretty as with the answer in the comment of #lejlot, but still correct.