Questions tagged [plot]

a graphical technique for representing a data set. Usually showing the relationship between two or more variables.

Filter by
Sorted by
Tagged with
1 vote
0 answers
206 views

Plotting city locations on Python 3 [closed]

My question is a follow-up of this: plotting US cities on a map with matplotlib and basemap. I would like to use some Python library to plot on a map city locations, starting from a list like this: ...
6 votes
1 answer
7k views

Plotting a raster stack with ggplot2

My aim is to plot a rasterstack as a single image using ggplot2. First, I apply ggplot on a single layer raster using the following code: #Load packages library(raster) library(ggplot2) #Create a ...
  • 187
0 votes
0 answers
38 views

Plot something on lat long in PHP

Is there some sort of plotting system which lets you do this? (in PHP): ex. plot(lat,long,data_show_onhover) My CSV file that I want to plot on the map looks like this: something,something,something,...
3 votes
1 answer
140 views

Adding points to QgsRubberBand polyline instead of giving list of points

canvas = iface.mapCanvas() polyline = QgsRubberBand(canvas, False) # False = not a polygon points = [QgsPoint(1,1), QgsPoint(2,2), QgsPoint(3,3), QgsPoint(4,4)] polyline.setToGeometry(QgsGeometry....
0 votes
0 answers
40 views

Analyzing NDVI rasters with same dimensions but different extents with Raster Calculator

I have drone sourced remote sensing imagery (NDVI) of a trial site set up to measure yield response to varying nitrogen (N) rates. The trial includes N rates ranging from 0 to 600 kg/ha. The trial ...
2 votes
1 answer
444 views

Problem starting the plugin Data Plotly

I'm using QGIS Desktop 3.10.3 with GRASS 7.8.2 I tried to run the plugin "Data Plotly" https://anitagraser.com/2017/12/06/data-exploration-with-data-plotly-for-qgis3/ After installing the plugin I ...
  • 23
0 votes
0 answers
152 views

How to plot pies or histograms around points (GeoPandas) containing different level values indicators?

This is my code (a simple sample of df). I'd like to have around each point on a map, an histogram or pie showing the mechanical bikes out of the total. import pandas as pd pd.DataFrame( {'...
1 vote
0 answers
276 views

Plotting alignment issues with plotting raster list of raster objects and multiple polygons together

I am very new to R and am trying to plot one object from a raster list with multiple polygons (boundary shapefiles) together in one plot. When I resize the plot window, however, the alignment of the ...
  • 81
3 votes
1 answer
563 views

Plot points with coordinates from txt-file [duplicate]

I'm using QGIS 3.12. I have a list of coordinates in txt file, as follows "longitude" "latitude" 48.819056, 2.127009 48.782213, 2.143340 48.801580, 2.355238 48.904471, 2.296038 How to ...
0 votes
1 answer
80 views

Unable use a Temporal Plot Tool in GRASS GIS

I installed GRASS GIS following the tutorial on the website for the Ubuntu 18.04 version. However, the Temporal Plot Tool function is not working, and is giving an error related to python. Below is ...
  • 41
2 votes
1 answer
372 views

Insert Dataframe data into a map using Geopandas

I posted my question in stackoverflow previously, howeverI think this site is a better place to find some clues (this is my first project with spacial data). I need to insert some coordinates from a ...
  • 121
1 vote
1 answer
1k views

Rasterio histogram save as image

I have create some histogram using DEM as dataset and rasterio using show_hist to take histogram but I can't find some way to save this histogram as image.any idea? import rasterio from rasterio.plot ...
  • 1,023
2 votes
0 answers
85 views

Plotting raster and vector data on same Plot

I have a raster and croped it by vector boundary. Vector reprojected to crs of the raster, but when I plot it does not show on the same figure? Something with plotting extend, but how to make them ...
1 vote
1 answer
98 views

Draw edges connecting vertexes (by id) on QGIS

I've been trying to figure out how to draw edges connecting a series of geographical points. There are many solutions that I've thought of but none of them take any advantage of the QGIS tools. ...
0 votes
1 answer
185 views

Problem when import vector data from GRASS GIS within RStudio

I am trying to use GRASS GIS 7.6 within RStudio and import a polygon which is in WGS 84 (EPSG 4326). I have created successfully the location and the mapset in GRASS GIS. When I use the command v....
  • 367
0 votes
0 answers
39 views

R: Why is my map including the entire world WSG84 space, when all I want plotted is New Zealand?

This seems to be a very easy problem to solve, but about two hours of searching hasn't led me to the answer. I have a GIS file that I downloaded in WSG84 ESPG:4326. I read in the file using readOGR. ...
  • 101
