Skip to main content
8 votes
Accepted

Estimation of viscosity from critical properties

You can use Plot Digitizer and extract the data points in your image graph as a xml file and then you can parse it by using Python. It's pretty straightforward. You need to import the image of your ...
Mithridates the Great's user avatar
6 votes

What determines the usual chemistry textbook plots of atom orbitals?

Your intuition is right, for example in 3D Orbitals (German Wikipedia) the caption explicitly states that 90% iso-surfaces are used. I have however seen different percentages before where the results ...
PatrickS's user avatar
  • 156
6 votes
Accepted

How can I draw a regression line in log scale?

Not much time, but I'll attempt an explanation. Short version That regression line looks correct; it is perfectly normal that regression lines might look wonky when you plot them in log-space, because ...
Federico Poloni's user avatar
4 votes
Accepted

Nice plot of f(x)

Using Python and mpmath: import matplotlib import mpmath f = lambda z: z**3-z+1 mpmath.cplot(f, points=100000) Easy peasy.... See here for the documentation on <...
GertVdE's user avatar
  • 6,179
3 votes

How to make scatter plots of scalar fields with free software?

Points for a scatterplot of a probability density function can simply be sampled from it. I used the Psi(X1, X2) you defined in your linked post. The number of ...
PatrickS's user avatar
  • 156
3 votes
Accepted

Strong scalability plot, HPC

As sensitive_scientist mentioned, Measuring Parallel Scaling Performance provides the information you want on how to calculate strong\weak scaling. I've plotted your data in a way I consider it the ...
Anton Menshov's user avatar
  • 8,672
3 votes
Accepted

Graphing electric potential of a ring of charge using MATLAB help

You don't need symbolic variables to compute the approximated potential for your Riemann sums. You can just use meshgrid to evaluate the potential in each point of ...
nicoguaro's user avatar
  • 8,510
3 votes

Graphing electric potential of a ring of charge using MATLAB help

I received a solution to this question from MATLAB's community. Essentially, I need to specify which contour lines to plot using the 'levels' spot on the 'contour()' command. Levels allows you to ...
Andrew's user avatar
  • 163
3 votes
Accepted

Efficiently plot a finite element mesh solution with Matplotlib

You might be interested in trying other visualization tools such as ParaView, Mayavi or PyVista. But, since the question is about Matplotlib, I would suggest that you use ...
nicoguaro's user avatar
  • 8,510
3 votes

SciPy 3d plotting Integral of $\int x^y dx$ for $y$ in $[-4,4]$

As you may know: $$ \int x^y \, dx = \dfrac{x^{y+1}}{y+1},$$ with $y \neq 1.$ If you want to plot the function $ \dfrac{x^{y+1}}{y+1}$ for a specific $y$ using Matplotlib, here is the answer: ...
David's user avatar
  • 145
3 votes
Accepted

Plot a multi-variable equation in (discontinuous) regions

First, you originally wrote that your equation is $\cos(K)=5 \text{ sinc}(5.12\sqrt{E})- \cos(5.12\sqrt{E})$, but you clearly meant $\cos(K)=5 \text{ sinc}(5.12\sqrt{E}) + \cos(5.12\sqrt{E})$ Second, ...
LedHead's user avatar
  • 1,253
3 votes
Accepted

How to draw a vertical line in Paraview Line Chart

I would add an extra variable, that goes between the max and min of your other variables and only changes value when your method changes, and, thus, connects them as a sum of step functions. In some ...
Bill Barth's user avatar
  • 10.9k
3 votes

How to remove singularit​ies/discon​tinuities on 3D plots in Matlab?

MATLAB doesn’t plot where there are NaNs, so you can replace some of your data with NaNs to make a clean jump. I don’t know which is a bigger lie, a clean jump or a strange wiggle. That’s up to your ...
Bill Barth's user avatar
  • 10.9k
3 votes
Accepted

Why is the maximum potential energy greater than the maximum kinetic energy?

