2
votes
1answer
16 views

Plotting exponenetialy growing functions, at a different rate

I need to plot a few curves which grow exponentially on the same plot - with the constraint that they all have a maximum at 1. For reference here is the code: import matplotlib.pyplot as plt from ...
0
votes
0answers
12 views

Plotting an histogram in log log scale with identical bar thickness

I'm trying to plot input data in an histogram in log-log scale (to quickly view if this could fit a power law), but I'm having trouble in outputting the way I want. I'm using Python and more ...
1
vote
1answer
47 views

Superscript in Python plots

I want to label my x axis at follows : pylab.xlabel('metres 10^1') But I don't want to have the ^ symbol included . pylab.xlabel('metres 10$^{one}$') This method works and will superscript ...
1
vote
0answers
32 views

matplotlib - Spectrogram (v1.3.1)

I'm interested in knowing just how matplotlib processes the spectrogram. I understand most parts, specifically in the FFT and others, but, to me the scaling does not seem correct. The default is to ...
0
votes
2answers
43 views

Python Error: “ImportError: No module named six”

I am running Python 2.7 on a Windows 7 OS Here is what I run: >>> import matplotlib.pyplot as plt Then I get this: Traceback (most recent call last): File "<pyshell#3>", line 1, ...
1
vote
2answers
37 views

Separating arrays with numpy to plot with matplotlib in python

