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
  How to space data on x axis m_kdch 0 327 May-05-2025, 12:55 PM
Last Post: m_kdch
  IndexError: index 31 is out of bounds for axis 0 with size 31 YL789 1 1,025 Sep-21-2024, 09:46 AM
Last Post: Gribouillis
  IndexError: index 10 is out of bounds for axis 0 with size 10 Mehboob 11 11,201 Sep-14-2023, 06:54 AM
Last Post: Mehboob
  Hard time trying to figure out the difference between two strings carecavoador 2 1,553 Aug-16-2023, 04:53 PM
Last Post: carecavoador
  matplotlib x-axis text move bottom upward jacklee26 3 2,286 May-31-2023, 04:28 AM
Last Post: jacklee26
  Print names in x-axis of a time-series values hobbyist 4 2,437 Apr-22-2023, 09:29 PM
Last Post: deanhystad
  How to auto align x-axis label SamLiu 2 2,201 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 2,062 Sep-07-2022, 09:47 AM
Last Post: Larz60+
  Graphic line plot with matplotlib, text file in pytho khadija 2 2,654 Aug-15-2022, 12:00 PM
Last Post: khadija
  Getting proper x,y axis values pyhill00 8 4,170 Jul-29-2022, 06:48 PM
Last Post: pyhill00

Forum Jump:

User Panel Messages

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