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

In summary, the individual is trying to create a plot for each pipe with a different color for thickness range at different heights
  • #1
karnake
5
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
  • #2
Bump.
 
Last edited by a moderator:
  • #3
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?
 
  • #4
An m-file is a script file for MATLAB. He is probably using MATLAB's built-in function that reads in Excel data.
 
  • #5
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:
  • #6
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: 489
Last edited by a moderator:
  • #7
thanks to admin for adjustment of my past post
 

1. How do I plot multiple values in the same bar?

To plot multiple values in the same bar, you can use a stacked bar chart. This type of chart allows you to display different categories of data on top of each other in a single bar. You can also use a grouped bar chart to show multiple values side by side within the same bar.

2. Can I use different colors to represent the range of values in a single bar?

Yes, you can use different colors to represent the range of values in a single bar. This can be achieved by using a color scale or gradient that maps different colors to different values. This will make it easier to visualize the range and distribution of the data within the bar.

3. What is the best way to label the different values within a single bar?

The best way to label the different values within a single bar is by using data labels. These labels can be placed directly on the bar or on top of the bar chart. You can also use a legend to indicate the different values and their corresponding colors.

4. How can I customize the color range for my bar chart?

To customize the color range for your bar chart, you can use a color scale or gradient. This will allow you to choose specific colors and ranges for each value within the bar. You can also adjust the saturation and brightness of the colors to create a more visually appealing chart.

5. Are there any tools or software that can help me plot multi value in the same bar with color range?

Yes, there are many tools and software available that can help you plot multi value in the same bar with color range. Some popular options include Microsoft Excel, Google Sheets, Tableau, and D3.js. These tools have built-in features and functions that allow you to create customized bar charts with multiple values and color ranges.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
5
Views
30K
  • Programming and Computer Science
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
7K
  • Mechanical Engineering
Replies
1
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
  • Other Physics Topics
Replies
0
Views
4K
Back
Top