Best way to programatically re-size graphs?

I have a window that pops up, containing X-Y graphs, that are say, 600 pixels wide.
Under some circumstances, I want to reduce this to say, 400 pixels, and uncover a cluster of numeric displays occupying the other space.
I would like to set the BOUNDS.WIDTH of the graph so that it extends right up to the POSITION.LEFT of the cluster.
But I can't adjust the BOUNDS.WIDTH of the graph itself (that property is read-only).
I can adjust the PLOT AREA.SIZE.WIDTH of the graph, which will affect the BOUNDS.WIDTH.
But I can't use that for calculations, because I don't know the margin between the plot area and the graph bounds.
I want it to work when the user re-sizes the window (All objects are scaled when window re-siz
es). He may resize the window, close it, open it again and the size remains as he left it. That means I can't use absolute pixel values to move things around.
I have thought of using decorations: a hidden rectangle that's the size of the small plot area, and another one that's the size of the large plot area. Then set the plot area's SIZE.WIDTH to the width of the small or large decoration. They decorations would scale along with everything else, and all would be OK.
1... Does anyone have a better / different idea?
2... If not, how should I get the reference to the decorations? They can't be named. Using the VI reference, I would have to pick out decorations #3 and #4 or something (there are other decorations already present). That just seems a bit fragile. How can I move these new ones to be #0, and #1 ??
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Hi,
Here's what I've used to do this;
1) Get the DesiredSize (bottom-top, right-left). The origin can be set, so
that should be easy...
2) Calculate the "Bounds" - DesiredSize.
3) Add the "PlotAreaSize" to the result.
4) Put it in the "PlotAreaSize".
The quoted names are property values of the graph. Just a tip: put it all in
a subvi that uses a refernce to the control.
The logic behind this is that the difference between the total bounds, and
the plot area is constant.
Regards,
Wiebe.
"CoastalMaineBird" wrote in message
news:[email protected]...
> I have a window that pops up, containing X-Y graphs, that are say, 600
> pixels wide.
>
> Under some circumstances, I want to reduce this to say, 400 pixels,
> and uncover a cluster of numeric displays occupying the other space.
>
> I would like to set the BOUNDS.WIDTH of the graph so that it extends
> right up to the POSITION.LEFT of the cluster.
>
> But I can't adjust the BOUNDS.WIDTH of the graph itself (that property
> is read-only).
>
> I can adjust the PLOT AREA.SIZE.WIDTH of the graph, which will affect
> the BOUNDS.WIDTH.
>
> But I can't use that for calculations, because I don't know the margin
> between the plot area and the graph bounds.
>
> I want it to work when the user re-sizes the window (All objects are
> scaled when window re-sizes). He may resize the window, close it,
> open it again and the size remains as he left it. That means I can't
> use absolute pixel values to move things around.
>
> I have thought of using decorations: a hidden rectangle that's the
> size of the small plot area, and another one that's the size of the
> large plot area. Then set the plot area's SIZE.WIDTH to the width of
> the small or large decoration. They decorations would scale along
> with everything else, and all would be OK.
>
>
> 1... Does anyone have a better / different idea?
>
> 2... If not, how should I get the reference to the decorations? They
> can't be named. Using the VI reference, I would have to pick out
> decorations #3 and #4 or something (there are other decorations
> already present). That just seems a bit fragile. How can I move
> these new ones to be #0, and #1 ??

