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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:42:38+00:00 2026-05-27T23:42:38+00:00

I have a matrix {{2, 1, 2, 2, 1}, {1, 3, 0, 1, 2},

  • 0

I have a matrix {{2, 1, 2, 2, 1}, {1, 3, 0, 1, 2}, {3, 3, 0, 3, 1}, {1, 1, 2, 1, 1}}, and I want to generate a 3d plot such as there are a total of 4*5=20 bars.

There is a bar of height 2 based at the little square (1, 1) (i.e. the square formed on the x-y plane by the points {{0,0},{0,1},{1,1},{1,0}}),

another bar of height 1 based at the little square (1,2) (i.e. the square formed on the x-y plane by the points {{0,1},{0,2},{1,2},{1,0}}),

…

another bar of height 3 based at the little square (2,2) (i.e. the square formed on the x-y plane by the points {{1,1},{2,1},{2,2},{1,2}})

…

and another bar of height 1 based at the little square (4,5) (i.e. the square formed on the x-y plane by the points {{3,4},{4,4},{4,5},{3,5}})

I cannot find an easy way to do this. Thanks a lot for your help!

  • 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-27T23:42:39+00:00Added an answer on May 27, 2026 at 11:42 pm
    data = {{2,1,2,2,1}, {1,3,0,1,2}, {3,3,0,3,1}, {1,1,2,1,1}};
    
    BarChart3D[data, ChartLayout -> "Grid", BarSpacing -> 0]
    

    enter image description here

    Edit

    Updating after wiki-specifying the question :

    BarChart3D[data, ChartLayout -> "Grid", BarSpacing -> {0, 0},
                     LabelingFunction -> (Row[{#1, Reverse[#2 - 1], Reverse[#2]}] &), 
                     AxesLabel -> {"x", "y", "z"}]
    

    enter image description here

    Here the both x and y-spacings vanish. Setting the cursor on a given bar you get z{x_min,y_min}{x_max,y_max}, on the top-red i.e. : 2{4,1}{5,2}

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

Sidebar

Related Questions

I have a matrix A and I want 2 matrices U and L such
I want to write a function to create an empty square matrix have size
I have the foll0wing code to generate a matrix of 0's and 1's using
I have a matrix in MATLAB from which I want to sample every other
I have a matrix with two columns. I want to calculate running 60-day correlation
If I have a matrix such as this: A=[ 8 3 67 8 2
Imagine that I have a matrix of 2x2 or 3x3 pictures and I want
I have a matrix of dimensions 20,000,000*3 stored in a file. I want to
I have a vector x of 1,344 unique strings. I want to generate a
I have a vector x of 1,344 unique strings. I want to generate a

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.