Straight lined scatter over marked scatter plot [closed] - excel

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.

Related

Set horizontal bar graph width for single value using matplotlib [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
Kindly help with limiting the width of a horizontal bar graph with single value plotted using barh in matplotlib & python3:-
The problem is with one or two values the width of each bar covers complete height of the graph.
I want the bar width to be fixed whether there are 10 values or 1 value.
Use ylim. Detailed information can be found in the documentation: https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.ylim.html . This should fix the issue of matplotlib ignoring the width argument when only plotting one value.
If you give ylim a negative value as first argument, it will show some space between the x-axis and the bar, if you'd like to:
e.g. plt.ylim(-0.5,12)
If there's more than just one value, the width argument should just do the work.
How the code looks like:
import numpy as np
import matplotlib.pyplot as plt
labels = ['SomeLabel']
data = [21]
width = 0.2 # which is actually the height from this point of view
plt.plot()
plt.barh(labels, data, width)
plt.ylim(0, 5)
plt.show()

Is there any Excel like but free software that is able to plot X-Y-Z 3d graphs [closed]

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.

How to do gouraud shading? [closed]

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.

Graphing in Excel [closed]

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.

Distance between triangle and a point in 2D [closed]

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?

Resources