Similar Messages

  • Best way to increase image size for print

    I have a jpeg of an image that I will have to increase roughly 140% for a final print size of 16"x20". I am creating the final design in InDesign, but am editing the image in Photoshop first. My question is what's the best way to increase the size of the jpeg first in Photoshop (I assume) so that when I bring it into InDesign it is maximized in terms of resolution but not so large that the file size prohibitive for sending.
    I've already cropped the image, but haven't adjusted any of the sizes. The dimensions are currently: 3233 pixels x 2586 pixels, and 10.777 in x 8.62 in at 300 pixels per inch.
    Do I bring it into InDesign this way or increase the document size first in Photoshop? I assume the latter.
    If I increase the size in Photoshop, I assume I should resample the image. If I do, that increases the pixel dimensions and file size to over 82.4M. Is there a way to keep the 300 ppi resolution while reducing the file size?

    Photoshop CC now has Preserve Details as well as Bicubic smoother for enlargements.
    140% is not asking much for enlargements. Photoshop may suffice.
    You mention 300 ppi. Is it  really necessary? In the days of offset presses,that was the standard, but what is it for a photo inkjet or the printer you use? You may not need 300.
    Personally when I enlarge, I like Photozoom Pro. I have it on my Mac and PC and find it better than stock enlargement in Photoshop. Of course it's $99-$199 depending if it's on sale.
    Here's a bit more about digital enlargement in this Sydney Morning Herald article
    http://www.smh.com.au/digital-life/cameras/how-to-enlarge-images-without-pixelation-201306 26-2ovts.html
    Of course Photoshop is for preparing photos for print and the web, so you would want to finish your photos there before moving them to InDesign.
    Trevor Dennis, Noel Carboni and many other professionals can give better answers on the subject of enlargement and printing so I hope they will post advice as well.
    I can't answer the last one honestly, I've never prepared prints for room exhibit, so I can't say what works best.
    Good luck. I hope you can get it sorted out.
    Gene

  • What is the best way to find the size of files?

    What is the best way to find the size of my files?

    Select a file or folder in the Finder and choose Get Info from the File menu.
    (125056)

  • What is the best way to increase the size of a "full" Xserve raid?

    Hi,
    our Xserve raid consists of 2 x 7 x 350GB disks.
    These are arranged in 2 volumes (one per controller), RAID 0+1, 3 disks striped, then mirrored, and such are using 6 of the 7 disks per controller. 1 disk per controller is configured as a hot spare.
    During time both volumes have filled up and now there only are 100GB left on every volume and we need more space
    Is there a way to hot replace 350GB disks by 750GB disks?
    Or is the only way to copy data off, replace disks, and restore data?
    I would guess, that I can replace one disk with a 750GB disk, but only 250GB of it will be used. If I then would wait for reconstruction of that new part, and then replace its counterpart? Would only the first 350GB be reconstructed and the 400GB be lost, or would the raid recognize the free space and allow to add it to the stripes and mirrors?
    Cheers,
    Martin

    A disks in the array need to be the same size, so your guess is correct - if you replace a disk with a larger disk, the additional space will be lost.
    As a result there's no trivial way of doing this.
    Copying off the data, reformatting and restoring the data is the best way to go.
    If that's not possible, you have one small chance thanks to how you've currently configured the arrays as 0+1.
    You could break the mirror on controller 1- that would give you two logical arrays of three disks each. You could then take the data off the 0+1 array on the second controller and put it on the second half of the first controller, leaving the second controller's volumes spare.
    Then destroy both volumes on the second controller and rebuild it as a RAID 5 volume. If you want to retain a hot-spare, this will equate to a 6-disk RAID 5, or about 1.8TB
    Now you move the data from the two RAID 0 arrays on controller 1 onto the RAID 5 array on controller 2 and repeat the process to rebuild the 6 disks into a single RAID 5 volume. You can then redistribute the files as you like.
    Of course, during this process you'll be running with lower (read: no) redundancy, so you had better hope a disk doesn't fail in the process.
    A 6 disk RAID 5 is going to offer about the same performance and redundancy as the two mirrored 3-disk RAID 0 arrays (more performance if those RAID 0 arrays are full), with the advantage that RAID 5 isn't so wasteful of disk space (you lose have your total space to the mirror as opposed to one disks-worth of data to parity in RAID 5).
    Either way, back the data up first.

  • Best way to increase RAID size

    I have a client who creates large signage with a Mac Pro Xenon quad tower, it has an OS drive a scratch drive and two 1TB drives Mirrored. The mirrored drives are full and I want to add 2 2 or 3 TB Western Digital black sata drives and mirror them. Problem is I have to copy the data from his current mirror setup to his new. From reading I believe I can set up two raid sets in the Mac. I am thinking of removing the OS drive and scratch drive, putting the two new drives in the two open bays, putting the OS drive in an external raw drive dock, booting from it, setting up the second raid set with the bigger drives and then use copy the data from the older mirror set, removing them and putting the OS and scratch drive back.
    Is this the right way to go about this or is there a better way?

    That sounds like the best way. It also sounds fairly safe, in that copy to a new RAID will survive the infant death of one of the drives.
    Using command line utilities, you could create a Mirrored RAID with only the first drive available, and then use Disk Utility to add the second drive later and update it. I have done that, and can verify that it does work, but I think your approach is superior.

  • What's the best way to decide file size to fit my large video on a DVD?

    I have a video that's over 2 hours. What's the best way to figure out what bit rate to use for the audio/video tracks?
    Thanks,
    -------------S

    Steve
    You can use this online * Bitrate Calculator * and/or download [* BitBudget *|http://www.recipe4dvd.com>.
    Don't forget to encode your audio to Dolby 2 (AC3).
    Hope that helps !
      Alberto
    Message was edited by: Silal

  • What is the best way to reduce the size of my Library

    Over time I have been extremely lazy and have not managed my Library very well. I have used CS2 along side Aperture and have done all the following:
    1 - Edited files in CS2 and then imported them into Aperture as a TIFF or PSD
    2 - Edited files in CS2 and then imported them into Aperture as a TIFF or PSD then made further adjustments in Aperture
    3 - From Aperture 'opened files with external editor' (CS2) and made adjustments in CS2
    4 - From Aperture 'opened files with external editor' and made adjustments in CS2 then made further adjustments in Aperture
    And to top all this off I have been merrily keywording and changing the Metadata. Switching between CS2 and Aperture in this way has left me with some VERY big files (especially the TIFF that Aperture produces when I use the 'open with external editor function'.
    I am looking for advice on how I can set about reducing the size of some of these files and what a suggested approach might be for 1-4 as each of them presents it's own special problem.
    Here's hoping you can help
    Cheers

    Hard drive capacities keep increasing. Easiest (seriously) is just to buy a larger hard drive. The time expended trying to save space on previously manipulated images is seldom worth the effort.
    -Allen Wicks

  • What is the best way to place image (with caption) in a Book?

    I am preparing a template for an Encyclopedia project, The Encyclopedia will be in more than 10000 pages, so what is the best way to place images (Photos, Graphs, illustration ...etc) with a caption?
    The problem that when I modify text; the image don’t move with it, and when I place it within the text, it's difficult to control text flow.
    Please Help

    Thank you Peter,
    it's a bit dificult to control anchored object -speacially in two colum text box- when placing image in one and half colum size, it wont move to first column.

  • What is the best way to verify default heap size in Java

    Hi All,
    What is the best way to verify default heap size in Java ? does it vary over JVM to JVM . I was reading this article http://javarevisited.blogspot.sg/2011/05/java-heap-space-memory-size-jvm.html , and it says default size is 128 MB but When I run following code :
    public static void main(String args[]) {
    int MB = 1024*1024;
    System.out.println(Runtime.getRuntime().totalMemory()/MB);
    It print "870" i.e. 870 MB.
    I am bit confused, what is the best way to verify default heap size in any JVM ?
    Edited by: 938864 on Jun 5, 2012 11:16 PM

    938864 wrote:
    Hi Kayaman,
    Sorry but I don't agree with you on verification part, Why not I can verify it ? to me default means value when I don't specify -Xms and -Xmx and by the way I was testing that program on 32 bit JRE 1.6 on Windows. I am also curious significant difference between 128MB and 870MB I saw, do you see anything obviously wrong ?That spec is outdated. Since Java 6 update 18 (Sun/Oracle implementation) the default maximum heap space is calculated based on total memory availability, but never more than 1GB on 32 bits JVMs / client VMs. On a 64 bits server VM the default can go as high as 32gb.
    The best way to verify ANYTHING is to address multiple sources of information and especially those produced by the source, not some page you find on the big bad internet. Even wikipedia is a whole lot better than any random internet site IMO. That's common sense, I can't believe you put much thought into it that you have to ask in a forum.

  • I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. What is the best way to do this

    I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. Even when I save it, the image quality at minimum the file size is 10.9 MB. What is the best way to do this

    @Barbara – What purpose is that PDF for? Print? Web?
    If web purpose, you could convert CMYK images to sRGB. That would reduce the file size as well.
    A final resort to bring down file size is:
    1. Print to PostScript
    2. Distill to PDF
    That would bring file size down even more. About 20%, depending on the images and other contents you are using, compared with the Acrobat Pro method. If you like you could send me a personal message, so we could exchange mail addresses. I could test for you. Just provide the highres PDF without any downsampling and transparency intact. Best provide a PDF/X-4.
    I will place the PDF in InDesign, print to PostScript, distill to PDF.
    Uwe

  • Best way of including timing in a waveform graph?

    Hello all,
    I've been toying with a number of different ways to do this, but so far I haven't had all that much luck. I've posted a picture so you can see what's going on. All I have is 4 plots that need to be plotted with accurate timing information on the x-axis. I guess I'm just wondering what the best way to go about this is. This method seems to be the most cluttered and messy that I've done, but is the only one I've gotten to have the actual correct timing info on the graph. I would put a wait in the loop, but I need to acquire this data as fast as possible. Thanks for any help!
    Geoff
    Attachments:
    Graphing Test.jpg ‏74 KB

    The display options you have chosen are OK on their own.
    If you're looking to get more speed out of the code, try only graphing the data every 10 iterations or so. You can save the processed data (your waveforms) in a shift register where they can then be appended every 10 iterations.
    This will obviously not clean up your code. The best way to clean up your code might be to simply throw the conversions you're performing into a sub-vi. Or create a time input for your "meters" VI and have thr processing done there with correctly-scaled values being outputted.
    Hope this helps
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • What is the best way to reduce a .mov file size

    I had a music DVD that I converted to a .mov so that I could cut and paste in QT pro which i have done.
    Now I have a .mov file that is 46 gigabits in size and I want to reduce it considerably without ruining the quality of sound or visual.
    Whats the best way to do this.
    Thanks

    punt

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • Best way to increase root and home part sizes

    Just want to check what means to increase size of root and home. Here's the drive with them now:
    Device Boot Start End Blocks Id System
    (xp) /dev/sdc1 * 1 7649 61440561 7 HPFS/NTFS
    /dev/sdc2 7650 8865 9767520 83 Linux (root)
    /dev/sdc3 8866 12512 29294527+ 83 Linux (home)
    /dev/sdc4 12513 60801 387881392+ 5 Extended
    /dev/sdc5 12513 12998 3903763+ 83 Linux (swap)
    /dev/sdc6 12999 60801 383977566 83 Linux (stuff)
    Everything is backed up and I have other drives to move the /dev/sdc6 over onto temporarily. I have burned GParted LiveCD but I have never used it, would I boot into it and basically see GParted and be able to delete/edit/etc. my partitions?
    Now here's where I get a bit confused: Will I have to delete root and/or home to increase their sizes? If so, what is the right way to copy root back over when I am done the partitioning? I have never copied a root back over onto the system. If I use something as simple as cp -pr, then from where would I do it? Would it be some console I can get into from the Arch LiveCD or something?
    Thanks for your help!

    jbromley wrote:
    If you move the sdc6 partition off of this drive to make space available, then gparted should be able to move and resize the remaining partitions to take advantage of the remaining space. This means that you shouldn't have to copy over your root and home partitions after the resize. Of course, you'll want backups of these partitions just in case.
    You second questions is good just for general knowledge. As mentioned above, you shouldn't have to do this. If you do need to copy over root/home the best way is to use some LiveCD to boot your machine. System Rescue CD and grml are two good rescue/admin type CDs, but I'll bet you can get to a console using the gparted live CD. Once your system is booted with some live CD,  mount your root/home partitions and your backup copy and copy over the root/home partitions from your backup. Something as simple as cp -pr should work here. Once you're done copying, unmount the drives and reboot. When you reboot after resizing a partition you'll probably have to run fsck, but it shouldn't be a problem.
    It's all pretty straightforward. Note that resizing big partitions might take a long time. Oh yeah, be sure to back up your partitions before doing any of this.
    jbromley, you give quality answers. Furthermore, you could use your Arch install cd as the "rescue" disk. It has all the tools you need to mount your partitions and copy files. But you shouldn't have to do that if gparted works.

  • Best way to deal with different screen sizes

    Hi !
    We have been a small company using java for our client ( http://www.topbridge.com ) . The Swing client has used panels with absolute positions so the client would fit in 800x600 screen. Since java is 'run everywhere' we would like to rewrite it so it also possible to run on smaller screens ( zaurus ) . Any suggestions about best way to do this? Is there any layout method that would try to fit everything within a given screen size?
    Thank you!

    The Swing client has used panels with absolute positions
    Well there's your problem: your UI was written by someone who didn't know how to write a UI.
    Always sketch your UI on paper, break it into logical sections rather than dealing with everything in one go (your code should break down accordingly in any case) and for each of those sections determine where space should be allocated when resizing - from this, the decision of which layout managers to use will fall out naturally.

Maybe you are looking for