2 Replies Latest reply on Jul 22, 2013 9:37 AM by Jonathan Whiting

    How do background images lock aspect ratio?

    Jonathan Whiting

      I am trying to stretch a map background image to match 28 different coordinates. I've selected "Lock Aspect Ratio" because I don't want the map getting all stretched out of shape and therefore not matching these 28 different coordinates.

       

      However, even with this box checked, you can still change the "right" and "left" coordinates without the "bottom" and "top" coordinates responding automatically to keep the aspect ratio constant. How does a map allow the user to set all four side boundaries and yet keep the aspect ratio constant? It seems impossible... and as a result I'm struggling to line up the background image.

        • 1. Re: How do background images lock aspect ratio?
          Dan Cory

          Lock aspect ratio means Tableau won't change the aspect ratio of the image when it is displayed on the viz. But the mapping from image coordinates to viz coordinates does not need to have the same ratio in both dimensions.

           

          Usually I recommend using the actual pixel size of the image as the coordinate system for the image. Set left to 0 and right to the image width in pixels, set bottom to 0 and top to the image height in pixels.

           

          But if you've already set up the data in some other coordinate system, then that is how you need to set top/bottom/left/right.

           

          Can you post a TWBX or a more detailed description of why you having problems setting top/bottom/left/right?

           

          Thanks,

          Dan

          • 2. Re: How do background images lock aspect ratio?
            Jonathan Whiting

            Hey Dan,

             

            Thanks for the response, that makes sense. I can't post the TWBX because of the nature of the project, but everything is set up in a latitude/longitude coordinate system. I think I was just getting frustrated because I couldn't seem to get the coordinate system correctly aligned with the plotted points. However, I appreciate the recommendations and explanation on how the image coordinates and aspect ratio can work hand-in-hand.

             

            Thanks,

            -Jonathan