Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

shift coordinate in python

# To adjust coordinate labels or make axis cyclic or periodic,
# you can use the Shift() and/or roll() methods as shown below:

import xarray as xr


array = xr.DataArray([1, 2, 3, 4], dims="x")

# shift the coordinate 'x' (to the right) by 2
array.shift(x=2)

# roll the coordinate 'x' (toward the right) by 2
array.roll(x=2, roll_coords=True)

Comment

PREVIOUS NEXT
Code Example
Python :: python dictionary dot product 
Python :: why men are better than woman 
Python :: plt normalized histogram 
Python :: pandas display only certain columns 
Python :: how to convert input to uppercase in python 
Python :: python emoji 
Python :: print the number of times that the substring occurs in the given string 
Python :: python replace letters in string 
Python :: check django version 
Python :: clear all python cache 
Python :: car in programming python 
Python :: Violin Plots in Seaborn 
Python :: pandas read chunk of csv 
Python :: python dividing strings by amount of letters 
Python :: how to create a database in python 
Python :: Socket Programming Client Side 
Python :: python control browse mouse selenium 
Python :: python time in nanoseconds 
Python :: python set a specific datetime 
Python :: python - exchange rate API 
Python :: binary search algorithm python 
Python :: pyqt5 qpushbutton disable 
Python :: generate random list of number py 
Python :: pandas get date from datetime 
Python :: remove nans from array 
Python :: pandas read google sheet 
Python :: discord.py cog 
Python :: install qt designer python ubuntu 
Python :: python datetime difference in seconds 
Python :: python filter list of dictionaries by value 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =