Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 759045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:33:01+00:00 2026-05-14T15:33:01+00:00

I am trying to plot the following numbers on a log scale as a

  • 0

I am trying to plot the following numbers on a log scale as a scatter plot in matplotlib. Both the quantities on the x and y axes have very different scales, and one of the variables has a huge dynamic range (nearly 0 to 12 million roughly) while the other is between nearly 0 and 2. I think it might be good to plot both on a log scale.

I tried the following, for a subset of the values of the two variables:

fig = plt.figure(figsize=(8, 8))
ax = fig.add_subplot(1, 1, 1)
ax.set_yscale('log')
ax.set_xscale('log')
plt.scatter([1.341, 0.1034, 0.6076, 1.4278, 0.0374],
        [0.37, 0.12, 0.22, 0.4, 0.08])

The x-axes appear log scaled but the points do not appear — only two points appear. Any idea how to fix this? Also, how can I make this log scale appear on a square axes, so that the correlation between the two variables can be interpreted from the scatter plot?

thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:33:01+00:00Added an answer on May 14, 2026 at 3:33 pm

    I don’t know why you only get those two points. For this case, you can manually adjust the limits to make sure all your points fit. I ran:

    import matplotlib.pyplot as plt
    
    fig = plt.figure(figsize=(8, 8)) # You were missing the =
    ax = fig.add_subplot(1, 1, 1)
    ax.set_yscale('log')
    ax.set_xscale('log')
    plt.scatter([1.341, 0.1034, 0.6076, 1.4278, 0.0374],
            [0.37, 0.12, 0.22, 0.4, 0.08])
    plt.xlim(0.01, 10) # Fix the x limits to fit all the points
    plt.show()
    

    I’m not sure I understand understand what “Also, how can I make this log scale appear on a square axes, so that the correlation between the two variables can be interpreted from the scatter plot?” means. Perhaps someone else will understand, or maybe you can clarify?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following data set that I am trying to plot with ggplot2,
I am trying to make a contour plot of the following data using matplotlib
I'm trying to generate a linear regression on a scatter plot I have generated,
I have the following problem when trying to plot some 3D data in Mathematica.
I am trying to plot the following ! from numpy import * from pylab
I'm trying to plot a step chart with the following properties: x-axis: Time (ms)
I am trying to change the size of each plot on the following chart
So I'm trying to create some graphs using Core Plot, but for the following
I am trying to plot a graph using gnuplot. I have six text files.
I am trying to plot side by side the following datasets dataset1=data.frame(obs=runif(20,min=1,max=10)) dataset2=data.frame(obs=runif(20,min=1,max=20)) dataset3=data.frame(obs=runif(20,min=5,max=10))

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.