0 votes
3 answers
2k views

Google Earth Engine with Folium and Sentinel-1 Plotting

I'm attempting to plot Google Earth Engine Sentinel-1 SAR data in a Jupyter notebook with Python and Folium. To do this I'm trying to combine two pieces of documentation: EE Python Install -> Map ...
  • 103
3 votes
2 answers
157 views

Plotting point every x m2 in polygon using QGIS plugin

I'm trying to work out whether its possible to plot a point every so often within a polygon. For example, if I have a polygon thats 200x200m, perhaps I could plot a point at every meter squared ...
  • 51
1 vote
1 answer
916 views

`tmap` basemap in `plot` mode

I have a raster and I'd like to underlie it with a basemap in tmap. In the view-mode this kind of happens automatically. But when I set it to plot-mode I really struggle to get a basemap. Anyone maybe ...
2 votes
1 answer
399 views

Styling plot items by category in QGIS print layout

I am making a sensitivity atlas which gives me gridded sensitivity values (A to E) for a given area. I am using the atlas functionality in QGIS 3.10 to create several maps showing these sensitivity ...
  • 3,153
4 votes
1 answer
133 views

Change the colors of the pie chart in compouse (plot) in QGIS 3.10

When using the new plot command available in QGIS 3.10 for compouse pie chart generation, I didn't find any option to change colors. Is there any way to choose colors?
  • 655
2 votes
1 answer
264 views

How to highlight/shade areas of raster based on specific values, in R

