Questions tagged [multiple-axes]
196 questions
4
votes
2 answers
How to remove xticks and yticks from all axes?
I have three axes in figure and I want to remove xtick and ytick from all of them.
I wrote below code but it works just on current axes, not all of them:
set(gca,'xtick',[],'ytick',[]);
How to remove xticks and yticks from all axes?

Masoud Zayyani
- 157
- 1
- 2
- 12
4
votes
0 answers
showing x axis label for each graph in plotly subplot with shared x axis
I have created a subplot with plotly.JS , x axis is shared for each graph as given in the below picture.
I want to show the x axis values for all graphs in the subplot instead for showing it only for graph at bottom. I achieved this using anchor…

vishnu m c
- 841
- 1
- 7
- 21
4
votes
1 answer
Bokeh, Python: How to update range of extra axis
I would like to create a plot with 2 y-axes, whose ranges are being updated on a button click. The script would run on a Bokeh server. Note that in the code below, the primary y-axis is being updated by changing f.y_range.start/end. However, this is…

user7435037
- 343
- 4
- 14
4
votes
1 answer
Add (second) x axis to scatterplot to display group information
I make a scatterplot using d3.js where the points are arranged by their name and an accompanying number.
The data that is plotted would look like this:
name, group, number
"AB", "A", 0.5
"ABC", "A", 10.0
"BC", "B", 3.0
"BCD", "B", …

user1251007
- 15,891
- 14
- 50
- 76
4
votes
1 answer
Missing values on second y-axis
I want to plot 3 sets of y-values, where I want to have values for "Temperature" shown on one Y-axis, and both "Total Energy" and "Potential Energy" values shown on the other y-axis.
My plotting command is:
plot "traj_read.out" using 3:7 title…
user2015601
3
votes
1 answer
move third y-axis to right
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
fig.subplots_adjust(right=0.75)
twin1 = ax.twinx()
twin2 = ax.twinx()
#twin2.spines.right.set_position(("axes", 1.2))
p1, = ax.plot([0, 1, 2], [0, 1, 2], "b-", label="Density")
p2, =…

Hugo V
- 79
- 6
3
votes
0 answers
Matplotlib zeroed spines extend out of axis when panning
I'm specifically referring to spine placement example code found here, via the matplotlib documentation.
Here's a picture of the problem I'm having:
By using the panning tool, I have moved the left spine for the "zeroed spines" plot beyond the axes…

Lance Lampert
- 31
- 2
3
votes
1 answer
How do I remove values from one y-axis when having multiple axes?
How do I remove the values from the right y-axis in this multiple axis plot? Code source.
figure
x1 = Pmax;
y1 = FuelCons;
line(x1,y1,'Color','r')
ax1 = gca; % current axes
ax1_pos = ax1.Position; % position of first axes
ax2 =…

Clone
- 3,378
- 11
- 25
- 41
3
votes
1 answer
Remove spines of host when using parasite axis
I'm new to both python and stackoverflow so I hope I'm posting this right.
I'm trying to make a bar chart with scatter overlay. I followed the demo_parasite_axes2 example on the matplotlib website to create a host and a parasite axis. That seems to…

imt
- 41
- 5
3
votes
1 answer
align axes in one figure
I have a figure with two different axes.
I cannot manage to get the axes aligned and to make the second axis invisible... I tried a couple if things (see comments in the code), but they did not work
clearvars
close all
clc
[X1,Y1,Z1] =…

shamalaia
- 2,282
- 3
- 23
- 35
3
votes
1 answer
Matplotlib: how to show legend for bar chart and line on 2 separate axes?
I am plotting a bar chart on the left axis and a line chart on the right axis. How can I show the legend for both in the same legend box?
With the code below, I get two separate legend boxes; also, I need to specify the location of the second legend…

Pythonista anonymous
- 8,140
- 20
- 70
- 112
3
votes
0 answers
R programming Plotly bar chart grouped bars with multiple y axis
I am trying to do a grouped bar chart with two different Y axis for measure two different columns. Here is the data:
SUCURSAL EXISTENCIA COSTO_MEDIO
0 MELENARA 0.128 643.2
1 LAS TORRES 1.872 …
3
votes
1 answer
Adding two y-axis titles on the same axis
I am going to use a dataset and plot that came from a previous problem (Here):
dat <- read.table(text = " Division Year OperatingIncome
1 A 2012 11460
2 B 2012 7431
3 C 2012 -8121
4 D 2012 15719
5 …

EntryLevelR
- 273
- 4
- 16
3
votes
1 answer
How do I add an axis for a second trace in a Plotly subplot?
I have three traces, one of which I have in one subplot, and two of which are in another. I would like to have a distinct y-axis each of the traces in the subplot with 2 traces.
For example, I have
fig = plotly.tools.make_subplots(rows=2, cols=1,…

orome
- 45,163
- 57
- 202
- 418
3
votes
1 answer
interwoven zorder for lines on two (twin) axes
I'm plotting a series of lines on a pair of twin (twinx) axes. I can control which lines are 'on top' of each axis using the zorder parameter, and I can set which axis (as a whole) is on top using the Axes.set_zorder() function --- making all of…

DilithiumMatrix
- 17,795
- 22
- 77
- 119