﻿ Newest 'plot' Questions - Stack Overflow
Use Stack Overflow for Teams at work to find answers in a private and secure environment. Get your first 10 users free. .

# Questions tagged [plot]

The graphical representation of a mathematical function or a set of data. There are different kinds of plots, such as line plots, bar plots, or scatter plots.

26,598 questions
Filter by
Sorted by
Tagged with
7 views

### Unexpected behavior of datetick function in Octave plotting

I'm trying to plot a graphic that displays values against moments of time. For this, I have an array of time instants (in Epoch) and an array of values. I've already been able to plot the graphic ...
22 views

### Plot a simple coordinate systems with vectors

How could I create a simple plot of a coordinate system within two vectors in R? It should look like the following plot. Thank you!
4 views

### How to plot anomalies under two different levels

I have a simple dataframe DF names(DF)<-c("Year", "Season", "Differential") I would like to plot the 'differential' per year AND per season. Using dplyr, I managed to plot it per year, but I ...
6 views

### JQuery \$.plot() charts are broken if element has display: none

I am using this js librarry to draw graphs https://github.com/flot/flot/blob/master/docs/API.md Everything works fine till I try to draw a graph to the element which has display: none. The element is ...
16 views

### Multi Layered Map Function

Using the procedure outlined here: https://aosmith.rbind.io/2018/08/20/automating-exploratory-plots/ I was able to procedurally generate some graphs I needed for forecasting. Unfortunately, that use ...
12 views

### Seaborn values are missed in the plot

Hello I try to create a plot with seaborn with the Following code , but i got 0.00% values in the plot. height and total are correct but there are only 0.00 values. Any idea please? thanks tmp = pd....
8 views

### use Geopandas plot missing values

My shapefile has some missing values (represented by nan) on certain columns (for example, GDP). When plotting without dealing with those missing values, the legend shows like this: enter image ...
19 views

### Make histogram bins equi-spaced when x axis is logarihmic [duplicate]

I create a histogram with linear axis, but then I manualy change the axis to log-log. How can I change the bin width so they are all of the same width? histogram(A4,'Normalization','probability') ...
7 views

### Plot ticks are not lining up properly

I want to make a plot of certain data, but the ticks are crowding the axis. But when i reduce the amount of ticks, only the first in the serie show up. This is my code: for j in range (1000,1401): #...
11 views

### Keras : KeyError: 'acc' , during plotting

i'm trying to visualize the Training plot of my Model , and i get this Error : Traceback (most recent call last): File "train.py", line 120, in <module> plt.plot(H.history['acc']) ...
20 views

### plt.plot() runs infinitely when trying to plot pandas series or dataframes

I've got a trouble when trying to run my jupyter notebook on another computer. Here I want to plot some time series with matplotlib.pyplot module in order to overlay some points afterwards : plt....
22 views

### plotting a surface plot in two colours depending on condition on z axis

z is 200*200 array and I have a surf plot using Matlab surf(x,y,z). I am trying to plot the surf plot so that when z<10 it will be blue and when z>10 it will be red. At the moment the surf plot is ...
39 views

### How to modify pandas Dataframe and how to Interact with plot dash gui frameworkout html core components

Hopfly some one help me :).... From my previous question How to modify columns values in pandas Dataframe depending on index of values in another pandas dataframe using lambada I tried with regex ...
16 views

### ggplot2 how to add different sets of colour palettes to different geom_ribbon?

I'm trying to plot two types of time-series graphs. One in which the 'min-max' ribbon is more transparent than the '10th-90h percentile' ribbon, but the colour is region-specific. In the other graph, ...
9 views

### R: Unexpected cropping in mfrow graph

