Tagged Questions
1
vote
1answer
15 views
Plotting timestamps (hour/minute/seconds) with Matplotlib
I want to plot some timestamps (Year-month-day Hour-Minute-Second format). I am using the following code, however it doesn't show any hour-minute-second information, it shows them as 00-00-00. I ...
0
votes
1answer
19 views
Matplotlib figures not changing interactively - Canopy Ipython
I am trying to use the ipython in canopy with matplotlib to prepare graphs (backend set to qt). I wrote the following code line by line int the terminal
import matplotlib.pyplot as plt
fig = ...
0
votes
1answer
36 views
plotting lines in pairs
I'm working on a network project in which I need to draw lines (edges) between pairs of points (nodes). Currently I'm using matplotlib.pyplot for this, but the problem is that pyplot.plot(x, y) starts ...
1
vote
1answer
31 views
Unable to change tick label properties in matplotlib
No matter what I seem to do, or whichever past questions I seem to look up - I seem unable to change simple properties of tick labels.
This code:
from mpl_toolkits.axes_grid.axislines import ...
2
votes
0answers
42 views
How to obtain the same font(-style, -size etc.) in matplotlib output as in latex output?
I have one .tex-document in which one graph is made by the python module matplotlib. What I want is, that the graph blends in to the document as good as possible. So I want the characters used in the ...
1
vote
1answer
26 views
Scatter plot and Color mapping in Python
I have a range of points x and y stored in numpy arrays.
Those represent x(t) and y(t) where t=0...T-1
I am plotting a scatter plot using
import matplotlib.pyplot as plt
plt.scatter(x,y)
plt.show()
...
1
vote
1answer
21 views
ignore empty list when plotting histogram
I am making a stacked histogram in Python, with something like the following command:
pylab.hist([data1,data2,data3], 10, normed=1, histtype='bar', stacked=True)
But sometimes the lists data1/2/3 ...
0
votes
1answer
20 views
Python - matplotlib - PyQT: Copy image to clipboard
I want to copy the current figure of matplotlib to the clipboard:
this code doens't work(for testing purposes, I want to save the bitmap to disk later on I will use it as a bitmap-image. I want to ...
1
vote
2answers
39 views
Matplotlib: Two x-Axis with inverse scaling
I have an x-y pair, for which I want to plot y over one x-axes and under one x'-axes with different scalings. (x' = f(x)). Although there are several questions/answers for linear scaling on the net, I ...
0
votes
1answer
14 views
Fractions for xtick labels in matplotlib.pyplot
I'd like to position and label some xticks, but I want some of the labels to be nicely typeset fractions. I can see that pyplot.xtick accepts text elements as labels, but I'm a little confused about ...
1
vote
0answers
22 views
Prevent overlapping labels and graphs in matplotlib
I have the following code:
from mpl_toolkits.axes_grid.axislines import SubplotZero
from matplotlib.transforms import BlendedGenericTransform
from matplotlib import patches
import matplotlib.pyplot ...
0
votes
1answer
12 views
Plotting Contours of Lat/Lon Based Values
I am attempting to plot weather variables on a map of Oklahoma using mpl_toolkits.basemap, but am having issues figuring out how to interpolate the data to plot on top of the map.
Here is a general ...
0
votes
3answers
20 views
Matplotlib/Pylab - part of plot disappears after setting log scale
I have a small code producing the following picture with this code:
Code 1:
hist, rhist = np.histogram(r, bins=40, range=(0, 0.25))
hist = -hist/np.trapz(rhist[:-1],hist)
plt.plot(rhist[:-1], hist)
...
1
vote
1answer
48 views
plot of multiple arrays
I have imported and processed multiple datasets in numpy/python- from the datasets I can created several arrays with the data -
for the sake of argument let's say 3 arrays;
A
B
C
now I want to plot ...
0
votes
1answer
34 views
How do I visually stack multiple line graphs above each other in python?
What I was having trouble with is creating a plot I need which has multiple line graphs.
What I want is a way to graph each of these above the other (say one has a baseline of y=5 I want the next to ...
0
votes
1answer
17 views
Update 2D Surface in Matplotlib
I have a slider bar which gives the line of a CSV file to be graphed. The slider bar is functional and will return the correct values. However, I can't get the values to show up on the graph. There ...
1
vote
1answer
29 views
python matplotlib: how to use fill_between with a colormap to fill the background of a 2d plot?
I'm trying to make a simple 2d plot from a 3 column data sets e.g. y=f(x) and z=f(x). I want to plot xy and would like to display z using color. For example, the rectangular regions between [x1,x2, ...
0
votes
1answer
15 views
How to read out point position of a given plot in matplotlib?(without using mouse)
The case is, I have a 2D array and can convert it to a plot. How can I read the y value of a point with given x?
-1
votes
0answers
21 views
python matplotlib combine line and bar graph
I currently have a problem with matplotlib line and bar charts.
The line does not align with the center of each bar. Instead, it aligns at the left corner of each bar.
Can anyone help me? I think ...
0
votes
2answers
23 views
Changing canvas size dynamically
I want to plot multiple time-series (each time-series in its own plot) using the plot()-method of matplotlib.
X-Axis: Time
Y-Axis: Parameter-Value
As the time-series have different lengths, I ...
1
vote
1answer
29 views
Graphing tan in matplotlib
I have the following code:
from mpl_toolkits.axes_grid.axislines import SubplotZero
from matplotlib.transforms import BlendedGenericTransform
import matplotlib.pyplot as plt
import numpy
if 1:
...
2
votes
1answer
30 views
How to make 'fuller' axis arrows with matplotlib
I have the following code:
from mpl_toolkits.axes_grid.axislines import SubplotZero
from matplotlib.transforms import BlendedGenericTransform
import matplotlib.pyplot as plt
import numpy
if 1:
...
0
votes
1answer
37 views
Plot graph iteratively during every update
The data set is mixed by three clusters, each of which comes from a gaussian density function parametrized by mu_k and sigma_k, k = 0, 1, 2.
I want to plot these 2D samples with its contour in a ...
0
votes
1answer
70 views
How to plot an output of a function in Python?
These three functions give me the progression of number of customers and their orders from state 0 to next 365 states (or days). In function state_evolution, I want to plot the output from line
custA ...
1
vote
1answer
36 views
Cartesian axis labels in matplotlib
I have the following code:
from mpl_toolkits.axes_grid.axislines import SubplotZero
import matplotlib.pyplot as plt
import numpy
if 1:
fig = plt.figure(1)
ax = SubplotZero(fig, 111)
...
0
votes
1answer
27 views
Matplotlib - multiple surface plots, wrong overlapping
I am currently plotting two completely different datasets into one 3D surface plot. When I am plotting each one independently, everything works fine. However, as soon as I plot them in one, the ...
2
votes
1answer
24 views
Coloring networkx edges based on weight
How do I change the color of the edges in a graph in networkx based on the weights of those edges?
The following code just gives all black edges,even though the colormap is jet!
...
0
votes
1answer
18 views
Python-matplotlib: Can't display text on figure using a function linked to an event
I'm trying to interact with a matplotlib figure but something doesn't go as planned...
Below is the sample of the script and here the description of what it should do : in the init part of my ...
0
votes
1answer
22 views
How to pad adjacency matrix cells in D3.js style?
I'm trying to replicate the matrix adjacency visualization as demonstrated in this D3.js example. Note that each cell is padded, resulting in a white border around each cell.
This is what I've got so ...
0
votes
2answers
24 views
How to parse list containing decimal and datetime.datetime?
I have a list coming from sql output which looks like this
[(Decimal('264'), datetime.datetime(2012, 11, 1, 0, 0)), (Decimal('445812776'), datetime.datetime(2012, 12, 1, 0, 0)), ...