How can I change the size of the innermost circle in a plotly sunburst? [duplicate] - python

This question already has an answer here:
Is there a way to vary the thickness of a layer in sunburst diagram in plotly
(1 answer)
Closed last year.
I want to achieve this result but with plotly sunburst.
I can not find any parameter that controls the inner circle diameter in the documentation. It is any way to achieve that?

Unfortunately you can set only root_color. There is no attribute root_size. Just print help(go.sunburst.Root).

Related

matplotlib 3D plotting. Drawing edges parallel to axes [duplicate]

This question already has an answer here:
3D figures from Matplotlib visibility of pane edge
(1 answer)
Closed 11 hours ago.
In 3D plot by default matplotlib draws axes like the first image. How can we draw more edges parallel to the axes like the second or third images. Found out Scidavis default plot type is like the third image. https://scidavis.sourceforge.net/manual/x528.html
Finally, found a way here myself. A interesting work around to this problem.
Missing spine in 3d plot

how to draw a rectangle over a matplotlib figure, also overlaying the axes [duplicate]

This question already has answers here:
How to draw rectangle outside of the plot frame in Matplotlib
(2 answers)
How to position a matplotlib patch outside of the axes range (so that it could be next to the title, or legend, or anywhere on the figure)
(2 answers)
Closed 5 months ago.
I would like to draw a rectangle over a matplotlib figure, in a way that allows overlaying the axes.
The answers I found online only allow drawing a rectange inside the axes, but not overlaying them.
EDIT: This answer allows drawing outside the plot frame. However it does not overlay the axis. Namely, the axis is kept visible. See the example where the axis is still visible behind the red rectangle
See an example below for what I wish to achieve (Code for the bar plot can be taken from here. For the example, the figure was edited with a simple paint software).
It is drawn via matplotlib.pyplot.hist() function in matplotlib

How to create scrollbar in a plot? [duplicate]

This question already has answers here:
How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?
(2 answers)
Closed 3 years ago.
I have a lot of data series (> 1000 bars). For this reason the plot is scaled very small. Do you know how I can activate a scrollbar in the plt.barh-chart with python? If I can set a fixed height of the bars then I can scroll through the > 1000 bars. Perhaps you have another solution for me?
You have to set position for scrollbar with respect to image size.
Kindly refer a below URL:
Scrollable Bar graph matplotlib
Could you provide a reproducible example? Other than that I can just give you plain advice. First of all, ask you whether you are really in need of Youtube/Netflix/etc. 1-10. Because it makes the chart very confusing. I came across the same problem some time ago too and I figured that the Gantt Chart from Plotly, particularly for Python, is a really good solution to make it clearer.
As for your original question:
fig= plt.figure(figsize=(6,3))

Coloring Individual Points of a Scatter Plot in Python3 [duplicate]

This question already has answers here:
Scatter plot and Color mapping in Python
(4 answers)
Closed 3 years ago.
I am currently working on a project that deals with a scatter plot, made using matplotlib and numpy,
I was wondering whether I could assign color to each point based on their (x,y) coordinates, assume that I have a function that maps (x,y) to (r,g,b). There are a lot of points (~250,000).
Is there any possible way to achieve this?
Matplotlib's scatter plot supports this via the color parameter, check this example. You have to prepare your colors beforehand and pass it to the color. As mentioned, color can be a sequence.
Another way, maybe slightly faster, would be to use seaborn's scatter plot.

matplotlib.figure.suptitle(), what does 'sup' stand for? [duplicate]

This question already has an answer here:
In matplotlib, what's the difference between title() and suptitle()?
(1 answer)
Closed 5 years ago.
I understand that matplotlib.figure.suptitle() adds a title to a figure.
But what does the "sup" stand for?
It is an abbreviation indicating a "super" title. It is a title which appears at the top of the figure, whereas a normal title only appears above a particular axes. If you only have one axes object, then there's unlikely an appreciable difference, but the difference happens when you have multiple subplots on the same figure and you would like a title at the top of the figure not on each of the axes objects.

Categories