I am trying to create a 3x3 multiplot with mfrow. The layout is correct, however the single plots seem to contain only part of the data. The code I use to produce the graph is timing = c(10,30,50,75,...
29 views

### How to Color Entire Segmented Bar Plot the Same Color

Using the mtcars data: example<-as.matrix(mtcars) barplot(example) Gives a multi segmented barplot. Now I want to make each bar the same color. So I use: barplot(example,col=c("red","blue")) ...
25 views

### placing marker on specific x value

Currently, I am using matplotlib to graph two lists of extracted data from an external source. Everything graphs perfectly, however, there will always be one x value I want to mark with a star. As of ...
29 views

### Control Legend() to display specific datasets

I'm attempting to display 2 major datasets namely "Type2" (red squares) and "Type1" (blue circles) in the legend. Nevertheless, since my plot involves subgroups of "Type1" and "Type2" (A,B are ...
41 views

### How to add user defined legend to ggplot in R?

I am trying to manually add legend to my ggplot, however, am getting nowhere. Did a few searches but couldn't find a relevant solution. Here is my code so far library(tidyverse) library(zoo) ...
17 views

### Piloting polygons on map and exporting as png

I have a Shape-file which I read using GeoPandas, and a list of lat long which i read using pandas. This Shape-file has multiple polygons with an attribute associated with it. For example, imagine ...
17 views

### R plotting single Questionnaire Items efficiently

Background: I am using formR to create complex online forms based on R. My Demographics Questionnaire consists of many distinct singular items and varying answer formats. Question: What is the ...
34 views

### How to plot multiple CSV files in a folder using python

Let's say I have multiple CSV files which all have their x and y coordinates start from row 15 in their own columns of 1 and 2. I just want to run through all the CSV files in a folder running this ...
21 views

### Python plotting log want 10000 not 10^4 on x/y axis

Trying to make good looking plots and can't make the scale of the two axis how i want them. How the plot looks. I want it to say 10000 instead of 10^4 and 100 instead of 10^2. Any suggestions? My code:...
34 views

### Plot through the loop with separate color

I have a data frame like this: clusters = pd.concat(l,keys=range(len(l))) clusters = latitude longitude 0 872 11.1248 2.5902 873 11.1246 2.5908 874 11....
8 views

### sns.distplot(); Why is kde value is zero at 0 when histogram is showing non zero counts?

I am plotting seaborn distplot with default parameters. Ideally, it should make a kde plot fitting the histogram. Whereas in my case kde at zero is zero and histogram is clearning showing some ...
39 views

### How to plug in cell arrays in the x-axis of a plot?

I would like to make a plot in which I will the x-axis contains the values of a cell array. I am using R2019a. t.Format = 'dd-MMM-yyyy' time = cellstr(t) A = randn(3,1) figure; filename = plot(...
40 views

### How to skip 'Nan' values in pandas dataframe and how to show regression line with rsquared on each plot

Hello I have a dataframe and I want to loop from every column and plot it to the other. Data frame looks like that. col1 col2 col3 col4 col5 1 / 2 4 2 3 / 4 7 / 0 ...
26 views

### how to modify label the x axis as a string in parallel plots

I want to change the lables from X.0.1~X.0.10 to [0,1]~[0,10] my data: [0,1] [0,2] [0,3] .... [0,10] 1 1.4 2 3 group 1 0.5 0.6 0.7 0.3 group 2 my code: library(...
29 views

### How to create a stand alone legend in R

This is a slightly different but very similar question to How can i create a legend without a plot in r but differs in that I do not want to use the -pch- option in -plot( )- but rather I would like ...
14 views

### Pivot_table() 1 with 2 columns the plot them [duplicate]

I can't seem to figure out how to pivot table 1 column with 2. I've got a .csv file containing information and I need to create a pivot table of 'total births' by 'sex' and 'year' and then plot them. ...
14 views

### Transparency in GNU Octave plot

Some other questions have hinted that there might be other packages that provide transparency in GNU Octave (v5.1.0). I'm trying to do the following: [example.data, example.map, example.alpha] = ...
28 views

### plotting interaction effects for LASSO models in R

I fitted a lasso logistic model with interaction terms. Then i wanted to visualize those interactions using a interaction plot. I tried to find some R function that will plot interactions for glmnet ...
13 views

### How to save a plot (generated by shap_values) to png?

I use Shap library to visualize variable importance. I try to save shap_summary_plot as 'png' image but my image.png but them get an empty image this is the code that I have used: shap_values = ...
38 views

### How to make a numpy arange of datetime without a specific year?

I have data of days from all days from 2004-01-01 until 2015-31-12 and want to plot the maximum and the minimun value of each day. The original data is on df and df['Day'] is a colum with day and ...
31 views

### How to scale the fontsizes using Plots.jl

is there a way to rescale all the fontsizes (legend, tickslabels, axislabels…) at once? Original question from Filippo Vicentini on Slack.
26 views

### Finding the best fit to an equation in color plot

I have a set of 3D data (x,y,z) that can be represented in a color plot. I am trying to trace a line on the color plot such that the data points that fall on the line best fits a fairly simple ...
11 views

### Matplotlib pcolormesh tuning

I try to plot some data on earth 2D projection using matplotlib/cartopy/pcolormesh. The code is something like : import numpy as np import matplotlib.pyplot as plt import cartopy.crs as ccrs ax0=plt....
31 views

### What is the easiest way to get the default R sf map plot default legend back?

I have been trying to display a legend on a choropleth plot but finding the R docuemntation for legend a bit difficult to get my head around. Been reading it for a few hours now. I see that the ...
23 views

### How to fix combine plot in R

I'm doing the heart function in R. I wrote it down and the plot doesn't show whole function in cordinate-axis. x<-seq(-1,1,0.001) length(x) m<-c(abs(x)^1/2) n<-c((1-x^2)^1/2) y1<-c(m+n) ...
40 views

### How to modify columns values in Dataframe depending on index of values in dataframe using drag and drop file in Dash Frameworkout

I am trying to modify columns values in data frame depending on other Dataframe values index So First of all I have created a simple GUI using Dash core components like this below picture mYgui as ...
35 views

### How can I plot means?

I´m working on my thesis and I need to compare some means for descriptive statistics. I dont know how to plot these means. I already have the means, so I just need a code for plotting. I want that the ...
53 views

### ggplot2 trying to specify number of columns of legend

I am having a difficult understanding why this code works and doesn't work. I want a plot by group + specify the number of columns of my legend. Basically, the only way I can get this to work is to ...
10 views

### How To Map the Color of a Curve to A Scalar Value in a Given Range

I am attempting to plot 175 curves with a for loop, and coloring each curve based on a scalar value associated with each of the curves. I've been trying to use matplotlib.colors, and matplotlib.cm ...
32 views

### Display several LineSeries using Oxyplot in Windows forms app

I am building an app which displays a curve in 2D like for example the Math.Sin curve. The user is prompted to enter how many dots he wants to display on the plot. When he chooses the number of dots ...
53 views

### Changing font in base R plot

I would like to know whether it's possible to change the font of axis labels in a base R plot. I know it can be done with ggplot using the package extrafont, but my plots are already done in base and ...
11 views

### Python - Problem to paint different colours in x,y and z axis with Ipyvolume library

I'm trying to create a 3D plot with Python library "ipyvolume" where every point in the plot has a colour. The points can be repeated colours. There is a problem when it paint the points in the plot. ...
17 views

### How to plot 2D surfaces in ggplot2 [duplicate]

I have time-series data from a large number of scenarios. I wish to summarize them. As in the image below, I'd love some advice on how to map with ggplot2 a spread of results (from 10th to 90th ...
24 views

### Save ggplots in one PDF with equal tick distance?

I want to save multiple ggplots in one PDF file. I am creating them in a loop, storing them in a list and then saving them by using ggsaves marrangeGrob function like this: ggsave(filename = "myfile"...