How can I plot multi value in same bar with coloure range

  • Thread starter Thread starter karnake
  • Start date Start date
  • Tags Tags
    Plot Range Value
Click For Summary

Discussion Overview

The discussion revolves around how to create a bar plot in MATLAB that represents the thickness of several pipes at different heights, with each bar reflecting a different color based on thickness ranges. Participants are seeking assistance with writing an m-file to achieve this visualization using data from an Excel sheet.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant requests help with an m-file to plot pipe thickness data from an Excel sheet, specifying the need for different colors for thickness ranges at various heights.
  • Another participant clarifies that an m-file is a script file for MATLAB and suggests that the original poster is likely using MATLAB's function to read Excel data.
  • A participant expresses confusion about the term "m-files" and questions whether the data is in an Excel format, prompting a request for a screenshot of any plot attempts.
  • The original poster confirms that they want to use MATLAB for plotting and provides a sample of their Excel data.
  • One participant acknowledges an adjustment made by the forum admin to a previous post.

Areas of Agreement / Disagreement

There is no consensus on the specific method to create the desired plot, and multiple viewpoints regarding the use of m-files and MATLAB functionality are present.

Contextual Notes

Participants have not resolved the specific steps required to create the m-file, and there are unresolved questions about the data format and plotting techniques.

karnake
Messages
5
Reaction score
0
Hi Friends
Can anyone help me with m-file for the subject below

I have an Excel data sheet Which give Thickness of several pipes on 5 Different heights and I want to plot each bar is for one pipe with 5 values in 5 Different heights and give A different color for Thickness range

example
my heights values is on 25cm ,50cm , 75cm .100cm , 125cm On this heights I read
first pipe Thickness 3.07 3.11 3.18 3.05 3.06
seconde pipe Thickness 3.09 3.1 3.11 3.09 3.08
third pipe Thickness 3.14 3.15 3.13 3.08 3.05

So I want plot one bar for Each pipe and give A different color to Each Thickness range At Each heights
many thanks for all
 
Last edited by a moderator:
Physics news on Phys.org
Bump.
 
Last edited by a moderator:
karnake said:
Hi Friends
Can anyone help me with m-file for the subject below

I have an Excel data sheet Which give Thickness of several pipes on 5 Different heights and I want to plot each bar is for one pipe with 5 values in 5 Different heights and give A different color for Thickness range

example
my heights values is on 25cm ,50cm , 75cm .100cm , 125cm On this heights I read
first pipe Thickness 3.07 3.11 3.18 3.05 3.06
seconde pipe Thickness 3.09 3.1 3.11 3.09 3.08
third pipe Thickness 3.14 3.15 3.13 3.08 3.05

So I want plot one bar for Each pipe and give A different color to Each Thickness range At Each heights
many thanks for all

I'm not familiar with "m-files". If you are doing this in Excel, wouldn't it be a *.XLS type file?

Can you show a screenshot of your plot attempts so far?
 
An m-file is a script file for MATLAB. He is probably using MATLAB's built-in function that reads in Excel data.
 
berkeman said:
i'm not familiar with "m-files". If you are doing this in excel, wouldn't it be a *.xls type file?

Can you show a screenshot of your plot attempts so far?

thanks for reply
yes it's filename.xls file but iwant use MATLAB to plot it
 
Last edited by a moderator:
Here is my data in Excel sheet:
Code:
	at the elbow level 				at the middle level	
						
	1	7.3		-	1	7.3
	6	7.4		-	6	7.5
	11	7.1		-	11	7.4
	16	7.4		-	16	7.3
	21	7.5		-	21	7.4
	26	7.2		-	26	7.5
	31	7.4		-	31	7.4
	36	7.5		-	36	7.5
	41	7.3		-	41	7.2
	46	7.4		-	46	7.4
	51	7.5		-	51	7.5
	56	7.3		-	56	7.3
	61	7.2		-	61	7.5
	66	7.5		-	66	7.4
	71	7.3		-	71	7.4
	76	7.5		-	76	7.3
	81	7.2		-	81	7.3
	86	7.4		-	86	7.5
	91	7.4		-	91	7.4
	96	7.5		-	96	7.5
	101	7.4		-	101	7.3
	106	7.4		-	106	7.4
	111	7.3		-	111	7.2
	116	7.5		-	116	7.4
	121	7.4		-	121	7.5
	126	7.4		-	126	7.2
	131	7.2		-	131	7.4
	135	7.3		-	135	7.5

And the attachment pic was made by MATLAB from the Excel datasheet and my asking is how to make M-file to give this pic.
 

Attachments

  • 003 - ARCH.jpg
    003 - ARCH.jpg
    29 KB · Views: 546
Last edited by a moderator:
thanks to admin for adjustment of my past post
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
5
Views
31K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 0 ·
Replies
0
Views
5K