0
votes
1answer
9 views

How do I run python 2.7.5 through sublime text 2?

My sublime REPL is currently running python 2.6.1, I have no idea how seeing as I have never downloaded it. I am trying to install matplotlib and keep getting this error: Traceback (most recent call ...
0
votes
3answers
10 views

Adding error bars to graph using matplotlib

So right now, I'm trying to add error bars to an existing graph but I keep running into some errors when I run my code. Below is the code when it works (without the error bars) with my additions ...
2
votes
1answer
24 views

Cleanest way to hide every nth tick label in matplotlib colorbar?

The labels on my horizontal colorbar are too close together and I don't want to reduce text size further: cbar = plt.colorbar(shrink=0.8, orientation='horizontal', extend='both', pad=0.02) ...
1
vote
1answer
17 views

Matplotlib Stackplot legend Error

I am trying to include a legend for my stackplot. I know that you cannot do it in the normal way so I followed the instructions from this similar post however there is still an error. x=data[:,-1] ...
1
vote
1answer
24 views

matplotlib plot set x_ticks

How would I set the x_axis labels at the indices 1,2,3....n to be something different. lam_beta = [(lam1,beta1),(lam1,beta2),(lam1,beta3),....(lam_n,beta_n)] chunks = [chunk1,chunk2,...chunk_n] ...
1
vote
2answers
23 views

Using dictionary as parameter in matplotlib in python

how can i use dictionary key or value in matplotlib instead of tuple tuple=(1,2,3,4) rects1 = ax.bar(ind, tuple, width, color='r') but i want to do it like this dic={'1':1,'2':2,'3':3,'4':4} ...
0
votes
1answer
29 views

How to set xlim in pythom matplotlib pyplot?

I have this code: import matplotlib.pyplot as pl pl.plot(np.log(alphas_lasso),coefs_lasso.T) #this generate a plot which xlim=[-8,-2] for alpha in alpha_min: pl.axvline(np.log(alpha),0,1) #add ...
0
votes
0answers
21 views

Matplotlib unicode not rendering in ubuntu 13.10

I have an issue where the following snippet will render the unicode character as the square block you get when stuff can't render. This happens in matplotlib 1.3.1 on one of my ubuntu 13.10 systems ...
1
vote
1answer
30 views

Pandas/Matplotlib annotate on one column and label on another

I would like to annotote my plot by year inside a scatterplot. In addition I would also like to label (add legend) on a different column in a pandas dataframe, in this case the column: ds ['Label']. I ...
1
vote
2answers
39 views

Using R or Matplotlib (Python), how can I create a venn diagram based on value comparisons for each row of a CSV file?

I got a project which required making venn diagrams, and I am starting to learn python (using 2.7) so I figured trying to learn R as well would overload me with work. So, I learned online about ...
5
votes
1answer
55 views

Can I arrange 3 equally sized subplots in a triangular shape?

To make this clear, I will use an 4x4 grid to show where and how large I want my subplots. The counting goes like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 I want the top plot to be ...
1
vote
0answers
20 views

Why aren't my matplotlib events firing, when used in class?

I was trying to get some eventlisteners working, and it doesn't seem to do anything when in a class - not even print out info: from pylab import * from cmath import * class integrator: def ...
1
vote
0answers
19 views

Annotating an annotation with Matplotlib

I am currently doing some "fancy" annotation in Matplotlib: import matplotlib.pyplot as plt ax = plt.subplot(111) plt.axis('equal') src_pos, dst_pos = (0, 0), (1, 1) src_patch = ...
3
votes
1answer
20 views

python + matplotlib: How to make XTick Markers symmetric over the axis?

on a normal matplotlib's plot, how can I format the tick markers of the x axis to "cut" the axis symmetrically? Standard, it is like this: I want them like this: Any idea? Thanks
0
votes
0answers
19 views

matplotlib generated PDF cannot be viewed in acrobat reader

I am plotting data with matplotlib including LaTeX fonts. The pdf created can be displayed by evince, inkscape, GIMP but not by acroread resp. adobe reader. The code prototype works with a lot of ...
0
votes
0answers
21 views

Higher order interpolation for contour plots in python

Is anybody of you aware of a higher order interpolation method (Catmull-Rom splines, cubic interpolation, etc.) for 2D contouring in Python? Skimage, Matplotlib, and OpenCV provide the functions ...
0
votes
0answers
29 views

Skipping hours in a matplotlib plot

I am trying to plot the hourly variation of a quantity over a period of a week with matplotlib. I am pulling data from a mysql table which gives me the hourly timestamp and the count for the hour. The ...
0
votes
0answers
22 views

how to do matplotlib scatter plot and scale data

I have some data to visualize, I first tried surface plot, but actually the data is quite scattered in one dimension, so I don't know if it's a good idea to use surface plot. The scatter plot, ...
1
vote
1answer
28 views

how to mark a point in matplotlib

I'm using Matplotlib to draw surface plots in a 3D space. To make the plot more readable, I want to mark the lowest point in the surface(I have already found the x,y coordinate using the data), show ...
1
vote
1answer
35 views

unexpected oscillations when using pandas plot()

I've taken some data from the web and loading it into a pandas dataframe import pandas as pd %pylab inline loc = ...
0
votes
1answer
29 views

Python - matplotlib - imshow - How to influence displayed value of unzoomed image

I need to search outliers in more or less homogeneous images representing some physical array. The images have a resolution which is much higher than the screen resolution. Thus every pixel on screen ...
1
vote
1answer
17 views

Matplotlibwidget in QT gui graph update

I'm new in Python and I want to developp a GUI program. I have installed pythonxy and I have developped a QT4 GUI that I have transformed in py with pyuic4. In my program, I would like to update the ...
0
votes
1answer
30 views

How to draw a histogram when some bins dominate the others

I would like to draw a histogram that explains how the data is distributed. My problem is that most of the data have very small values. Hence, if you use 10 bins, it won't be so descriptive; most of ...
0
votes
0answers
27 views

Change axes in matplotlib imshow

A newbie question, I try to plot some data using imshow as I need the interpolation options. I wrote the following X = np.array(ARR1) Y = np.array(ARR2) Z = np.array(ARR3) X, Y = np.meshgrid(X, Y) ...
0
votes
2answers
61 views

Python — Matplotlib redrawing lines without previous lines remaining

This class plots a curve in Matplotlib. The user mouse input section changes the set_data() for several x,y coordinates. The P and Q are resetting properly, it seems. However, when the R is not set ...
1
vote
1answer
31 views

python matplotlib filled boxplots

Does anyone know if we can plot filled boxplots in python matplotlib? I've checked http://matplotlib.org/api/pyplot_api.html but I couldn't find useful information about that.
0
votes
2answers
46 views
+50

Annotations for the future on the candlestick chart

I have script which draw candlestick chart. I added two annotations to this script. One is "Last data" which show last candle and the second annotations should show point in the future. But for some ...
0
votes
1answer
15 views

matplotlib iterate subplot axis array through single list

Is there a simple/clean way to iterate an array of axis returned by subplots like nrow = ncol = 2 a = [] fig, axs = plt.subplots(nrows=nrow, ncols=ncol) for i, row in enumerate(axs): for j, ...
1
vote
3answers
51 views

python plot using pylab

I'm very new to python just started using it from a day or two.. I'm using Anaconda python notebook. so I'm trying to plot, but in the output there is only grid and nothing no lines or anything, my ...
-1
votes
1answer
22 views

What are the dependencies for using pylab?

I needed to use plotting features in python 2.7 hence I downloaded and installed matplotlib package (v1.3.1). When I types import pylab in IDLE I got an exception saying dateutils was needed by ...
0
votes
0answers
26 views

How to visualize results clearly with matplotlib? [on hold]

I have 3 values method A:1.11 method B:1.23 method C:2.00 I want to emphasize how great method C is compared to method A and B, because the result is so much better. What would be a good way to ...
3
votes
1answer
45 views

How to plot Time Series using matplotlib Python

I want to visualize these data: Data Source : http://pastebin.com/vx9xLtdm I couldn't group data per days. import matplotlib.pyplot as plt import numpy as np import pandas as pd df = ...
0
votes
1answer
17 views

Can not save file using the below python code. Error: numpy.ndarray object has no attribute 'save'

import os import sys import numpy as np import scipy import pylab import pymorph import mahotas import matplotlib.pyplot as plt import Image from scipy import ndimage from pymorph import regmax from ...
0
votes
1answer
28 views

Plot Dates in MatPlotLib using a scatter data set

I have a large data set. I am getting an array where I get arDates = DataSet["dates"].Values The array should appear like that. arDates = [u'2013-11-27T02:02:50' u'2013-11-27T00:00:00' ...
0
votes
0answers
21 views

How to plot names in matplotlib [on hold]

Usually when we want to plot data, we get numbers . What if we have different strings. When it comes to cities, we can convert names to zip code. but what about other names. any idea on how to hash ...
0
votes
0answers
39 views

Linear fit with log plot including errors on the y axis

I was following this discussion: Polynomial fitting with log log plot to linearly fit data on a log axis. However, I still can not understand how to include the errors (in my case, on the y data) in ...
0
votes
1answer
43 views

Python - Altering a list that is being iterated. Out of Scope

x2012 is a list of dates in the form ['01/01/2013','02/01/2013',...]. I'm trying to iterate through x2012 and change the values from (string) dates to floats. print(row) -prints floats. for row in ...
0
votes
2answers
19 views

Changing the subtile in multiple plots

I get the same scaling and same subtitles. This is not what I want. How can I reset the subtitle and scaling? plt.imshow(grid1, extent=(x1.min(), x1.max(), y1.min(), y1.max()), origin='lower', ...
1
vote
1answer
27 views

Trouble using np.genfromtxt in python method

I am writing a python script that uses PyQt and Matplotlib to graph a 2D CSV file. Im still learning python so im having trouble working through some of the errors im getting. One in particular that ...
0
votes
1answer
43 views

Python Matplot Lib Lines in scatter plot

my question is, is there a way to influence, which points are connected in a scatter plot. I want a scatter plot, where the points which are closed together are connected. When I plot with the ...
1
vote
1answer
15 views

Plot line after line with imshow

I want to plot something row after row, because each row c[row] has not the same length. Here is the code that I use. Each row is mapped/rendered to the interval [0,1], regardless if c[row] had 2,4, ...
2
votes
2answers
67 views

How can I recreate the effect of iPython's '--pylab' option with a script?

I'd like to create a profile that does the same thing as IPython's --pylab flag "by hand". What should the contents of a script be — package imports, namespace designations, settings, etc. — to ...
0
votes
2answers
36 views

Problems with Pyplot

Whenever I use Pyplot import matplotlib.pyplot as plt I got this problem. It shouldn't be installed the right way File ...
4
votes
2answers
38 views

Plotting a large number of points using matplotlib and running out of memory

I have a large (~6GB) text file in a simple format x1 y1 z1 x2 y2 z2 ... Since I may load this data more than once, I've created a np.memmap file for efficiency reasons: X,Y,Z = ...
1
vote
1answer
15 views

LineCollection animation when updating the frames in a loop

The following code supposed to do the same thing here(and mostly taken from there), however as you can check it stucks and not updates the colour. I couldn't realise what is the problem. I would be ...
3
votes
1answer
55 views

Why is my 2D interpolant generating a matrix with swapped axes in SciPy?

I solve a differential equation with vector inputs y' = f(t,y), y(t_0) = y_0 where y0 = y(x) using the explicit Euler method, which says that y_(i+1) = y_i + h*f(t_i, y_i) where t is a time ...
0
votes
2answers
16 views

Matplotlib single array. How to place Marker?

I need help with placing a marker on a plot where I have a single array to plot it. I am receiving the data in ASCII format from one Instrument and I need to show the maximum from the data. data1 = ...
0
votes
2answers
27 views

“'int' object is not callable” Error When Trying To Plot

Here is my code, import numpy as np import math import matplotlib.pyplot as plt #Voltages V,I = np.genfromtxt('Photocurrent_graph_2.csv', dtype=float, delimiter=',', ...
1
vote
1answer
46 views

Displaying data from binary file in python

I have 2000 images stored as single binary file "file.dat" and a head of 512 bytes to this file. Format of every image is 512*512*2 bytes (unsigned int 16). My task is to visualize all this images as ...
0
votes
1answer
17 views

matplotlib align twinx tick marks

Is it possible to make a plot with two independent y-axes such that the tick marks align? Below is an example of half of the solution. I've doubled the y-axis using twinx, but the tick marks aren't ...

15 30 50 per page