graphing

Python(sympy) : How to graph smoothly in 2nd ODE solution with Sympy?

Python(sympy) : How to graph smoothly in 2nd ODE solution with Sympy? Question: I’m studing about structural dynamic analysis. I solved a problem : 1 degree of freedom The question is m*y” + cy’ + ky = 900 sin(5.3x) m=6938.78, c=5129.907, k=379259, y is the function of x I solved it’s response using by Python …

Total answers: 1

How to draw a tree diagram from a large dictionary

How to draw a tree diagram from a large dictionary Question: My dictionary is large basically some dictionary values intersect and I would like to represent that in form of a graph. My_dictionary = { A : {1 , 2, 4 }, B : {1,3}, C : {5} ….. etc} The desired outcome is a …

Total answers: 1

Numpy: Complex Equation Curve is Plotted Incorrectly

Numpy: Complex Equation Curve is Plotted Incorrectly Question: I am trying to use the Python to do some graphical analysis. I need to plot this equation: Where fn is on the x axis (log scale 0 – 10) and Mg is on the y axis. Ln and Qe are dummy variables that I will enter …

Total answers: 1

Graphing a parabola with inputs in matplotlib

Graphing a parabola with inputs in matplotlib Question: so I’ve created a quadratic equation solver in python, and I want a graph to go along with it. I want this graph to depict the parabola. a = an input for a in quadratic equation b = an input for b in quadratic equation c = …

Total answers: 1

How To Graph Points With Sympy?

How To Graph Points With Sympy? Question: I need to calculate and graph a function and it’s first two derivatives. Then, I need to graph the minimum and maximum points of the original function on the graph. I have calculated these, but am lost as to how to graph the data. The x values for …

Total answers: 4

Matplotlib log scale tick label number formatting

Matplotlib log scale tick label number formatting Question: With matplotlib when a log scale is specified for an axis, the default method of labeling that axis is with numbers that are 10 to a power eg. 10^6. Is there an easy way to change all of these labels to be their full numerical representation? eg. …

Total answers: 6

How to add titles, axis label, and legend in sagemath?

How to add titles, axis label, and legend in sagemath? Question: I’m currently making some graphs using the online workbook hosted by sagemath. This is an example of some code I’m making to try and generate a graph: myplot = list_plot(zip(range(20), range(20)), color=’red’) myplot2 = list_plot(zip(range(20), [i*2 for i in range(20)]), color=’blue’) combined = myplot …

Total answers: 3

matplotlib set yaxis label size

matplotlib set yaxis label size Question: How can I change the size of only the yaxis label? Right now, I change the size of all labels using pylab.rc(‘font’, family=’serif’, size=40) but in my case, I would like to make the y-axis label larger than the x-axis. However, I’d like to leave the tick labels alone. …

Total answers: 2

Matplotlib – Move X-Axis label downwards, but not X-Axis Ticks

Matplotlib – Move X-Axis label downwards, but not X-Axis Ticks Question: I’m using Matplotlib to plot a histogram. Using tips from my previous question: Matplotlib – label each bin, I’ve more or less go the kinks worked out. There’s one final issue – previously – the x-axis label (“Time (in milliseconds)”) was being rendered underneath …

Total answers: 2

Matplotlib – label each bin

Matplotlib – label each bin Question: I’m currently using Matplotlib to create a histogram: import matplotlib matplotlib.use(‘Agg’) import matplotlib.pyplot as pyplot … fig = pyplot.figure() ax = fig.add_subplot(1,1,1,) n, bins, patches = ax.hist(measurements, bins=50, range=(graph_minimum, graph_maximum), histtype=’bar’) #ax.set_xticklabels([n], rotation=’vertical’) for patch in patches: patch.set_facecolor(‘r’) pyplot.title(‘Spam and Ham’) pyplot.xlabel(‘Time (in seconds)’) pyplot.ylabel(‘Bits of Ham’) pyplot.savefig(output_filename) I’d …

Total answers: 3