Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the coordinate system in Compose.jl?

Tags:

julia

I am using Compose.jl, and by default it seems that (0,0) corresponds to the top left corner of the image. Is there any way to change the coordinate system within a piece of code such that (0,0) is instead the bottom left corner of the image, and increasing the y value moves up, not down?

like image 583
Jim Garrison Avatar asked Sep 01 '25 17:09

Jim Garrison


1 Answers

To set up the coordinate system use the UnitBox, by default the origin is top-left (0,0). To move the origin to bottom-right and fix the height and width to say |1| try this, UnitBox(1,1,-1,-1).

like image 179
Abhijith Avatar answered Sep 07 '25 06:09

Abhijith