Group Abstract Group Abstract

Message Boards Message Boards

0
|
883 Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

How to resize a DateObject?

Posted 3 months ago
POSTED BY: Andrew D
Posted 3 months ago

My suggestion would be to avoid trying to mess with these front end "objects", especially if you're not willing to dive into stylesheet, boxes, options, etc. You can create your own version of the "object" with DateString and a Panel (as one example--there are many other ways to do this).

As for why your Rasterize didn't work as expected, one thing to keep in mind is that the display of images in the front end isn't always faithful to the image's actual size. ImageSize is used to control the display size, so it was reasonable for you to try it, but you can't assume that 75% of the original image dimensions will display as 75% of the displayed size of the original. You'll see what I mean if you just try Rasterize[myDateObject] (without any options specified). It should appear bigger than what the front end displayed for myDateObject itself. So, when you set ImageSize to 75% of the image dimensions of the original, it just so happened that that display size was very close to the display size the front end chose automatically for the original myDateObject. (FWIW, if you wanted to actually change the data itself, you should play with RasterSize instead of ImageSize.)

It turns out to be a whole complicated topic to figure out how to get from the dimensions of the data of a thing to how big that thing appears in the front end, and it's almost never as easy as making one screen pixel correspond to one "cell" of image data.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard