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

  • Home
  • SEARCH
  • 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 7012667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:17:08+00:00 2026-05-27T22:17:08+00:00

I have a (i x j) sized matrix mat which contains values from an

  • 0

I have a (i x j) sized matrix mat which contains values from an experiment.

If I use ListPlot3D[mat] I can visualise this in a 3D plot.

I also have two arrays of size i (aRow) and of size j (aCol) which I determined from my experiment.

How do I replace the default x and y axis shown with ListPlot3D[mat] with aRow and aCol?

  • 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-27T22:17:08+00:00Added an answer on May 27, 2026 at 10:17 pm

    Please take a look at the Ticks option and it example uses in the docs.


    Here’s one way to do it. First generate some example data:

    mat = Table[Exp[-(x^2 + y^2)], {x, -2, 2, .1}, {y, -2, 2, .1}];    
    aCol = aRow = Round[mat[[20]], 0.01];
    

    Plot it in 3D. I chose to show every 10th tick mark out of all possible ones. list[[;; ;; 10]] selects every 10th element of a list.

    ListPlot3D[mat,
     Ticks -> {
       Transpose[{Range@Length[aRow], aRow}][[;; ;; 10]],
       Transpose[{Range@Length[aCol], aCol}][[;; ;; 10]],
       Automatic}]
    

    Mathematica graphics

    Plot it in 2D too. ListDensityPlot has a Frame (not Axes) by default, so we use FrameTicks

    ListDensityPlot[mat,
     FrameTicks -> {
       Transpose[{Range@Length[aRow], aRow}][[;; ;; 10]],
       Transpose[{Range@Length[aCol], aCol}][[;; ;; 10]],
       None, None},
     Mesh -> Automatic]
    

    Mathematica graphics


    Update

    If you don’t need arbitrary ticks, just a different range for the usual, linearly spaces tick marks, then you can use the DataRange option like this:

    ListPlot3D[mat, DataRange -> {{0, 1}, {0, 1}}]
    

    Mathematica graphics

    If you still need the data in an {x,y,z} format (because the coordinates are not evenly spaced), you can build it using

    Join @@ MapThread[Append, {Outer[List, aRow, aCol], mat}, 2]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large matrix from which I would like to gather a collection
I have an image loaded from disk as a texture, and a same-sized matrix
I have a medium sized application that runs as a .net web-service which I
I have a medium-sized process viewer which uses around ~40MB of private memory on
This is an OpenCV2 question. I have a matrix representing a closed space curve.
I am reading a matrix from a file and have the following code: int
I have a matrix. And I need to get 1D arrays from my matrix.
I think this must be simple but I can't get it right... I have
I have a 101x82 size matrix called A . Using this variable matrix, I
I'm having this problem for quite a long time - I have fixed sized

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.