nmacsai

260 Reputation

9 Badges

4 years, 64 days

MaplePrimes Activity


These are replies submitted by nmacsai

@nm 

Is this method and .pdf good for creating animations? I am exporting thousands of frames. I'd like to avoid processing each frame in an external software. Actually, I've done it, and its a pain, which is why I was looking to solve this problem at an earlier stage in the pipeline.

My actual task is more complicated than I've led you to believe with the example I give above. I tried to make the example as simple as possible to show only the nessessary peices of the problem so its easier to communicate to a forum audience.

It's looking like Maple cannot natively export plots without borders and I have to implement my own solution like that suggested by @dharr 7533 where you 'convert the plot to an image, then strip off the pixels around the border when you write the image to a file. You still have to determine how much to strip off by trial and error but in the end it probably requires way less clicking.

@nm Thanks for your suggestion. It is exactly what I was looking for. I tried running your example but I was still finding the white boarder on the exported plot. See attached screenshot. In the screenshot I show the code used, what is saved in the target location and image opened with Windows Photos.

@dharr 

Thanks for your suggestions. I agree these solutions will work and I may use them if I can't find a standardized solution. Its difficult to imagine that existence of this white border cannot be influenced with default plotting procedures, like those in the Maple plotting guide.

Thanks these are great. @acer 

@acer Amazing. Thank you!

@acer Thanks for your response! I was able to generate the animation with Explore( ) in the past but I couldn't figure out how to export the animation generated by Explore( ) to a .gif or png file(using the command line approach). The topic of the initial question was found while exploring alternatives to the Explore( ) method you describe. What section in the help can I read that will tell me  how to access objects contained in the Explore function applied to the plots(using the command line approach)? The data is contained in the structure, I just haven't figured out how to access it from command line. There's more too it than the Explore() function alone.

With plans to animate these heat maps I considered the question: is it more efficient to create the animated gif and export it all with MAPLE or, export all the frames one at a time and then import and export those gifs using an external video production software? Which method is best optimized for software stability and minimizing processing time? And how do these concerns scale when generating more comlicated images. etc.

The proc parameter k in proc go2 was meant to have no effect but to ensure I get a new random matrix everytime I call go2. At one point the coding process I wasn't getting a new random matrix when calling go2 and the output became state became static. I found writing the go2 proc like this worked for my purposes so I didn't touch again.

When posting, I usually try to submit an example that is as simple as possible while also containing the mechanism/issue/problem I'm trying to describe. This simplification may obscure the original purpose of the code, which is why it might look silly.

Yes it helped immensely. It pushed the caption to above("further to the right")  of the color bar labels.
@acer 

See solution:

Can_I_change_the_location_of_the_color_bar_caption_in_Maple_2024_sol1.mw

And on that same note, can one adjust the size of the color bar? It looks like its size is by default equal to the plot size of the display output which may be much larger than the plotted graphic itself. You can see this in my attached example above. My title ate up a lot of vertical space and the color bar was stretched over the title space. It is a perhaps a matter of preference but ususally you want the color bar to span your graphic and not your graphic + title + caption.

@acer 
Again Maple 2023;
With this method, can the font size of the color bar be modified? The color bar numbers show up kinda small in my plot. Can I add a label or title on the color bar?

@acer 

I tried 'view' initially but it just cuts off the image. See below.

@acer 

Ah I see ok.

I will give the viewpoint method a try.

I wasn't sure if it needed its own thread or not. I will post it in Comment/Reply next time.

Thanks again for the extremely helpful responses.

@acer 

Thank you very much for your replies. Yes I am currently using Maple 2023.

I looked through the help page to see how op(), indets(), subindets() and specfunc() work. I think the basic idea is to decompose the plot into operands, find indeterminants and perform a substitution on them with some kind of transformation function, then re-make the plot post-transformation.

If I may as one more question, is there a way to use: op(), indets(), subindets() and specfunc() , as you have shown, to take the color bar you generated and 'slap it' on to some other 3D plot(with a totally unrelated color scheme) like: c1 := display(cylinder([1, 1, 1], 1, 3), scaling = constrained, color = red)? I am imagining replacing the plot of sin(x*y) with the plot of the cylinder using op(), indets(), subindets() and specfunc(), while retaining the color bar from the first plot. Is such a thing possible?

That's correct. Thanks for the confirmation. @acer 

1 2 3 Page 1 of 3