How to change colors of function plots in Tensorboard? - tensorflow

I'm trying to compare different learning-rate-decays using Tensorflow. Therefore I visualize the cost functions in Tensorboard ('EVENTS'-tab). My problem is that the different plots of the functions are in very similar colors making it hard to compare them. Is there any possibility to change those colors?

Just create different summary writes with different log files for each learning rate. Then launch the tensorboard tool using:
tensorboard --logdir=tag1:/path/to/summary/one,tag2:/path/to/summary/two

There's currently no way to change those colors, but a recent release has made the colors more differentiated. Try updating and seeing if that helps.

This is very far from an actual solution, but in case someone only wants to change the colors for a screenshot in a paper or presentation its a quick workaround:
Open your browser dev tools (F12)
Search for the color code you want to change (the default orange is #ff7043) and replace it with the color you want

As suggested here, creating (and pointing tensorboard to) a symlink of a run's logdir is one workaround to change the color used to plot that run.

Related

Making a shape act like a connector and snap to another shape. Visio

I'm pretty new to Visio but I'm trying to figure how I could possible design a stencil to snap to a connector marker on another stencil/shape.
I have looked into actually editing the connector itself too see how its designed. I'm wondering If I could recreate the Endpoint on a single location for a shape stencil. Which would snap into place on to the designated shape, when a user drags it on to the worksheet.
Would anyone have any ideas or pointers on how I could achieve this?
I found my solution here.
http://visiozone.com/?p=298
Pretty much I had to take a 1D shape (A line) and Adjust the parameters of its boundary box inside the master shape, then group it too get it to act like a 2d shape. After, I could edit the group and add the shape I wanted then. Deleting the line and adjusting the endpoints.
Highly recommend checking the link out. I hope this helps anyone out there with this issue.
I'm not sure why its really difficult to find information on Visio. Being a 19 year old program. Haha.

DataFrame (pandas) plot opens window but there is no plot

I am unable to produce any charts in Python (matplotlib 3.5.1) with the pandas DataFrame plot() method. A window opens and the axes return value is <AxesSubplot:> as opposed to returning an object like that prints as somethig like <matplotlib.axes._subplots.AxesSubplot at 0x7f3958bcf9d0>, which is what I usually see when the plot works.
The backend is QtAgg and as far as I can tell from a poke between fora pages that report a similar problem this should be all right. This is also not a problem with needing to run matplotlib.pyplot.ion() as I see a window open, but it is black with no plot in it.
Any advice would be useful, thanks!
I have resolved the (mis)behaviour without really being sure that I have resolved the issue responsible for this misbehaviour.
As looked around for a way out, I found this discussion (How to change backends in matplotlib / Python) which made a lot of getting the back end setting right. Wondering if that would make a difference, I changed the back end. The QtAgg back end loaded by default from the matplotlibrc file and so following the instructions in the post on how to permanently change the back end, I modified the file so that the back end is now Qt5Agg. The data now plots.

matplotlib doesn't show figures after converting to exe file

Everything looks OK if I just run the scripts in Pycharm. It will show the plots.
However, after I convert the scripts into exe file. It can save the plots, but it won't show any plot. The most weird thing is that it will re-open another exe file.
Thanks, really appreciate if someone know the root cause.
As mentioned in the comment, calling matplotlib.use('WXAgg') is necessary, but there is another step: matplotlib has a backend object you need to import manually to paint a figure in wx: matplotlib.backends.backend_wxagg. This creates a figure canvas object inside a wx.panel of your choosing.
This answer contains a nice example. Furthermore, you can look up the actual object in matplotlib website, then proceed to look at their artist tutorial, which covers how to use matplotlib in applications rather well.

Image recolour in Excel

I have a greyscale image with some transparent sections too. I would like to recolour this within excel (based on the value that a user types in a cell or something)
Manually, all I need to do is select the picture then in the ribbon 🡒 format 🡒 colour 🡒 more variations 🡒 more colours and select appropriately. I've tried the macro recorder on these steps but get nothing useful.
Searching the web has led me to believe that the Shape.PictureFormat.Recolor method, which I'm guessing is what I want, is only availible in Publisher. I'd rather not interface with thatfor portability reasons (in case publisher isn't installed), and I'd also like this to run as speedily as possible.
I've even considered converting the image to an array of bytes, performing the required pixel manipulations then converting back to an image, but I think that'll be slow. I also don't have a clue how.
Is there a method in VBA to recolour an image in this way, leaving alpha as it is? Perhaps with the use of an ActiveX image control? Here's an example image in case it's not clear
White 🡒 Green
Black 🡒 Black
Alpha 🡒 Alpha
If you can't find a pure object model based solution, you can try to modify the document xml. It is not the easiest of solutions, but it is far easier than pixel manipulation.
Do like this:
Save your workbook without modification
Do the color change
Save the file again, with a different file name
Unzip the two *.xlsx files you created
Analyze the differences. You'll most likely find it in the drawings folder
Recreate the changes in the xml of the second file in the first one and zip it back together. If that works, you now have a theoretical way to the solution.
If you get this to work, you can automate these steps.

Photoshop jsx image grid

What I am ultimately trying to do is to create a grid of images for print that are minor variations of the same thing (different text is all). Looking through online resources I was able to create a script that changes the text and exports all of the images necessary (several hundred). What I am trying to do now is to import all of these images into a new photoshop document and lay them all out in a grid and I can't seem to find any examples of this.
Can anyone point me in the right direction to place a file at a specific coordinate (I'm using CS5 and have the design suite so if there is a way in illustrator to do this quickly...)?
Also, I'm open to other ideas on how to do this (even other programs) easily. It's for labels so the positioning on the sheet has to be pretty precise...
The art layer object has a translate() method that takes delta x and y params. You'll need to open each image, copy it to the target document, get its current location (using artLayer.bounds) and do the math to find the deltas to position it where you want it. Your deltas can be in pixels so you'll get plenty of precision.
Check out your 'JavaScript Scripting Reference' pdf in your Adobe install directory for more details.
Ok I'm marking Anna's response as the answer because though I didn't fully test it, it seems like it should work and answers the original question with jsx. However I'm also leaving my final solution in case anyone else runs across this with the same issue and may prefer this method as well.
What I ended up doing instead is using InDesign. I figured out that it has a grid option that lets you import a number of files and place them all in an equal grid in a single command. This is almost exactly what I was looking for, except that it leaves a small border/margin in between the columns and grids and mine were designed to meet exactly.
I couldn't figure out how to make it not have the border (I have very little experience with InDesign, it may be possible). However I was able to select all my images and scale them uniformly to be the correct size, then I just selected each column and dragged it over to snap to the adjacent column and the same with rows...