Tkinter surface is displayed wrong in exe - user-interface

I'm already trying to fix this for hours but it doesn't work.
I converted my python script to an exe-file. Via pyinstaller and via cx_freeze. But both have the same problem: They display the surface in the wrong way. I include canvas as FigureCanvasTkAgg and when I run it with Spyder it is displayed well. (I tried to place them via .place() and via .pack() ). But with the exe it's all above another and it displays only one of all the canvas (when I enter data for a chart).
Can somebody tell me how to correct this? Is there a way to convert the file to an exe like I can display it via Spyder?
Thank you!!
Displayed in exe: everything is overlapping
Here displayed how it should be

Related

Paraview programmatically Save Screenshot not working on an XYChartView

Using ubuntu 16.04 LTS, Paraview 5.0.1.
I have a Layout with two views, one RenderView and one LineChartView.
I want to programmatically Save Screenshot and Save Animation of the two together.
When doing either one, and also when doing this with only the LineChartView, only a portion of it shows up in the created image. The image below shows an example, where the error is evident.
The same result is obtained when saving the image with:
WriteImage("test.png")
SaveScreenshot("test.png"). Tried several combinations of ImageQuality, ImageResolution, magnification.
Via menu (not my final target, but I tried it).
How can I programmatically get the correct images/animations, both of this View alone and paired with another one?
As posted by Cory Quammen in a comment, upgarding to 5.4.1 seemed to work.
I wouldn't know if suitably setting some parameters (e.g., lineChartView1.ViewSize and/or in SaveScreenshot) this could also work in 5.0.1.

Three.js Example code, from StackOverflow, not working

I copied and pasted the Three.js code given here into an HTML file and downloaded the three.js package from the website, and configured the <script> tag to point to the location of the file three.min.js.
Nonetheless, when I open the HTML file, it displays a blank white screen.
What am I missing?
well I tryed the exact same thing and I'm seeing the wireframe cube rotating on screen. A few things to try.
1) drop the three.min.js right in the root folder and copy/paste the example code again without any alterations.
2) did you get the three.min.js from the zip package under the build directory? Or did you navigate the git repo and copy/paste it? If copy/paste was used be sure to click the "Raw" button to get the code without the wrapper HTML.
3) try the latest Firefox or Chrome browsers first. If it works there but not in say Safari, there are a few steps you need to take to enable WebGL in Safari first.
4) your video card may be blacklisted due to driver incompatibilities.
If none of these help, then post up the code, where you got the Three.js package, what browser and video card your using and I'll see what else I can do to help :)
I had the same problem. Windows hides the file extensions by default. I change it in folder options and it worked.

How to get an Innosetup installer package to display a non-scaled icon image (>32x32)

I've started using 'large' icons on my desktop. For a while I've also been including images > 32x32 in my Delphi Application. The result is a nice clean image display in all Windows display situtations. I know its rather picky, but i've just noticed that a compiled Innosetup package displays fuzzy - I presume its being scaled - and it occured to me that there must be a way of adding to or changing the default Innosetup image displayed for its EXE. You can see the effect in the image below. I have many icons available to me, so a solution for replacing the default icon would be great.
Ah I found it. To specify a custom icon for a setup application, use the SetupIconFile directive:
[Setup]
SetupIconFile="MyIcon.ico"

Previews of matlab figures in Windows explorer (utility to set an image as the thumbnail for another file)

Has anyone come up with a way to make thumbnail type previews for matlab figures in windows?
I'm getting tired of saving a .png along with the .fig file just so I know what was in it.
A useful helper for this would be a command line utility for windows that can be provided with an image file and told to use that as the basis for the preview for a given file.
I could write a helper function in matlab that saved the .fig, made a temporary image file, then pushed that into the thumbnail using the command line utility.
You can write a function in C++ that tells Windows how to generate thumbnails from your file.
This link explains about it. Check out the section about Thumbnail Image handler. This is the function that you will need to implement.
From what I managed to understand, the procedure is this:
Write a in-process COM server (DLL) that implements IThumbnailProvider interface
Put the DLL file somewhere on your computer.
Write an entry to the registry, by using the procedure described in this page.
That still leaves you with the problem of thumbnail extraction from .fig file. As far as I know, fig files are nothing but mat files. I am fairly sure that it is possible.
You will need a custom save function for all figures. It will print a thumbnail of the image (by using the print command), and save it inside the figure.
I know that it isn't much information, but it can help you to get started. You might as well ask someone who is highly proficient in COM technology for more help. Thus, I recommend adding a COM tag to the question.
Edit(1) - I've found a good tutorial on the subject:

How to render with yafaray on mac osx

I've installed wings 3d on mac osx and I'm loving it. The problem is I can't do any fancy renderings. I've downloaded and installed YafaRay-0.1.0.305-OSXintel10.5 and I can't seem to get it to work.
The wings3d manual states that on mac os you export the xml file from wings 3d, but you make the rendering from Terminal, calling yafaray with the path to the generated xml as an argument.
I expected to find yafray or yafaray using locate, but I couldn't. I found yafaray-xml in /usr/local/bin
Just for testing I exported a cube in a file called box.xml
Initally I got a loads of scene tag related errors:
warning: expected </scene> tag!
Bus error
Then I removed the tag from the xml and tried again, and I got
?m?setting up scene...specify a camera!!
Anyone know how to render with yafaray from terminal on macosx ? Or how to setup a ray tracer for wings 3d on mac osx ?
Got it working now!
yafaray is a rewritten version of yafray and the xml structure is different, so wings3d is outputting the wrong xml.
I found an xml structure that worked here. I just adapted the mesh node to one of my own meshes and I got a render from terminal.
Also if anyone is interested in the official specs here they are.
The handy user guide can be found here.
I tried using blender and blender 248.1 keeps crashing when I select the yafaray xml script from the render menu. blender 245.15 on the other hand crashed a few times first, but now I can render without any crashes. The only glitch is that after each render the ui freezez, so I need to CMD+Tab to another app and back to get around that.
Hope this might help anyone else having similar issues.

Resources