Fix swapped top and bottom
This commit is contained in:
		
							parent
							
								
									a8e2ec73a5
								
							
						
					
					
						commit
						1206872e92
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		
							
								
								
									
										16
									
								
								lib/plot.py
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								lib/plot.py
									
										
									
									
									
								
							|  | @ -75,30 +75,30 @@ class Paper: | ||||||
|     def top_left(self, honour_margins=True): |     def top_left(self, honour_margins=True): | ||||||
|         if honour_margins: |         if honour_margins: | ||||||
|             return np.array([self.margins['left'], |             return np.array([self.margins['left'], | ||||||
|                              self.height - self.margins['top']]) |                              self.margins['top']]) | ||||||
|         else: |         else: | ||||||
|             return np.array([0, self.height]) |             return np.array([0, 0]) | ||||||
| 
 | 
 | ||||||
|     def bottom_left(self, honour_margins=True): |     def bottom_left(self, honour_margins=True): | ||||||
|         if honour_margins: |         if honour_margins: | ||||||
|             return np.array([self.margins['left'], |             return np.array([self.margins['left'], | ||||||
|                              self.margins['bottom']]) |                              self.height - self.margins['bottom']]) | ||||||
|         else: |         else: | ||||||
|             return np.array([0, 0]) |             return np.array([0, self.height]) | ||||||
| 
 | 
 | ||||||
|     def top_right(self, honour_margins=True): |     def top_right(self, honour_margins=True): | ||||||
|         if honour_margins: |         if honour_margins: | ||||||
|             return np.array([self.width - self.margins['right'], |             return np.array([self.width - self.margins['right'], | ||||||
|                              self.height - self.margins['top']]) |                              self.margins['top']]) | ||||||
|         else: |         else: | ||||||
|             return np.array([self.width, self.height]) |             return np.array([self.width, 0]) | ||||||
| 
 | 
 | ||||||
|     def bottom_right(self, honour_margins=True): |     def bottom_right(self, honour_margins=True): | ||||||
|         if honour_margins: |         if honour_margins: | ||||||
|             return np.array([self.width - self.margins['right'], |             return np.array([self.width - self.margins['right'], | ||||||
|                              self.margins['bottom']]) |                              self.height - self.margins['bottom']]) | ||||||
|         else: |         else: | ||||||
|             return np.array([self.width, 0]) |             return np.array([self.width, self.height]) | ||||||
| 
 | 
 | ||||||
|     def centre(self, honour_margins=True): |     def centre(self, honour_margins=True): | ||||||
|         return (self.bottom_left(honour_margins) |         return (self.bottom_left(honour_margins) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue