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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:08:51+00:00 2026-06-13T23:08:51+00:00

p = [3,3] plot(p, ‘x’) This weirdly generates this: I’d like it to be

  • 0
p = [3,3]
plot(p, 'x')

This weirdly generates this:enter image description here

I’d like it to be a point at x=3/y=3 on the plot. How?

  • 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-06-13T23:08:52+00:00Added an answer on June 13, 2026 at 11:08 pm

    @mathematician1975 is right, but I feel like this requires a bit more explanation:

    Like the official documentation states:

    plot(Y) plots the columns of Y versus the index of each value when Y is a real number.

    so in fact this is not weird at all that plot(p, 'x') plots each value in p against its index, i.e. the points (1, 3) and (2, 3).

    This is actually handy in some cases (when you want the x-coordiantes to be a running index), but not in yours. To plot point p correctly, use the syntax plot(X, Y), that is:

    plot(p(2), p(1), 'x')
    

    (here I assumed that the y-coordinate is the first in p, but if it’s the x-coordinates you can just swap the places of the input arguments).

    In the general case, if p is a matrix with two columns (say, the first contains all y-coordinates and the second all x-coordinates), you can plot all points like so:

    plot(p(:, 2), p(:, 1), 'x')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often plot graphs in gnuplot prompt shell, like this: gunuplot> plot sin(x) with
I have a facetted plot like this: ggplot(mtcars, aes(x = hp, y = mpg))
I would like to plot this kind of data: X axis: dates Y axis:
I plot a single trace in MATLAB with plot() . I'd like to add
I am trying to plot this kind of behaviour of a data set. I
I would like to plot a heatmap on a table imported from MATLAB. The
I need to plot two error-bars on each point in a scatterplot. The usual
I have a plot in which I'd like many ticks along the x-axis, yet
I would like to plot in R using an existing pdf file as the
On a generic plot, with time on the x-axis, I would like to highlight

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.