I have an array containing 2 data curves, imported from excel. Below is my array. Column 1 is the x axis, while column 3 is the y axis. [[ 0.00000000e+00 8.57250668e-06 0.00000000e+00] [ ...
0
votes
0answers
23 views

Python filled contour plot with lat longs

I have a list of lat longs with associated data, I would like to plot this as a filled contour map in python. I have played around with converting the lat longs to x,y coordinates but this doesn't ...
1
vote
1answer
21 views

Hold is not working for pyplot

I have a problem using pyplot. I am new to Python so sorry if I am doing some obvious mistake. After I have plotted something using pyplot it shows the graph, but when I then try and add e.g. ylabel ...
3
votes
1answer
27 views

How do I get the modern style matplotlib plots often seen in iPython Notebook examples?

Take this page, for example, a sample of which is posted below: It has matplotlib examples with gray background and more subtle coloring, but when I'm running the same examples, I get the more ...
0
votes
1answer
24 views

ImportError: No module named matplotlib.python-dateutil

I'm trying to use py2exe to convert my .pyw to executable file, and encountered this error - "ImportError: No module named matplotlib.python-dateutil" I've installed dateutil before trying to ...
0
votes
0answers
12 views

ax.transAxes matplotlib on basemap doesn't work

I'm doing a map plot use basemap and I want some artist (ex: Polygon) on a graph get transform (when zooming) with apply the transform=ax.transAxes but I doesn't work and I can't see why. here's code: ...
0
votes
1answer
13 views

Scatter plot in matplotlib origin aligned

I've looked all over the net for this incredibly simple thing and can't find it. I have a list of (x,y) points and want to plot them, with the origin in the lower left, grid marks showing ...
1
vote
1answer
13 views

Matplotlib: determining when mouse is in axis text rectangle

So it's somewhat well known that in matplotlib zoom, pressing 'x' or 'y' when zooming will zoom on only the x or y axis. I would like to modify this slightly by subclassing the NavigationToolbar2 in ...
0
votes
0answers
16 views

Convert PNG image (using pypng) for use in matplotlib with figure.figimage

I need a little help. I have a chart that is produced with matplotlib, and the last requirement is to display the company logo (.PNG file) on the chart. However, I cannot use the Python Image Library ...
0
votes
1answer
13 views

Matplotlib Basemap animation

I'm using basemap to plot some points on a map, and I want to add any kind of animation to it. It could literally serve no purpose at all, as long as it is an animation it would be nice. This is what ...
0
votes
1answer
25 views

Calculating PSD

I'm trying to create a spectrogram like the one in matplotlib and in this library, they return the PSD (Power Spectra Density) rather than the absolute magnitude etc.. I want to implement the PSD ...
1
vote
2answers
19 views

Drawing tangent plot in Python (matplotlib)

Today I decided to write simple program in Python, just to practice before exam. Firstly, I wanted to draw sin and cos plot, which wasn't so hard. But then, I decided to challenge myself and draw ...
0
votes
0answers
32 views

How to make a publication quality 3D figure? [on hold]

I am trying to use Mayavi2 from Enthought to make some publication quality figures, but the axes, both normal axes and orientation axes, is too ugly to put into papers. I used Inkscape to add 2D axes ...
2
votes
1answer
28 views

Embedding a matplotlib animation into a tkinter frame

For a project I am working on a simple harmonic motion simulator (How a mass oscillates over time). I have got the data produced correctly and already have a graph produced within a tkinter frame ...
1
vote
1answer
31 views

loading a table in numpy as in R?

I would like to load a table in numpy, so that the first row and first column would be considered text labels. Something equivalent to this R code: read.table("filename.txt", row.header=T) Where ...
0
votes
1answer
10 views

unable to install matplotlib under pythonw3.3 on mac

I am trying to install matplotlib using this command: pip install matplotlib I get this error: src/ft2font.h:16:10: fatal error: 'ft2build.h' file not found #include <ft2build.h> ...
0
votes
2answers
30 views

Plot a histogram from a Dictionary

I created a dictionary that counts the occurrences in a list of every key and I would now like to plot the histogram of its content. This is the content of the dictionary I want to plot: {1: 27, 34: ...
1
vote
1answer
36 views

getting errors when trying to install matplotlib and numpy using pip

I have python version 3.3. I did install pip and now trying to install matplotlib and numpy. pip install matplotlib pip install numpy I get these errors: File ...
1
vote
2answers
28 views

matplotlib verticle lines in scatter plot

I have posted a fair amount of code here and it's at the bottom of this post. The code opens a tkinter GUI with various buttons and fields etc. It also displays a graph at the very bottom using ...
2
votes
2answers
37 views

Python- Matplotlib Moving Graph title to the y axis

I am currently using matplotlib in python to graph some data, however I want the titles of the graph to be on the Y axis because there is not enough room for both the title of one graph and the x-axis ...
1
vote
1answer
30 views

Simple 3D barplot of a 2D histogram after PCA

I already read some the question that I could find here or elsewhere. I wrote the code using other questions available on stackoverflow but still it doesn't work sometimes. There are three types of ...
0
votes
1answer
11 views

Plot stack of unit vectors in cylindrical coordinates - matplotlib

I have a python program that calculates angles for me and outputs them in a list. What I would like to do is plot a stack of arrows that are unit vectors pointing in the direction of the angle. So I ...
0
votes
0answers
33 views

Can pandas plot a time-series without trying to convert the index to Periods?

When plotting a time-series, I observe an unusual behavior, which eventually results in not being able to format the xticks of the plot. It seems that pandas internally tries to convert the index into ...
0
votes
1answer
14 views

Hexadecimal X-axis in matplotlib?

Is it possible to somehow have the values on the X-axis be printed in hexadecimal notation in matplotlib? For my plot the X-axis represents memory addresses. Thanks.
0
votes
1answer
20 views

How to increase the values size in a matplotlib colorbar

I'm trying to increase the values size in a colorbar. Seems trivial but I have not been able to figure it out. I have produced a heatmap and here is the code: def heatmap_binary(df, ...
0
votes
1answer
21 views

Matplotlib and django templates

I have a Django application, with charts from Googles image chart api. I want to replace the charts (they are depreciated), and start using Matplotlib. So I have followed the example here, to get ...
1
vote
1answer
17 views

axhspan set limits using coordinates

Is it possible to set the limits of the how far axhspan spand the x axis using coordinates rather than a value of 0-1? Usually the command takes: axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs) I know ...
1
vote
1answer
32 views

Embedding an animated matplotlib in tk

I am fairly new to python and a real beginner to tkinter and matplotlib. I have the following code which essentially is a testbed for what I eventually want to do. #!/usr/bin/env python import ...
1
vote
3answers
43 views

Automatically run %matplotlib inline in iPython Notebook

Every time I launch iPython Notebook, the first command I run is %matplotlib inline Is there some way to change my config file so that when I launch iPython, it is automatically in this mode?
2
votes
1answer
34 views

How to fetch timestamp in Pandas DataFrame

I'm trying to plot pandas to the web using Flask. I think i'm on the right track but i'm struggling to grab the date to put on the x axis. for the y axis data, its easy: aapl = ...
0
votes
2answers
21 views

Reduce Whitespace in pcolor matplotlib plot

I'm currently working on plotting pivoted tables using matplotlib pcolor but my axes are not functioning like i would like them to. I plot the tables using: pyl.pcolor(pivot_99) pyl.colorbar() ...
0
votes
1answer
24 views

python - matplotlib - polar plots with angular labels in radians

The problem I have looks pretty simple : whenever I do a polar plot, the angle ticks are taken care of by ThetaFormatter, which labels them in degrees. I am aware of this question, where the ticks ...
3
votes
1answer
24 views

Plot shading in a contourplot with matplotlib

I'd like to create a contour plot like in the figure below. I basically have two lists, one with the function values and the other one with bools containing the information if a certain point is ...
3
votes
1answer
28 views

When to use imshow over pcolormesh?

I often find myself needing to create heatmap-style visualizations in Python with matplotlib. Matplotlib provides several functions which apparently do the same thing. pcolormesh is recommended ...
0
votes
1answer
29 views

Plotting a 3d surface from a list of tuples in matplotlib

I'm trying to plot a 3d surface from a list of tuples, data go like this : [(60, 5, '121'), (61, 5, '103'), (62, 5, '14.8'), (63, 5, '48.5'), (64, 5, '57.5'), (65, 5, '75.7'), (66, 5, '89.6'), ...
0
votes
2answers
20 views

Python & Matplotlib: creating two subplots with different sizes

I have a script which is creating one or two charts, depending on if one specific condition is met or not. Really basically, what I am doing so far is the following: import matplotlib.pyplot as plt ...
0
votes
0answers
31 views

Computing STFT - Can't find where I'm going wrong

I'm attempting to write an algorithm to compute the STFT (Short-time Fourier transform) in C++ and plot the results in matplotlib in Python. I'm really struggling to see where it is I am actually ...
0
votes
0answers
41 views

pandas module in sublime text 2 + sublimeREPL?

I hope this question is legit here, I've been researching but not much luck so I figured it's worth a shot to post. I've got Sublime Text 2 with sublimeREPL plugin installed. I'm able to run python ...
1
vote
1answer
38 views

matplotlib- Y and X axis are swapped

I'm trying to plot a spectrogram. I am using the imshow in matplotlib. The problem is this, I am reading the data from a text file generated in C++ (it essentially creates a 2D vector and stores ...
0
votes
2answers
19 views

Need to use TkApp backend with matplotlib in Pyzo

I'm trying to put a live mass spectrum plot into a program that I am writing. So far I have a simple GUI that give the program its basic functionality. I also want it to have a live plot of a mass ...
-1
votes
0answers
29 views

Redundant identical window in matplotlib under wxPython

I picked up some examples online and came up with the following code. It does what I want (to plot several data lines on a plot with several y-axes) but I get two identical plot windows instead of ...
0
votes
0answers
23 views

Make matplotlib annotation visible on point event

I have created annotations for each point on a graph using matplotlib. In the original instance of creating the annotations I have set them to "visible=False". On clicking the point, I would like it ...
0
votes
1answer
21 views

Streamplot - Python

I'm working in a project and I have to create a method to generate an image with an background and vector flows. So, I'm using the stream plot from matplotlib. class ImageData(object): def ...
1
vote
2answers
24 views

Matplotlib/Python: customize a Zoom-in at show call

I have a candlestick chart that is dinamically created for different lengths and stocks. The chart is created first (the creation of the chart is contained in a function "createChart") and not shown ...
0
votes
0answers
30 views

ImportError using matplotlib TKinter Backend

I'm developing a user interface in python using the Tkinter interface and the matplotlib TkAgg backend for drawing graphs on a Linux machine. A week ago, I had a working code, but then some system ...

15 30 50 per page