Python Forum
How to invert scatter plot axis
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to invert scatter plot axis
#2
import matplotlib.pyplot as plt

ex = [0,0.2,0.5,1]
ey = [0.1, 1,2.5,4]

#plot normal
plaid = plt.scatter(ex, ey)

#now reverse axes
fig, ax = plt.subplots()
ax.scatter(ex, ey)
ax.set_xlim(1,0)
ax.set_ylim(5,-1)
ax.grid = True
plt
You might use plt.show() - I was in a notebook so just used plt
Mark17 likes this post
Reply


Messages In This Thread
How to invert scatter plot axis - by Mark17 - Sep-20-2021, 06:13 PM
RE: How to invert scatter plot axis - by jefsummers - Sep-20-2021, 06:52 PM
RE: How to invert scatter plot axis - by Mark17 - Sep-22-2021, 11:29 AM
RE: How to invert scatter plot axis - by jefsummers - Sep-22-2021, 04:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Shocked plt.scatter() errors asja2010 0 1,619 Oct-13-2022, 08:15 AM
Last Post: asja2010
  Making a plot with secondary y-axis bigger snkm 0 1,181 Feb-10-2022, 09:40 AM
Last Post: snkm
  Sample labels from excel file in order to put them on x-axis and y-axis of a plot hobbyist 11 4,575 Sep-14-2021, 08:29 AM
Last Post: hobbyist
  Animated scatter plot maximan 0 1,696 Jan-18-2021, 03:53 PM
Last Post: maximan
  How to plot intraday data of several days in one plot mistermister 3 3,022 Dec-15-2020, 07:43 PM
Last Post: deanhystad
  5 variants to invert dictionaries with non-unique values Drakax1 2 2,701 Aug-31-2020, 11:40 AM
Last Post: snippsat
  Difference Between Figure Axis and Sub Plot Axis in MatplotLib JoeDainton123 2 2,551 Aug-21-2020, 10:17 PM
Last Post: JoeDainton123
  Group scatter plots Mekala 0 1,716 Jul-23-2020, 02:18 PM
Last Post: Mekala
  Invert Pillow image colours chesschaser 5 4,094 Jul-11-2020, 02:59 PM
Last Post: chesschaser
  how to nest loop for 4*4 scatter plot kassamohammed 0 2,624 Jun-23-2020, 09:47 AM
Last Post: kassamohammed

Forum Jump:

User Panel Messages

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