Questions tagged [plotting]

For questions about plotting data related to a computational problem. Be sure to include the program/language you are using to create the plot.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Getting gradient from voxel, is it possible and how?

The R package rmarchingcubes implements a marching cubes algorithm. Given a voxel contructed from a function defining an isosurface, it returns a 3d mesh with some vertex normals. When I plot this ...
user avatar
0 votes
1 answer
67 views

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

I want to plot some functions f(x,y) including singularities. For example; f(x,y)=tan(x-y) In Matlab, when I run the following code ...
user avatar
  • 101
0 votes
1 answer
127 views

How to draw a vertical line in Paraview Line Chart

I would like to insert a series of vertical lines to divide up a line chart. The figure below shows the chart so far, but instead of the orange diamonds I want vertical lines that go from top to ...
user avatar
  • 103
-1 votes
1 answer
113 views

plotting $F=K \frac{q_1 q_2}{r^3}$ in python

I tryin to plot the position of electron in the hidrogen atom by Coulomb's law, $F=K \frac{q_1 q_2}{r^3}$ This is mi code ...
user avatar
0 votes
1 answer
38 views

Plotting two data sets in Octave

I have two data vectors $y1$ and $y2$, and I want to plot both of them as functions of the vector $x$. I want the result to be two overlapping curves. Here is the set of commands I am using. y2=[0.003,...
user avatar
0 votes
0 answers
50 views

FEM solution becoming wider as number of nodes increase

My FEM scheme uses a 4-node quadrilateral element with bilinear shape functions. The simple problem I'm solving is. $\nabla ^2 f = 5$ But as I increase the number of nodes, the plot of the solution ...
user avatar
  • 1
0 votes
1 answer
558 views

How to use cumtrapz correctly?

I have tried to do a trapeze integration with f(x)=x^2, where I know how the antiderivative looks like, so F(x) = (1/3)x^3 Here's my code, just like I tried: ...
user avatar
1 vote
1 answer
790 views

Bode diagram without bode() function

Is there any way to make a bode plot without using the MATLAB/GNU Octave function bode()? As an example, here is a function I am working on: $$H(s) = \frac{1}{2s^...
user avatar
-1 votes
1 answer
158 views

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

I'm terribly green, please forgive me. I need to plot the difference between a chosen calculated Taylor expansion $e^x=1+x+\frac {x^2}{2!}+\frac {x^3}{3!}+\frac {x^4}{4!}+\frac {x^5}{5!}$... and the ...
user avatar
1 vote
1 answer
55 views

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

My professor taught us to always use the Matlab command axis equal for our simulation data plots - for all of our homework assignments. However, in studying the ...
user avatar
2 votes
1 answer
294 views

How to plot a heatmap under a curve?

If I were to have a data for a one-dimensional system evolving in time, essentially a two-dimensional array, and the array at each point in time is of the same size, how would I produce something like ...
user avatar
  • 23
-1 votes
1 answer
336 views

Plot of a function involving an integral and value changing parameters [closed]

I'm trying to plot the cross section with respect to the photon energy $h\nu$ but for $\gamma = 1.0, 1.2, 2.0 $ in the same axes $\sigma = \left[\left(\frac{\xi_{eff}}{\xi_{0}}\right)^2 \frac{n_r}{\...
user avatar
0 votes
2 answers
331 views

contour plot of cloud of points [closed]

I have a cloud of points scattered in a rectangle and some data in this points, a bit like this $$ x(:)=[x(1), x(2), ..., x(N)] \\ y(:)=[y(1), y(2), ..., y(N)] \\ u(:)=[u(1), u(2), ..., u(N)] $$ ...
user avatar
3 votes
1 answer
208 views

Estimation of viscosity from critical properties

The above graph represents reduced viscosity as a function of reduced temperature for several values of the ...
user avatar
  • 33
1 vote
0 answers
204 views

How to set the errorbars in a different color from the plot in Matlab? [closed]

When making a plot in Matlab using errorbar(...) the color of the error bars is the same as the plot. How do I set them to be in a different color? I tried looking ...
user avatar
  • 163
3 votes
2 answers
1k views

Graphing electric potential of a ring of charge using MATLAB help

Here is a summary of what I am trying to do: Use MATLAB to compute the potential $V$ at any point $(x, y, z)$ in space due to a uniform ring of charge. Use a Riemann sum to compute the integral ...
user avatar
  • 163
0 votes
1 answer
112 views

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

This is part of the code in matlab for a random-walk simulation. To test the code, I'm using steps=[30]; there will be more values, but I want to run it for 1 trial to decrease code processing. <...
user avatar
1 vote
1 answer
1k views

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

I have a set of data data.txt which can be fit to a Gaussian function, f(x). I want to determine the coordinates of the point of ...
user avatar
  • 61
1 vote
1 answer
3k views

Efficiently plot a finite element mesh solution with Matplotlib

I am looking for the most efficient way to plot a mesh using Matplotlib given the following information, coordinates of each node, what nodes belong to each element, and the value each node has. Below ...
user avatar
  • 155
1 vote
1 answer
168 views

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

Ideally, I would like to get the symbolic/algebraic integral of the function and plot the resulting surface in 3d. I am not sufficiently versed in SciPy to know if this is even really possible.
user avatar
0 votes
2 answers
153 views

Plot a multi-variable equation in (discontinuous) regions

The goal is to display the relation between K and E in the following equation: $$\cos(K) = 5 \text{sinc}( 5.12\sqrt{E} ) - \cos(5.12\sqrt{E} )$$ The intended result is: However, using the following ...
user avatar
  • 125
0 votes
1 answer
90 views

How to report non-monotonic runtimes in convergence plots

Let's say I have an algorithm that can be tuned by a parameter $h>0$ and is expected to converge as $h\to 0$. I want to study the computational complexity of this algorithm, i.e., how the ...
user avatar
  • 717
1 vote
0 answers
2k views

Software for easy spherical coordinate plotting from data file

Does anyone have any suggestions for good open source plotting software which has good graphical spherical coordinate plotting (from a data file). I have a three column data file where column 1 is $\...
user avatar
  • 111
0 votes
1 answer
63 views

Plotting using 'colorbar' in MATLAB [closed]

I am trying to plot a figure similar to the one attached here,I tried searching how to do a similar kinds of plot and i found about 'colormap','colorbar' in MATLAB. Actually I want to plot this ...
user avatar
  • 229
1 vote
1 answer
1k views

Strong scalability plot, HPC

I have to create a strong scalability plot, which measures the execution time for a numberOfThreads =1,2,4,8,16 with size=1024. ...
user avatar
  • 13
1 vote
1 answer
272 views

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

I am currently trying to plot a function which describes linear perturbation growth in cosmology for different world models. I would like to be able to have all the curves on the same set of axes, but ...
user avatar
  • 33
1 vote
1 answer
438 views

Plotting Excel data with Julia [closed]

Let me first be clear that I'm still new to Julia. I need to plot time series data contained in an Excel file using Julia. So far I couldn't find any packages for that. The only workaround I found ...
user avatar
  • 13
2 votes
1 answer
469 views

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

I'm trying to make a 2D contour plot of a function with a complex input and a real output, namely: $f(z=x+iy)= |z^2-3z|$, on MATLAB. I want to make a contour plot of f, such that the axes are $(x,y)$, ...
user avatar
1 vote
1 answer
654 views

2d slice cut of tetrahedral mesh in tecplot 360 ex [closed]

I have made a 2d slice cut of a 3 dimension figure. When I select "mesh" to display the mesh on the slice, tecplot seems to connect the vertices in a strange way (it seems like two 2d meshes are ...
user avatar
  • 65
1 vote
1 answer
643 views

3-dimensional plotting with nonuniform grids

I have 3 variables I am considering: time (t), 1-dimensional space (x), and intensity (I). I would like to plot the intensity in the z-axis as a function of t and x (the latter two variables would ...
user avatar
  • 518
1 vote
2 answers
432 views

Generating 4D Plots in Matlab

I have some data in the form of: ...
user avatar
0 votes
1 answer
257 views

Nice plot of f(x)

A user has this nice graph of f(x) on his profile and I want to learn how to do it in matlab or Gnu octave. ...
user avatar
0 votes
1 answer
313 views

How to plot selection over time for only components, but not magnitute. of a vector in paraview?

I am doing a time evolution analysis for a structure and have already got the displacement result, which is a vector including x and y components. And I want to plot the time evolution of x and y ...
user avatar
  • 649
5 votes
1 answer
1k views

What determines the usual chemistry textbook plots of atom orbitals?

In elementary chemistry textbooks you often have pictures like the following one: Are there any conventions how to get them? I am not sure, but I guess that it are contour plots with only one iso-...
user avatar
  • 231
1 vote
1 answer
570 views

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

How can I make a scatter plot like the following, where the density of points represents the magnitude of the scalar field at that point. Consider for example the probability density for an atom: I ...
user avatar
  • 231
0 votes
3 answers
1k views

How to plot a price level matrix in Matlab?

I have a matrix P of m rows and n columns. P(i,j) contains the price of occupying position i at time j. I want to plot this in Matlab but in a way to get some kind of density plot with different price ...
user avatar
0 votes
2 answers
4k views

Having smoother contour plots in MATLAB

I have a $80\times200$ matrix, and I want to plot its contents with the contourf command in MATLAB, as follows: \begin{align} &\text{[C,h] = contourf(mat,100);}\\ &\text{set(h,'LineColor','...
user avatar
0 votes
3 answers
95 views

Software recommendation for plotting data from lab tests

I have several files of data created by LabView of hydraulic pressure testing over the course of a few days. This data is mostly time with various pressure and temperature measurements. Can you ...
user avatar
1 vote
1 answer
243 views

How to change level of contours in animation for Tecplot360

I am working on a transient heat transfer problem. The problem that I have is as the time goes the range of temperature is changing but Tecplot only use one sort of levels for contour for all of time ...
user avatar
0 votes
1 answer
99 views

Visualise data under Tecplot

I have a set of data that I need to visualise under Tecplot, the file format is for example: ...
user avatar
  • 3
1 vote
1 answer
366 views

Satisfying Periodic Boundary Conditions while plotting spherical particles inside a cube

I am trying to plot spherical particles in a cube of fixed dimension in matlab. I face a problem here where the center of the sphere is too close to the edge of the cube in this case the rest of the ...
user avatar
3 votes
2 answers
674 views

Should a colorbar have constant values throughout a simulation?

The default option for matplotlib's pcolormesh (also true for VisIt and I think also true for Matlab) is to allow the maximum and minimum of a colorbar vary. Which ...
user avatar
1 vote
0 answers
116 views

How to curve fit an unknown function?

I have data which can be described by $y=f(x,z)$ where $z$ varies from 170 ~ 154. Now values given by $ks$ are known sample values that equals value given in the table header, $uks$ are unknown ...
user avatar
  • 119
2 votes
2 answers
105 views

Adaptive plotting of two-variable functions $z=f(x,y)$ algorithm pseudocode?

I am looking for explanations of algorithms to adaptively sample a function of two variables $f(x,y)$, in a given domain $x_0\le x \le x_1$, $y_0\le y \le y_1$. Intuitively, I want to sample more ...
user avatar
  • 1,629
1 vote
2 answers
2k views

How to calculate grid coordinates of the centroid based on four attributes in a spider chart

04/06/15 After more research I found a candidate algorithm but it seems to be incomplete. I have also reworked the spider chart to number all of the boxes using an x,y ((origin = 1,1) lower left) ...
user avatar
2 votes
1 answer
221 views

How to plot feasible design space of a Generic Multiobjective Optimization problem?

As you know, a generic Multiobjective optimization problem can be stated as follows: $min{\space}F(\bf{X})=[f_1(x),...,f_n(x)]$ $h_k(x)=0{\space\space\space} k=1,...,n_e$ $g_i(x)\leq0{\space\space\...
user avatar
  • 145
1 vote
2 answers
82 views

Help on writing sofware: general guidelines, in particular separation of computation and visualization

Although I already did some work in the intersection of theory and simulation I'm still very new to this field and I need some guidance. If anybody can give some recommendations for introductory ...
user avatar
3 votes
1 answer
2k views

2D cross section from 3D surface

I am trying to apply the "restoring force surface" method to a dynamic linear system. The idea behind this method is that, knowing acceleration, displacement, velocity and input force it is possible ...
user avatar
  • 382
1 vote
0 answers
912 views

Plotting renormalization group flow diagram from recursion relation [closed]

How do I plot a flow diagram (given certain initial conditions, the trajectory in y-x space) for a RG (renormalization group) flow given by the following recursion relations? \begin{eqnarray} x^{\...
user avatar
2 votes
2 answers
245 views

single-variate function variational Intensity Plot for Matlab

I'm wondering if it's possible to create functional intensity plots in matlab. Examples of what I'm looking for are below found in this paper: These figures were (guessing) probably made in R, but is ...
user avatar
  • 131