I have a raster with values ranging from 1 to 5 like the following: library(raster) library(rasterVis) library(viridis) my_class <- raster(x=matrix(sample(x = 1:5, size = 12, replace=TRUE),4,3), ...
  • 594
2 votes
2 answers
69 views

QGIS 3.6 - Deleted Polygons

I'm putting together a large map consisting of some big datasets, and unfortunately deleted some (around 25) polygons from a key layer when editing a smaller version of the map for a different request....
  • 21
2 votes
1 answer
46 views

Automatic method for placing values of determined column from a SpatialLinesDataFrame near contour lines

I have following vector layer that represents countour lines. With QGIS 3, labels placed near lines (Layer Properties -> Labels) were taken from TEMP_ENE field in attributes table. I would like a ...
  • 27.1k
2 votes
1 answer
3k views

Plotting density map of points?

I have some points and I would like to plot the density map of them. I have tried like this: plt.figure() xedges = np.linspace(540000, 550000, 20) yedges = np.linspace(5200000, 5500000, 20) H, ...
  • 56
3 votes
3 answers
536 views

Plotting map locations from csv-file

I have a map of a city and a .csv-file containing 700 geographic coordinates pointing to locations within that city. How can I plot these 700 locations on the map?
3 votes
1 answer
3k views

Counting number of points in each grid?

I would like to count the number of points in each cell. I have tried https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram2d.html but the out isn't appropriate. Does anybody know how I ...
  • 81
2 votes
0 answers
982 views

Change size to the squares of the confusion matrix [closed]

I have a problem with size in the 'plot_confusion_matrix', the squares of the confusion matrix appear cut off. I would like to solve this problem. svc = SVC(kernel='linear',C=1,probability=True) svc....
  • 405
3 votes
0 answers
574 views

Changing the color of specific area of shapefile using Python [closed]

I have this map and I need to emphasize with a different color some cities from this map: This is my code: import json import time import geopandas as gpd import adjustText as aT import matplotlib....
  • 89
1 vote
1 answer
5k views

Adding legend title in plot function of R

I use plot function to plot a raster in R. The plot function adds a legend as default. However, the default legend added does not have a title. For instance I need to add the unit such as meters. I ...
  • 39
0 votes
1 answer
1k views

Making raster histogram excluding zeros in R?

In R, can I make a histogram of all the non-zero values in my raster? Some reproducible data below. I just want the histogram to be made with the zeros. Happy with a way to do that, or I guess to ...
1 vote
1 answer
119 views

Unable to plot in R some locations over a shapefile

I have a shapefile of polygons that I got from here, and a CSV file with longitude, latitude data (i.e. lon= -71.4; lat=42.5). The shapefile has the following CRS information: "+proj=lcc +lat_1=41....
1 vote
0 answers
51 views

Plotting with QGIS, blank positions result in errors

I tried to use the delimited text layers, then I found something wrong. Several plots are out of bound. Then I checked the original data and decoded data. It seems when one part of a single data is ...
  • 11
1 vote
1 answer
666 views

Creating PNG images using QGIS 3 pygis

Some days ago I upgraded from QGIS 2.18 to 3.6.0 - not knowing that many Python scripts won't run without modifications. I could convert all of them but not this one: from PyQt4.QtCore import * from ...
  • 311
1 vote
1 answer
72 views

QGIS transparent layers plot as solid opaque - solution? [closed]

I have been trying to plot from QGIS to a HP Designjet T120 plotter using Win10x64, but the transparent layers of my QGIS project appear as solid opaque on the plot. If I plot to PDF to transparent ...
3 votes
1 answer
230 views

How might one optimise geospatial operations on complex polygons, especially plots in R?

Question: I'm attempting to run some simple plots on some shapefiles with a high number of complex polygons. These aren't massive files - for the example below, the shapefile is 70mb (15872 obs), but ...
4 votes
2 answers
14k views

How to use st_buffer?

I would like to calculate a buffer of 5km around country polygons. However, I somehow always get a warning and an error. Here is a reproducible example code. library(sp) library(sf) library(tmap) ...
  • 241
2 votes
1 answer
448 views

Expand plotting area of raster::plot

I have a raster that I'd like to plot in the Azimuthal Equidistant projection with a grid and labels. So far I've been able to do that. However, I cannot get the labels inside the plotting area. ...
  • 303
1 vote
0 answers
304 views

Multipanel with raster (spplot) and scatter plot in R

I have one raster and one scatter plot that I want to put together in a single multipanel plot. However, the par(mfrow=c()) that usually works to put together different normal plots, doesn't work when ...
1 vote
1 answer
466 views

Extract a list areas and indices of multi-part polygons (SpatialPolygonsDataframe) R

I'd like to extract a list of polygons from a SpatialPolygonsDataFrame that include more than one area (so a polygon with a hole for example, or just 2 areas in one polygon entry in general). There ...
0 votes
1 answer
296 views

Plot a series of subsetted pixels from a raster stack in R

I have created two raster stacks and would like to plot a row or column of pixels through the stack, but am not sure how to approach this. I know I can subset by layer, but how do I subset ...
0 votes
1 answer
1k views

Legend Key for discrete values in spplot

I have a shapefile with various attributes. I want to plot the shapefile using `spplot'. I first read the shapefile A <- readOGR('myshapefile.shp') I am using the following command: p <- ...
  • 316
0 votes
1 answer
1k views

Adding labels to raster with levelplot and spplot

I am trying to add district labels for a country, which I am plotting using levelplot (to use worldclim precipitation data) and adding boundaries using spplot. I am having trouble adding text labels ...
  • 13
15 votes
1 answer
9k views

How can I superimpose a geopandas dataframe on a raster plot?

I have a geopandas dataframe countries with country polygons, and a raster dataset raster (read with rasterio). I've already aligned the two as follows: countries = countries.to_crs(raster.crs.data) ...
  • 305
4 votes
2 answers
6k views

Remove internal boundaries in spatial object/polygon for plotting

I am trying to plot a spatial object where only the outer boundaries/borders are plotted. The only way I can think to do this is by manually removing all the lines/points within the spatial object and ...
2 votes
2 answers
370 views

How to display multiple plots in R Scripts running in QGIS

While plotting in R in QGIS, only the latest plot appears in 'Result viewer'. What do I do to get all the plots done during script running? Here's the code: ##showplots bin_arr <- c("C:/Users/...
2 votes
0 answers
366 views

Show charts and plots in plugin

I'm creating a plugin to guide a user though a GIS analysis process. One of the things the user wants is the ability to display "charts" of the resulting data sets. I'm looking to build simple ...
  • 133
2 votes
0 answers
374 views

Invert the legend scale representation [in R environment]

Through the following code, cols <- (heat.colors(255)) plot(raster_sum3, col=cols[round(seq(1,255,length.out=10))], legend=TRUE) # raster of the study area plot(site_3003, add=TRUE) # site ...
  • 325
1 vote
2 answers
969 views

Extract seasonality and trend values for each time in a MODIS time series

I'm trying to construct a MODIS temporal series as shown in this thread: Harmonic MODIS trend in Google Earth Engine? But I'd like to plot, if possible, the values for trend and seasonality for each ...
1 vote
0 answers
1k views

QGIS: How to plot a GPS track color-coded by the altitude (or any other value like speed, ...)?

I have GPX files recorded from various treks. I want to plot them on a QGIS map and have the color of each track segment modified by the altitude recorded. An idea of the result I am looking for is ...
  • 819