Group Abstract Group Abstract

Message Boards Message Boards

0
|
19.5K Views
|
17 Replies
|
1 Total Like
View groups...
Share
Share this post:

How to increase the size of a CDF on screen

Posted 12 years ago
When I open a CDF document in a browser, for example. on the WA Pro or any interactive demonstration projects, I often need to increase the size of CDF to be able to actually see what is happening. Probably I'm doing something wrong, but in WA-Pro the height is often severely limited and on the other CDF is usually the width is limited. 
How to get bigger CDF and maybe even a full screen view ?
POSTED BY: Math Lind
17 Replies
Posted 12 years ago
POSTED BY: Gary Palmer

Gary, not sure if this is what Andre means, but the notebook you attached has no code (Andre: "...original source notebook..."). You added code in the post but it is corrupted somehow - if you evaluate it, it will break. This happens when code is not formatted properly. This tutorial will tell you how to format code so it can be copy-pasted from Community to a notebook. I see moderators already tried to format your code - but it is too late - some typos creeped in. You can edit your last post, paste code again and format it correctly. Alternatively you could just attach a notebook with the code.

I hope this helps. Sam.

POSTED BY: Sam Carrettie
Posted 12 years ago

@Sam and @Andre, I'm sorry the code didn't work. I see now that I mistakenly attached a .cdf file rather than a notebook, but I did previously attach a notebook in my second message on this thread. I just now opened it from this page and it produced a plot. Nevertheless, a copy is attached with this message. Thank you for the link to the tutorial. When I clicked on the link with the intention of editing the code in the message above, it appeared to respond, but then it returned me to this page, so I was unable to read it.

Attachments:
POSTED BY: Gary Palmer
POSTED BY: Andre Kuzniarek
Posted 12 years ago
POSTED BY: Gary Palmer

@Gary, without seeing your original source notebook, I can only guess that the reason your embed object size does not match your CDF might be from exporting while the original notebook was set at a magnified size. Otherwise, I have confirmed no problem getting precise output as desired on Mac and Windows equally. This particular magnification issue should probably be considered a bug, obviously it has the potential to be confusing. I'll get it reported (if it hasn't been already), thanks.

POSTED BY: Andre Kuzniarek

@Gary, was hoping to look at the notebook you used to generate the CDF. But I can try stripping this CDF back to its normal notebook state and export it myself to see how it sizes. I'm using Mac btw, and will try Windows as well in case there's something going on there.

As for displaying the CDF in web pages using our JS embed code, your example (from your server) works for me viewing in Safari on Mac and IE on Windows, but not in FireFox or Chrome on either platform. It's possible there is some sort of security aspect to this that needs user interaction, or you need MIME types to be set up (see the CDF again for details on that).

POSTED BY: Andre Kuzniarek
Posted 12 years ago

@Andre, the notebook is attached. The only change from the previous attachment was to the background of the cell. The size is specified according to previous instructions as ImageSize --> Medium. I put it in the GraphicsRow options because Manipulate rejected it as an option. That is, it prints in red within Manipulate, but it seems to work the same way. The white panel remains. The only other object options that might affect size are the Graphics Plotrange options, but those are necessary to the plot.

I would like to copy and paste the embed code provided by the export wizard, but it doesn't function on the UNLV server. When I use it, I get no image at all, as you can see here:

https://faculty.unlv.edu/gbp/mma/VisualComplexAnalysis/CDF/Log.function.html

Do I need to ask them to install something to make this work?

P.S. By mistake, attachment is a .cdf rather than a notebook. See messages above or below for the notebook attachment. The code in a message below is also functional now (July 31, 11:22 PM).

Attachments:
POSTED BY: Gary Palmer

@Gary, without access to your source notebook, I can only guess that the export process is calculating the embed size based on some additional content that is not displayed. You can surely eliminate the white panel by reducing the object size (note the position of the CDF icon in the lower right corner is based on the object size settings).

I do however recommend you copy and paste the embed code provided by the export wizard, rather than just using the "embed" tag.

POSTED BY: Andre Kuzniarek
Posted 12 years ago
POSTED BY: Gary Palmer
Posted 12 years ago

@Andre, thanks. That's how I would like mine to behave.

POSTED BY: Gary Palmer
Posted 12 years ago
POSTED BY: Updating Name
Posted 12 years ago
Attachments:
POSTED BY: Gary Palmer

@Gary, here's my CDF example in its original background:

http://members.wolfram.com/andre/cdf/webscaling

I will take a look at your particular example a bit later today to see if I can be of further assistance, thanks.

POSTED BY: Andre Kuzniarek

Looks like there are two distinct questions here:


1) How to make web-embedded CDF content zoom (change magnification) with the rest of the surrounding web page

This is a feature now supported with the release of Mathematica 10, and coming soon with the new CDF Player. You can see this in action (using the Mathematica 10 plugin) at this Tumblr page:

http://arksphere.tumblr.com/

Use your standard web browser view menu zoom settings to see the top example change size with the rest of the page, whereas the older example below it will remain a static size. A CDF must be saved with version 10 to to enable this behavior, and we're in the process of making these updates to all CDFs in our product sites.


2) How to match a CDF based on Manipulate to the size specified your HTML

Interactive diagrams created with Mathematica's Manipulate function are scalable (to the degree allowed by white space within the Manipulate box) and will adjust their size to the dimensions set by the embed code. For fixed dimensions, configure your content with ImageSize or ContentSize set to an explicit value or size specification. ImageSize->Medium will preserve Mathematica's default dimensions.

You'll find this and other details at the "Formatting Your Content for Embedding" section of the CDF website's deployment page:

http://www.wolfram.com/cdf/resources/deployment-details.html

</br>Hope this information helps, and I will make a point to check in later to see if there are more questions/concerns.

POSTED BY: Andre Kuzniarek
Posted 12 years ago

This is a good question and I am surprised no-one has come up with an answer so far. I would also like to increase the size of the output cell on my Manipulate exercises.

POSTED BY: Hamish Small
Posted 12 years ago

It's been a whole month since Math Lind posted this question. I sure hope that someone has an answer for this. I would also like larger sizes and I would like a reliable way to match the size of manipulate box to the size specified in the browser. For an example of the problem, see any of the demos at https://faculty.unlv.edu/gbp/mma/VisualComplexAnalysis/CDF/.

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