Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have these values
Temperature
4
25
37
55
80
and
Rate
.1235
.092
.0864
.057
.0044
I wish to create a bar graph with Rate on the X-axis and Temp on the Y-axis.
I create a spreadsheet with the values and highlight the data.
Then I click on insert clustered column graph.
However, it gives me temp on the y axis and the numbers 1 through 5 on the x axis.
How can I make it so Rate is on the X-axis and Temp is on the Y-axis?
Isn't rate going to be dependent on temperature? If so, temperature should be the independent variable (X) and rate the dependent variable (Y).
Aren't these continuous measurable quantities? If so, rather than a bar chart, you should probably make an XY Scatter chart. (As Pnuts hinted at.)
Put your X values into a column, and your Y values into the next column, as shown below, then insert an XY Scatter chart. I used the style with markers and straight lines.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have a data frame as shown below
df
Threshold Total_cost
0.7 150040
0.8 150843
0.9 149410
1 148981
1.1 149163
1.2 150017
By using above df I would like to plot a line graph in python with y axis as Total cost and x axis as Threshold.
Where y axis range could be 148000 to 151000.
And I also wants to highlight the point where Total_cost is minimum.
In this case which is (1, 148981).
You can use idxmin to locate the row with minimum cost:
ax = df.plot(x='Threshold')
(df.loc[[df['Total_cost'].idxmin()]]
.plot.scatter(x='Threshold', y='Total_cost',
color='r', ax=ax)
)
Output:
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I'm trying to make a simple scatter plot in Excel. One variable are field measures of river flow. The other one is the fitted rating curve (done externally). I draw the field measures as marked scatter plot. For the rating curve I created a column with the water level at each centimeter and the respective water flow calculated with the curve equation. With this pair (water level, water flow) I have added a second series and changed from marked scatter to straight lined scatter plot.
The problem is that I need to see the rating curve over the measures plot. I had changed the plot order but didn't work. The marked plot is always over the lined one.
Any suggestion!?
I have not had success with changing series order causing scatter data to appear behind a line. Even though the order of the Legend will change, the plot order does not appear to be affected.
In order to get your line to appear in front of the scatter data, you will need to put the line on the Secondary Axis, then make sure your min/max values for the secondary axis are the same as the primary.
If you don't want to see the secondary axis set the Label Position to None.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I want to plot a 3d graph from three columns representing x,y,z e.g.
x,y,z
1,1,0
1,0,1
01,1,0
Excel does not support this type of plot. Is there any free alternatives?
In a similar question, the author ended up with matplotlib: 3D Plotting from X, Y, Z Data, Excel or other Tools
I know there are programming based software, like Gnuplot and matplotlib, can do this, but I want to use something with UI like excel to be able to mouse-select those columns to plot.
Thanks.
You can use a surface chart in Excel.
It is not possible to do it as you wish: You cannot just give the coordinates of each point with (x,y,z) and obtain the plot.
However, you can have the values z for each combinations of x and y, and you plot them.
You will just have to modify the name "series 1" "series 2" by the values of Y in order to obtain your 3D plot. see the graph .
In the attached image, I selected cells D3:F8 and did a surface chart. Then I right click on the graph and change "series 1" by "1", "series 2" by "2" ...
Hope that helps.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Could someone explain Gouraud shading to me? I can go ahead and Google "gouraud shading", but it doesn't make much sense to me. I have 3 vertices with an (x, y) position and an int[r,g,b] color. I want to linearly interpolate (not sure what this means) the colors of the vertices to shade in the triangle. What is the logic for doing so?
You will perform a bi-linear interpolation.
Scan the triangle from top to bottom, following the rows of pixels. Every row will intersect the triangle twice, along two distinct edges.
You will first perform two linear interpolations along these edges, computing a mixture of the RGB components at the vertices, weighted with the distances to these (weight Db/(Da+Db) for color a and Da/(Da+Db) for color b).
Then you will scan the pixels between the intersections, performing another linear interpolation between the two colors you just computed.
This way you will fill the triangle with a smooth gradient, in a way that will make it continuous with neighboring triangles, if any.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to calculate the shortest distance between a point and a triangle.
I tried the following,
1. Calculate the centroid of triangle.
2. Form a line between the centroid and the point.
3. Find which side of triangle is intersection with the above formed line.
4. Find the perpendicular distance between the point and the intersecting line found in step (3).
Am I doing something wrong? Can anyone help me in getting the distance?