You've defined your potential energy incorrectly. Your spring forcing function is $$ F = b x + w^2 x^{p-1} $$ The change in potential energy is defined as $$ \Delta V = \int_{x_0}^{x_1} F dx = \left.\...
helloworld922's user avatar
2 votes

How to report non-monotonic runtimes in convergence plots

It sounds like you actually have three pieces of information here -- h, error, and runtime. Plotting accuracy vs runtime isn't that useful if there is no correspondence with h (and so the user of ...
Ethan Coon's user avatar
2 votes

Gnuplot: How can I determine the maxima of a fit function in gnuplot?

According with this blog the way to find max e min with gnuplot is: With Gnuplot 4.6 the both the x and y coordinate of maximum and minimum points can be find out easily. The method is using new ...
Mauro Vanzetto's user avatar
2 votes
Accepted

Plot of a function involving an integral and value changing parameters

Your function func(rho, gamma) takes two arguments while you pass only one (I think none). That is what your error tells you. Recheck where you use ...
reboot's user avatar
  • 36
2 votes
Accepted

Using Axis Equal for Matlab simulation plots of the SIR model gives very flat solution curves

In general, one should be very cautious in taking any blanket-statements as an absolute rule. While your professor before might have implied a different logic sequence, mentioned/forgot to mention ...
Anton Menshov's user avatar
  • 8,672
1 vote
Accepted

Plotting two data sets in Octave

Use plot(x,[y1;y2]) but make sure that y2 is of the same size as y1, because in your example that isn't the case.
Ron's user avatar
  • 725
1 vote

How to use cumtrapz correctly?

You are approximating a definite integral with cumtrapz it won't give you the same result as the integrated equation unless you add a constant and plot with the ...
wwfe's user avatar
  • 66
1 vote

Plotting the difference between an exponential and its Taylor expansion as a function of number of terms?

So why don't you very literally do what is being asked. The difference between two curves is the surface area between the two curves. This is 1 number, which you can then plot as a function of the ...
DannyVanpoucke's user avatar
1 vote
Accepted

How to plot a heatmap under a curve?

I answered a similar question in StackOverflow. The main "trick" is to transform your grid before plotting. For example, using the following transformation \begin{align} &t' = t\, ,\\ &x' = ...
nicoguaro's user avatar
  • 8,510
1 vote

contour plot of cloud of points

In essence, what you want to do is interpolate data: You want to find a function $U(x,y)$ so that $U(x_i,y_i)=u_i$. This is then the function for which you'd like to do draw isocontours. You should ...
Wolfgang Bangerth's user avatar
1 vote

contour plot of cloud of points

The only way I know of to visualise such data is to first triangulate it. Matlab can do the triangulation. See the Matlab functions 'delaunay', 'trisurf', 'pdecont'. This works if the domain is convex....
cfdlab's user avatar
  • 3,028
1 vote

Monte Carlo - Random Walk Simulation - polyfit the log log data points?

If I understood the first image correctly, you should do a linear fit with $\ln(N)$ being the independent variable and, presumably, $\ln(d)$ the dependent variable. Furthermore, it seems to me that ...
Ertxiem - reinstate Monica's user avatar
1 vote
Accepted

Plotting using 'colorbar' in MATLAB

The plot you have shown was probably created using imagesc. The colors were choosen with the colormap command and the color bar is shown with colorbar.
H. Rittich's user avatar
1 vote

Plotting the same function multiple times on the same set of axes but with different parameters [Python]

The following code gives the plot in less than a sec on my pc. ...
Stelios's user avatar
  • 731
1 vote
Accepted

Plotting Excel data with Julia

I have to options to extract data from Excel documents: ExcelReaders Taro Once you have the data you can use Gadfly.
wrong_path's user avatar
1 vote
Accepted

Contour plot of a scalar function over the complex domain in MATLAB

You need to define a mesh over which your function will be evaluated [mfRe, mfIm] = ndgrid(-1, 1, 100); Then evaluate your function ...
Dylan Richard Muir's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible