Python Forum
Difference Between Figure Axis and Sub Plot Axis in MatplotLib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference Between Figure Axis and Sub Plot Axis in MatplotLib
#1
Hello all

I was wondering if someone could help with understanding sub plots.

The term axis is often used with figure windows and subplots and I wanted to understand whether there was a technical difference between axis of a subplot and axis of a figure window.

If I have a 2 x 2 figure allowing me 4 subplots then each subplot will have its own X&Y axis but what does it mean for the figure window to have an axes??

Can someone explain?

Thank you.
Reply
#2
What have you done to try and understand? If I wanted to know more I would play around with axis and see what it does. Maybe create 4 sub plots of the same type and plot the same data. For each axis I would change one of the parameters and see how that changed the plot.
Reply
#3
Deabhystad

I have done lots of things to understand this.

I actually started off trying to create a figure window.
Then i tried to give it a new title using the .figure function.
I then added a plot using the add.subplot function to split my newly created figure window into a 2 x 2 grid.
I then created the plots which worked great however i could not get the labels to work.

I then took a different approach by using the code:-

figure_window, subplot = pyplot.subplot(2,2)
But it appears that there is a difference between Axes and Axis - as you can see for someone who is new to programming you can see how silly this terminology is.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  IndexError: index 10 is out of bounds for axis 0 with size 10 Mehboob 11 1,947 Sep-14-2023, 06:54 AM
Last Post: Mehboob
  Hard time trying to figure out the difference between two strings carecavoador 2 644 Aug-16-2023, 04:53 PM
Last Post: carecavoador
  matplotlib x-axis text move bottom upward jacklee26 3 926 May-31-2023, 04:28 AM
Last Post: jacklee26
  Print names in x-axis of a time-series values hobbyist 4 1,176 Apr-22-2023, 09:29 PM
Last Post: deanhystad
  How to auto align x-axis label SamLiu 2 842 Jan-27-2023, 11:10 PM
Last Post: SamLiu
  How can histogram bins be separated and reduce number of labels printed on x-axis? cadena 1 850 Sep-07-2022, 09:47 AM
Last Post: Larz60+
  Graphic line plot with matplotlib, text file in pytho khadija 2 1,338 Aug-15-2022, 12:00 PM
Last Post: khadija
  Getting proper x,y axis values pyhill00 8 1,591 Jul-29-2022, 06:48 PM
Last Post: pyhill00
  plt.bar on two different Y axis Menthix 1 895 Jun-20-2022, 03:35 PM
Last Post: deanhystad
  How to avoid the extra set of y-axis labels? Mark17 9 2,242 May-17-2022, 06:26 PM
Last Post: Mark17

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020