Questions tagged [multiple-axes]

196 questions
0
votes
0 answers

matlab imshow not fitting the defined axes

I have to generate a video made of three main objects coming from some data previously generated: 1)patch graph of a thickness 2)a grey-scale image 3)a plot I generated three axes: ax1,ax2,ax3 with their properties. When I put the image inside ax2,…
0
votes
2 answers

Move one subplot down

I am making a 4 panel plot and was wondering if there is any way to just move the subplot in the bottom left down a bit so it stays in line with the rest of the plots and the titles don't overlay. I believe it is because the bottom left plot doesn't…
Wx_Trader
  • 77
  • 7
0
votes
0 answers

multiple seaborn plots with secondary y-axis in one graph

hello stackoverflow community I'm a newcomer and have the following code: fig, axs = plt.subplots(2, 2, figsize=(20,20), dpi=(100)) axs[0,0].set_title('2017, Zeitreihe, Zähler: ' + Zaehler) sns.lineplot(data= data_heatmap_2017, x='date_time', y=…
ahau8777
  • 1
  • 1
0
votes
2 answers

How to draw pandas dataframe using Matplotlib hist with multiple y axes

I have a dataframe as below: frame_id time_stamp pixels step 0 50 06:34:10 0.000000 0 1 100 06:38:20 0.000000 0 2 150 06:42:30 3.770903 1 3 200 06:46:40 3.312285 1 4 250 …
wangmyde
  • 77
  • 8
0
votes
1 answer

How do I take an image that is plotted as a result of a function call and plot to a grid of images?

I have a function that I use to output a photo that has had its pixels clustered using KMeans. I can input the k value as an argument, and it will fit the model and output the new image. def cluster_image(k, img=img): img_flat =…
NaiveBae
  • 358
  • 1
  • 10
0
votes
1 answer

Adjust space between two axes while keeping it constant on other axes

For some reason I couldn't find information on this (I'm pretty sure it exists somewhere), but in the following generic example, I would like to reduce the hspace between ax1 and ax2 while keeping the same hspace between ax2-ax3 and ax3-ax4. I'd…
0
votes
0 answers

matplotlib multiple axes alignment

I try to create multiple nested axes inside a figure: import matplotlib.pyplot as plt import matplotlib.patches as pat import copy # set figure fig = plt.figure(figsize=(10, 10)) ax = fig.gca() ax.set_aspect("equal") # comment to show…
david
  • 1,302
  • 1
  • 10
  • 21
0
votes
1 answer

ggplot secondry y axis scale based on data with facet_wrap or grid_arrange

My data consists of 25 sectors on a time series, I want to plot for each sector the number of workers (series 1) and the average pay (series 2) in a line graph, with the secondary y axis for the average pay and the primary y axis for the number of…
fingerman
  • 2,440
  • 4
  • 19
  • 24
0
votes
1 answer

matplotlib pyplot - how to combine multiple y-axis and multiple plots

I need to plot a collection of different plots whis at least two different y-axis each. I managed to solve each task singularly: 1st: A collection of different plots: import matplotlib.pyplot as plt import pandas as pd import numpy as np a1 =…
Thomas R
  • 1,067
  • 11
  • 17
0
votes
0 answers

ggplot with 2 y axes and different scale

I want to make a ggplot with 2 y-axes and control both y axes scales. I found this: ggplot with 2 y axes on each side and different scales ggplot(mpg, aes(displ, hwy)) + geom_point() + scale_y_continuous( "mpg (US)", sec.axis =…
0
votes
1 answer

histogram subplots with multiple axes

I have 4 sets (i.e bbs) of 3 .csv files (i.e. replicas) with 2 columns each: time (X-Axis) and interaction Frequency (Y-Axis 1). I also need to plot error bars to a second y axis which i have achieved. Since they have similar paths, I am reading…
0
votes
1 answer

Add a tick to top x axis

I do not really understand why this code is not working fig, ax = plt.subplots() ax.plot(Vg_vec, sigma_i) ax.set_xlabel('$V_\mathrm{g}$ ($\mathrm{V}}$)') ax.set_ylabel('$\sigma_\mathrm{i}$ ($\mathrm{C/m^2}$)') peaks, _ = find_peaks(sigma_i,…
bea boh
  • 3
  • 2
0
votes
0 answers

Matplotlib: Secondary axis shares values with both of the main axes

I have added a secondary x-axis to my plot. The aim is just to provide another snippet of information to the data shown by the primary x and y axes. As you can see from the attached image, I have used twiny() command to share the y-axis and…
ebrehe
  • 1
  • 1
0
votes
1 answer

Change axis line range in mpl_toolkits new_fixed_axis

I am struggling to modify my code to define a specific range of the secondary x-axis. Below is a snippet of the relevant code for creating 2 x-axes, and the output it generates: from matplotlib import pyplot as plt import matplotlib.ticker as…
Emile Beukes
  • 82
  • 1
  • 6
0
votes
0 answers

Need to change pace of one of the axes in my chart matplotlib

Fairly new to plotting need help have this DATAFRAME that I'm working on. trying to change the pace on my left y_axis to be 5 instead of 10 but I guess 'AxesSubplot' object has no attribute 'yticks' so I can't use ax.yticks(np.arange(0,…