scatter

Make a Scatter Plot in matplotlib with dates on x axis and values on y

随声附和 提交于 2019-12-01 17:09:09
I am having trouble making a scatter plot that has from a date array and a bunch of PM 2.5 values. My lists would look like the following: dates = ['2015-12-20','2015-09-12'] PM_25 = [80, 55] import pandas as pd dates = ['2015-12-20','2015-09-12'] PM_25 = [80, 55] dates = [pd.to_datetime(d) for d in dates] plt.scatter(dates, PM_25, s =100, c = 'red') s sets the size c sets the color There are a whole bunch of other args as well: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.scatter If a plot with data that contains dates, you can use plot_date Similar to the plot() command,

Use MPI_Scatterv to Scatter Overlapping Regions of an Array

半世苍凉 提交于 2019-12-01 13:26:31
I have a 1D-array representation of a 2D array: below is a 6x6 example: [00000012300456700890100234500000] => [------] [|0123|] [|4567|] [|8901|] [|2345|] [------] A typical size will be 514*514 elements (512 + 2 halo cells). I have to distribute the data among, say, four processors: Rank 0: Rank 1: Rank 2: Rank 3: [----] [----] [|456] [567|] [|012] [123|] [|890] [901|] [|456] [567|] [|234] [345|] [|890] [901|] [----] [----] that is, in a way that the rightmost section of the data that goes to rank 0 also has to go to the left section of the data going to rank 1, and so on with all other pairs

Changing the colors of the specific dots in scatterplot vba excel

早过忘川 提交于 2019-12-01 11:21:31
I would like to change the color of dots in top left part of the scatterplot. I wrote a macro, no errors occurred but the color did not change :/ Sub Kolorowanie() ActiveSheet.ChartObjects("Chart 1").Activate a = ActiveChart.SeriesCollection(1).Values b = ActiveChart.SeriesCollection(1).XValues For i = LBound(a) To UBound(a) If a(i) < 0 And b(i) > 0 Then ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.SeriesCollection(1).Select ActiveChart.SeriesCollection(1).Points(i).Select With Selection.Format.Fill .Visible = msoTrue .ForeColor.RGB = RGB(255, 0, 0) .Solid End With Else End If Next

How to increase marker size of the legend in scatter plot in MATLAB 2014b? [duplicate]

你。 提交于 2019-12-01 04:00:04
问题 This question already has an answer here : Change legend line style (1 answer) Closed 4 years ago . I found marker size in the scatter plot and the legend is different in MATLAB 2014b. I searched & found some solution from earlier version of MATLAB, which are not applicable in the latest version. In my current version, the marker size in legend is so small that it is hardly distinguishable. Any help? figure; hold on s1 = scatter(1, 1, 150, 'k', 'o') s2 = scatter(1, 2, 150, 'k', '+') s3 =

How to color a specific gridline/tickline in 3D Matplotlib Scatter Plot figure?

寵の児 提交于 2019-12-01 01:55:26
I am trying to modify the color/thickness of a specific gridline in a 3D matplotlib scatter plot, in this case I want the -30 z axis grid line to be black, bold, or thickened so it stands out amongst the other gridlines. Here is the basic code seen from the mplot3d scatter plot tutorial: import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt def randrange(n, vmin, vmax): return (vmax-vmin)*np.random.rand(n) + vmin fig = plt.figure() ax = fig.add_subplot(111, projection='3d') n = 100 for c, m, zl, zh in [('r', 'o', -50, -25), ('b', '^', -30, -5)]: xs =

How to set a fixed/static size of circle marker on a scatter plot?

我的梦境 提交于 2019-11-30 09:26:26
问题 I want to plot the location of some disks generated randomly on a scatter plot, and see whether the disks are 'connected' to each other. For this, I need to set the radius of each disk fixed/linked to the axis scale. The 's' parameter in the plt.scatter function uses points, so the size is not fixed relative to the axis. If I dynamically zoom into the plot, the scatter marker size remains constant on the plot and does not scale up with the axis. How do I set the radius so they have a definite

limit the axes for plotting in Matlab [duplicate]

懵懂的女人 提交于 2019-11-30 06:09:44
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: is it possible to select a particular region in a scatterplot is it possible to reduce the datapoints from the input text file, so that those dont come in my calculation. I am using following to read the data fid = fopen('cr.txt'); A = textscan(fid, '%f %f %f %f %f %*f %*f %*f %*f %*f %*s %*s %*s') ; %read the file a = A{1}; e = A{2}; c = A{3}; x = A{4}; y = A{5}; here x,y are the distances and if I apply xlim

scatter plot with legend colored by group without multiple calls to plt.scatter

一个人想着一个人 提交于 2019-11-30 05:43:35
问题 pyplot.scatter allows for passing to c= an array that corresponds to groups, which will then color the points based on those groups. However, this seems to not support generating a legend without specifically plotting each group separately. So, for example, a scatter plot with groups colored can be generated by iterating over the groups and plotting each separately: import matplotlib.pyplot as plt from sklearn.datasets import load_iris feats = load_iris()['data'] target = load_iris()['target'

is it possible to select a particular region in a scatterplot

强颜欢笑 提交于 2019-11-29 18:49:27
I am basically plotting several million data points with help of scatterplot. here I am doing scatter(x(1:end-1), y(1:end-1),5, z) Now is possible to select a particular area in the plot...and find out the values. I dont know if you will understand my question or not. As an alternative is it possible to reduce the datapoints from the beginning itself, so that those dont come in my calculation. I am using following to read the data fid = fopen('cr.txt'); A = textscan(fid, '%f %f %f %f %f %*f %*f %*f %*f %*f %*s %*s %*s') ; %read the file a = A{1}; e = A{2}; c = A{3}; x = A{4}; y = A{5}; here x

How to set a fixed/static size of circle marker on a scatter plot?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 14:59:07
I want to plot the location of some disks generated randomly on a scatter plot, and see whether the disks are 'connected' to each other. For this, I need to set the radius of each disk fixed/linked to the axis scale. The 's' parameter in the plt.scatter function uses points, so the size is not fixed relative to the axis. If I dynamically zoom into the plot, the scatter marker size remains constant on the plot and does not scale up with the axis. How do I set the radius so they have a definite value (relative to the axis)? Schorsch Instead of using plt.scatter , I suggest using patches.Circle