Python Forum
Draw a square-aspect log-linear plot via matplotlib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Draw a square-aspect log-linear plot via matplotlib
#1
So I have a plot with logarithmic x axis but linear y axis, and I want the plot to be square-aspect, but when I use plt.axis('equal') it does not work and I get the following error:

Error:
UserWarning: aspect is not supported for Axes with xscale=log, yscale=linear 'yscale=%s' % (xscale, yscale))
I searched for it and there are several workarounds (e.g. here) but non of them actually work; like in the aforementioned link neither of ax = gca() or fig = gcf() work. Any ideas how I could make my semi-log plot squared?
Reply


Messages In This Thread
Draw a square-aspect log-linear plot via matplotlib - by Antonio - Jun-19-2018, 03:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pick a line in a plot with matplotlib Romain 3 5,675 Feb-28-2023, 11:56 AM
Last Post: get2sid
  Chi-square with the contingency table applied to the die Leloup 4 2,012 Mar-16-2022, 12:22 AM
Last Post: jefsummers
  Matplotlib scatter plot in loop with None values ivan_sc 1 2,297 Nov-04-2021, 11:25 PM
Last Post: jefsummers
  Matplotlib scatter plot slider with datetime sonny 0 2,967 Feb-05-2021, 02:31 AM
Last Post: sonny
  New to Python & Matplotlib - can I change the plot grid origin to lower left corner? FortyTwo 1 6,229 Aug-22-2020, 08:22 PM
Last Post: matador
  matplotlib creating a scatter plot via PathCollection tpourjalali 0 2,499 Apr-11-2020, 05:59 PM
Last Post: tpourjalali
  How to build linear regression by implementing Gradient Descent using only linear alg PythonSpeaker 1 2,224 Dec-01-2019, 05:35 PM
Last Post: Larz60+
  MatPlotLib 2d plot of current density? ruben 0 2,218 May-13-2019, 06:47 AM
Last Post: ruben
  [pandas]How to liner fit time series data and get linear fit equation and r square Sri 5 3,863 Apr-04-2019, 12:00 PM
Last Post: Sri
  Bar Plot with Python ,matplotlib and sqlite3 tables gauravbhardwajee 0 4,985 Sep-25-2018, 06:17 PM
Last Post: gauravbhardwajee

Forum Jump:

User Panel Messages

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