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 609009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:31:12+00:00 2026-05-13T17:31:12+00:00

I am using matplotlib for doing this from mpl_toolkits.mplot3d import Axes3D import numpy as

  • 0

I am using matplotlib for doing this

from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib
import matplotlib.pyplot as plt

fig = plt.figure()
ax = Axes3D(fig)

x = [6,3,6,9,12,24]
y = [3,5,78,12,23,56]

ax.plot(x, y, zs=0, zdir='z', label='zs=0, zdir=z')

plt.show()

Now this builds a graph that is horizontal in the 3d space. How do I make the graph vertical so that it faces the user?

What I want to do is build multiple such vertical graphs that are separated by some distance and are facing the user.

  • 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-13T17:31:13+00:00Added an answer on May 13, 2026 at 5:31 pm

    bp’s answer might work fine, but there’s a much simpler way.

    Your current graph is ‘flat’ on the z-axis, which is why it’s horizontal. You want it to be vertical, which means that you want it to be ‘flat’ on the y-axis. This involves the tiniest modification to your code:

    from mpl_toolkits.mplot3d import Axes3D
    import numpy as np
    import matplotlib
    import matplotlib.pyplot as plt
    
    fig = plt.figure()
    ax = Axes3D(fig)
    
    x = [6,3,6,9,12,24]
    y = [3,5,78,12,23,56]
    # put 0s on the y-axis, and put the y axis on the z-axis
    ax.plot(xs=x, ys=[0]*len(x), zs=y, zdir='z', label='ys=0, zdir=z')
    plt.show()
    

    Then you can easily have multiple such graphs by using different values for the ys parameter (for example, ys=[2]*len(x) instead would put the graph slightly behind).

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

Sidebar

Related Questions

I created a 3D plot using matplotlib as this: fig = pylab.figure() ax =
I am making a plot using matplotlib.pyplot imported as PL: FIG = PL.figure(figsize=(12,8), dpi=150)
I drew this graph using matplotlib using the following code. import matplotlib import matplotlib.pyplot
I am using matplotlib and numpy to make a polar plot. Here is some
From my basic understanding about using matplotlib you store your desired plt in some
I'm currently using Matplotlib to create a histogram: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as
I'm using Matplotlib to plot a histogram. Using tips from my previous question: Matplotlib
I generated a histogram by using matplotlib import numpy as np import pylab as
I am graphing data from a numpy array using matplotlib imshow. However, some points
I'm using matplotlib to plot data as a function of time in hh:mm:ss.ms format

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.