I am struggling to get the following code to work in Python 3. from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d.art3d import Poly3DCollection import matplotlib.pyplot as plt fig = plt.figure() ax = Axes3D(fig) x = [0,1,1,0] y = [0,0,1,1] z = [0,1,0,1] #verts = [zip(x, y,z)] verts = list(zip(x, y, z)) ax.add_collection3d(Poly3DCollection(verts)) plt.show() The next to last line gives the following error: TypeError: zip argument #1 must support iteration How do I fix this? |
+0 forum
2 | ||

Code Snippet
Multiline temperature plot (Python MatPlot) I used csv data readily available from http://www.weatherdatadepot.com/ to create a multiline plot of the average monthly temperatures of a given location. |
+1 forum
0 | ||

Code Snippet
Printing a polar worksheet To refresh my mind I did some exercises about complex numbers. I was constantly drawing axes and arrows. So I decided to print out some worksheets with a program to make my life a bit easier, and because it is always fun to design a little program to do that for me. Like to share this. Enjoy. This how it can look on the screen. ![Polarsheet.png](/attachments/large/1/9d876fc2d39ccc5c0d6fcf366a09a2a2.png "align-center") The listing just shows the main two classes. In the possiblity that anyone would be interested in the whole project, I might send a zip file. But it should be obvious how to … |
+2 forum
0 | ||

Let's say I have a 10X10 array that is a multiplication table, multiplied times some arbitrary integer constant. For this example, pretend that constant is 5. So the first row would be 5, 10, ..., 45, 50; the second row would be 10, 20, ..., 90, 100; etc. When doing a color plot, matplotlib numbers both axes by the index number, not the value contained therein. So how would I get this graph to have scales of 10n X 10n, not 10X10, using matplotlib? |
+0 forum
0 | ||

I am trying to plot a graph in matlab using c++. But the matlab is only giving me an empty graph. void portfolio::viewGraph() { double value[20]; //store portfolio value double time[20]; //store time int i=0,j=1; double cash,p; ifstream in_file("transactionhistory.txt", ios::in); string c; while(in_file>>cash>>p>>c>>c>>c>>c>>c) { value[i]=(p+cash); cout<<p<<endl; time[i]=j; cout<<time[i]<<endl; i++; j++; } Engine *ep; if (!(ep = engOpen(NULL))) { return ; } int t=20; mxArray *A; // assume a gets initialized, all values A=mxCreateDoubleMatrix(1,i, mxREAL); memcpy((void *)mxGetPr(A), (void *)value, sizeof(double)*i); engPutVariable(ep, "value", A); mxArray *B; // assume a gets initialized, all values B=mxCreateDoubleMatrix(1,i, mxREAL); memcpy((void *)mxGetPr(B), (void *)time, sizeof(double)*i); engPutVariable(ep, "time", … |
+0 forum
0 | ||

Dear all, I am using python and trying to plot the large scale of data as follows. A B C D E 1 2 4 5 6 2 3.1 5 1 8. 3 5 5 6 10.1 4 8 9 7 13 5 11 13 12 6 18 19 Just like ABCDE, i have more number of columen about more than 50, and all i want to do is i want to plot all the column with base on A as X axix and all other in Y axis. here is the format i tried but i couldnt f= open('open.txt','r') … |
+0 forum
1 | ||

Hello, I'm new to this community and well to C++ itself. I'm trying to create a graphical calculator which displays the parabolic path of a projectile in the form of a graph plot, but the problem is that I don't even know how to plot points on C++.So can any one please tell me about a command which can plot the said points in the form of a graph. Iwill be much obliged. |
+0 forum
1 | ||

Hi can anyone help me I am using the following code to import data from spread sheet file and plot data- everything working perfect,it plotting one set of data here [B]v=xlsread('table.zn','B2:B20') plot(fliplr(v))[/B] the only thing- I need to plot 2 various set of data on same graph e.g I want to plot colunm [B]B2:B20 and C2:C20[/B] on same graph Thank you |
+0 forum
1 | ||

While surfing the web I got to this site: [url]http://en.wikipedia.org/wiki/Fourier_series[/url] “Hey, I why not write something like this in C#!” The rather scary looking formulas did not withhold me to start coding (see below Fig. 1 and Fig. 2) The formula from Fig. 2 is hidden under one of the sawtooth pictures on the site. Here is the code I came up with. Start a forms application, drop a panel on the form in the designer and name it PlotPanel. Fill in or add the code below and enjoy. With the comments it should be clear what is done, otherwise … |
+0 forum
3 | ||

Hello All, I'm working on my first Python plot in my programming class this week. My assignment is to write a program to plot data contained in a csv format. Here is the data: "Bowl number", "Date", "Bowl location", "Winner", "Number wings eaten" "I", "1/29/1993", "Wyndham Franklin Plaza Hotel", "Carmen ’The Beast From the East’ Cordero", 100 "II","1/28/1994", "The Main Event", "Kevin ’Heavy Keavy’ O"Donnell", 127 "III", "1/27/1995", "Club Egypt", "Kevin ’Heavy Keavy’ O"Donnell""", 133 "IV","1/26/1996","Electric Factory","Glen ’Fluffmaster’ Garrison", 155 "V", "1/24/1997", "Electric Factory", "Eric ’Gentleman E’ Behl", 120 "VI","1/23/1998","Spectrum","Mark ’Big Rig’ Vogeding", 164 "VII", "1/29/1999", "Spectrum", "Bill ’El Wingador’ … |
+0 forum
0 | ||

Code Snippet
Flowerpower! Drawing in polar coordinates in C#. What polar coordinates are is explained [url=http://en.wikipedia.org/wiki/Polar_coordinate_system]here[/url]. I wanted to draw some polar functions myself, so I changed my [url=http://www.daniweb.com/software-development/csharp/code/217204]plotting class [/url] a bit and added a polar struct to a new project.. Just posted code for the Plot class and the polar point structure here. You can find an example of output as well, and the complete project in a zip file. This is just a basic thingy, so error correction is also basic. Enjoy! :) |
+2 forum
0 | ||

Here is my scenario: I have a bunch of data points, each of which shares homology with another. Basically A -> B A ->D B -> C C -> A .:. C ->D, etc... given a bunch of these relations, I need someway to graphically represent these relationships. I picture this somehow with a "web" like graph. Does anything like this exist? Thanks |
+0 forum
1 | ||

I do not need anything too complex, I just need to be able to graph and plot some simple 2D graphs. There is a lot of scattered info all over the internet and at work I dont want to download one of these free softwares and have it blow up my computer. Any Advice? Free and not free graphing software?? Thanks! |
+0 forum
2 | ||

Hi, I'm building a clustering algorithm and need to visualize how data is distributed and relationed. For this, I'm thinking in histograms (numerical and categorical data) and scatter plots. If possible, a 3D like plot like [url]http://www.opendx.org/inaction/datamining/images/original/mci3.jpg[/url] would be nice, but is not required. I'd like to be able to generate the plots from my code (My experience in C++ is limited). Is there a simple package to achieve this that you can recommend? My searches returned: - boost graphics library - opendx - ROOT (CERN) - DISLIN - gnuplot But none of them seemed like the best candidate. What … |
+0 forum
1 | ||

Does VB6 have any feature that allows it to plot points and maybe lines in a 3 dimensional axis? I tried using the MS Charts component but it only allows up to 2D. Any help would be appreciated. Thanks. |
+0 forum
6 |

The End.