Questions tagged [multiple-axes]
196 questions
19
votes
3 answers
Plotly: Grouped Bar Chart with multiple axes
When I set barmode='group' in Layout while trace2 = Bar(...,yaxis='y2'), this leads bars to be stacked or overlayed instead of grouping them. How can I group the bars while having multiple axes?
I went over these but no avail:
With single Y axis…

tozCSS
- 5,487
- 2
- 34
- 31
15
votes
2 answers
plot dataframe with two y-axes
I have the following dataframe:
land_cover 1 2 3 4 5 6 size
0 20 19.558872 6.856950 3.882243 1.743048 1.361306 1.026382 16.520265
1 30 9.499454 3.513521 1.849498…

Christin Abel
- 301
- 1
- 3
- 10
11
votes
2 answers
Add second axis to polar plot
I try to plot two polar plots in one figure. See code below:
fig = super(PlotWindPowerDensity, self).get_figure()
rect = [0.1, 0.1, 0.8, 0.8]
ax = WindSpeedDirectionAxes(fig, rect)
self.values_dict =…

fidelitas
- 1,113
- 2
- 12
- 14
10
votes
2 answers
Gnuplot: Plot x2 axis with respect to x1 axis
I seem to be having some difficulty finding the answer to this question online. The title is the basic question, but to be more specific I would like to have two x axes, one at the top of the figure that is dependent on the one at the bottom.…

falconskull
- 193
- 1
- 2
- 10
8
votes
2 answers
How to force same size between matplotlib subplot image axes
Suppose I have the following code to create three side-by-side images:
n=10
x = np.random.rand(n,1)
y = np.random.rand(1,n)
z = np.random.rand(n,n)
fig, ax = plt.subplots(1, 3)
ax[0].imshow(x)
ax[1].imshow(z)
…

dkv
- 6,602
- 10
- 34
- 54
8
votes
1 answer
How to use sec_axis() for discrete data in ggplot2 R?
I have discreet data that looks like this:
height <- c(1,2,3,4,5,6,7,8)
weight <- c(100,200,300,400,500,600,700,800)
person <- c("Jack","Jim","Jill","Tess","Jack","Jim","Jill","Tess")
set <- c(1,1,1,1,2,2,2,2)
dat <-…

Share
- 395
- 7
- 19
7
votes
1 answer
How to remove polar gridlines and add major axis ticks
Could someone please help me remove the gridlines that form the rings inside my polar plot. I'd like to keep (and even bold) the axes and add ticks for each of the axis labels.
Here is the code that I'm working with, an image of the plot, and an…

JA2
- 161
- 3
- 10
6
votes
2 answers
Matplotlib pick event with multiple axes
I am working on plot with two axes which supports picking the lines.
I am using matplotlib and the the twinx() command. Unfortunately the pick event is only called for the artists in the top-most axes (see example below).
import matplotlib.pyplot as…

EGuy
- 211
- 1
- 3
- 10
5
votes
2 answers
R Plotly: aspectmode='cube' not making axes equal in 3D scatter plot
I am making a 3D scatterplot (image attached) of principal components. Although I'm using aspectmode='cube', the axes are not equal in size.
I created an MRE to test, and in that test, the axes to come out equal. So, I'm very confused.
axx <-…

abalter
- 9,663
- 17
- 90
- 145
5
votes
2 answers
How to fill legend background color when plotting with TWO axes?
The issue
I have a plot with 2 y-axes, each corresponding to a set of lines. The solid lines correspond to the left y-axis, and the dashed lines correspond to the right y-axis. I also have a legend and I want it to use only the solid lines as the…

Cebbie
- 1,741
- 6
- 23
- 37
5
votes
1 answer
Overlay box plots on bars matplotlib/python
I am trying to overlay a set of box plots on bars using separate y axis in matplotlib. I can't find an example anywhere and have tried everything I can think of with ax.set_zorder() and ax2.set_alpha(). Is there a way to set the background opaque…

Liam McIntyre
- 71
- 1
- 4
5
votes
0 answers
Plotly (Python)- 100+ subplot y axes
I am working with big data sets where I need to graph multiple stacked trends but have come across an issue relating the the number of y axes allowed in a plotly graph. I have tried multiple methods to resolve this but to no avail.
Anytime I attempt…

user3520103
- 51
- 1
5
votes
2 answers
Bring axes to front without redrawing the figure?
Is there a way in Matlab to bring an axes to front without having Matlab perform a redraw (drawnow) implicitly?
Background to my question:
I am preparing a large figure with several subplots. In some of them I have 2 axes superposed, because I want…

user986990
- 85
- 1
- 2
- 8
5
votes
1 answer
Matplotlib parasite logarithmic axis ticks unwanted mirrorring
I'm trying to make a plot with two y-axes, one of them logarithmic and one linear, using host_subplot from mpl_toolkits.axes_grid1. The figure looks ok, with the exception of the minor ticks from the secondary y-axis (right) being also displayed on…

mannaroth
- 1,473
- 3
- 17
- 38
4
votes
1 answer
How to plot grouped bar chart with multiple y axes in python plotly
I need to plot a grouped bar chart with two y axes and one x axis.
The plot looks like the following if drawn in matplotlib
I want it by python plotly but I could not find a solution. There seems to be a similar question two years ago, but I did…

Royalblue
- 639
- 10
- 22