Removing White Background Box from MATLAB Figure when using the Mapping Toolbox - background

I've started to use the Mapping Toolbox in MATLAB for a project of mine, and below is a screenshot of what I currently have created using it.
What I'm trying to do now is remove the white box from behind the actual map, but I can't seem to figure out how to do it. I've trying setting 'Frame' to 'off' with the axesm command when first creating the map, but that doesn't do it. I've looked through the documentation to try to figure out why there's even a white background (and when I use the worldmap command the box doesn't appear), but I cannot determine why.
EDIT: I am looking to remove the white background entirely, so as to have the main contour plot surrounded by the figure's background color, which in this case is the gray.

The background color of a figure is a property of that figure named 'color'.
If you set that property to the value 'none' then you will have no background.
So, the easiest way to do it is:
set(gca,'color','none')
Of course you can give a figure handle instead of the current axes (gca).
The more aggressive option is to set the entire axis off:
axis off
But this will remove the axis completely, including labels and such which might not be what you want.

Try axis off when it's in focus, axis(handle,'off') when not

I have a potential solution.
If you run
get(figure(1))
to find the figure attributes and run
set('some resize property',[some set of values])
or
setm('some resize property',[some set of values])
You may be able to 'fill in' the space this way, unless there is an easier property to change. Can you please give more details if this does not lead to a solution?
Hope this helps!

Related

How to create legends with triangular end boxes in arcGIS?

I simply want my legend which is now in the form of the left bar in the following image, to be shown in the form of the bar in the right side. I couldn't find anything related for arcGIS. those anyone know?
Thank you so much for your help.
Unfortunately I don't think there is an elegant way to do this, only a work-around:
In Layout View, convert the legend to graphics. (Make sure your data and legend are in their final product state as your legend will no longer be dynamically linked to your data).
Right-click on the legend and ungroup the elements in the legend. Repeat as many times as necessary in order to be able to select an individual rectangle.
Manually convert the two rectangles into triangles. One way to do this would be to activate the "Draw" toolbar and draw white polygons over parts of each rectangle.
Once finished, regroup everything.
Again, not the prettiest solution but I don't believe ArcMap has this functionality.
Good luck!
Tom

How to revert back to not require rasterize

I used to be able to color any Text, shape, or image by just selecting the particular layer and use pain bucket tool for example. Not sure what I clicked, but recently when I try to do the same; I always get the following message:
"This type Layer must be rasterized before proceeding. Its text will
no longer be editable. Rasterize the type? "
I do not want to rasterize. Can I know how to revert back to the normal setup where I can do the coloring without the need for rasterize please.
It also seems to mess around with my selection.
For example - I have a circle shape in the middle with transparent background.
I used to be able to go Select>All followed by Select>Inverse and it will select the circle shape.
But now it selects the entire canvas when I select all but returns the following error when I Select>Inverse
"Warning No Pixels were selected".
You may not be able to color a vector object with paint bucket tool. Instead, can you try using the color option in the blending mode. That will retain the vector property and also apply the color.
The following applies to PS-CS6
In the layers palette,
= Right click on the layer > Blending Options > Select Color Overlay

How To Remove Background Wall & Gridlines On 3D Chart Control

I am trying to remove all gridlines and all parts of the background wall from a 3D Column graph. I have tried changing every background colour and every enabled setting to false but I still cannot seem to find where to remove the surrounding gridline as shown below. If possible, I would like to keep the graph floor, but remove the side and back walls.
I'm sure it's simple, so any help would be appreciated.
Thanks
Unfortunately the style of Area3DStyle is a bit hard-coded. You have the possibility to choose one of the following LightStyle:
None
Simplistic
Realistic
From you picture it seems that you have chosen None, try to set LightStyle to Simplistic to remove the border on the bars.
If you want to completely remove also the gray background you can set the ChartArea BackColor to Transparent.
The final result will be similar to

Shadow inside text on NSTextField/NSTextFieldCel

I've been trying for a day or two to try and get a shadow to draw inside the text of an NSTextField (and making the foreground color transparent, so all you see is a shadow inside the text). I've yet to achieve a desirable and practical result. The only success I had with this was transforming the text into an NSBezerPath, subtracting it from the frame of the NSTextFieldCell and clipping using the setClip method (addClip does not suffice in this case, it leaves the background painted). Unfortunately, converting the text to an NSBezerPath makes the edges of the text look jagged and overly straightened. Is there an efficient and decent way to achieve this using CoreGraphics masks and clipping because I am unable to achieve this.
A very similar effect of what I would be looking for is in the Xcode IDE, if you don't have a debug session open and go to the debugger navigator it says "No Debug Session" in a subclassed NSTextField that draws the text with a shadow inside it. That is pretty nearly what I am after. Any insight on where to start and how to do this would be great.
A paste bin my current code (working, but sub-optimal, & non-working): http://pastebin.com/4pTv8ZWm
Have you played around with the shadow property of NSTextField in IB? You should be able to get pretty close using a slightly offset shadow effect on the text with the right blend of alpha transparency.

Draw Lines on gtk.TextView

I'm trying to show the "selection" of a certain sub-string in a
gtk.TextView by drawing a border around the word. The only way to mark
text in a TextView that I've found so far is by placing TextTags with
modified properties. This does not seem to offer a way to draw a border,
though, DOES GTK SUPPORT THIS OR IS THIS A PROBLEM WITH ONLT PYGTK
I figured out how to draw on a text view !!!
To begin with lets assume the reference to your gtk.TextView is in a variable called viewer, Inside one of ur classes
Also the draw function has to be called with an event called expose-event else the drawings will be refreshed and will not stay on the screen
The next part is the gtk.TextView consists of 7 types of gtk.gdk.windows on which u can draw
gtk.TEXT_WINDOW_WIDGET
gtk.TEXT_WINDOW_TEXT
gtk.TEXT_WINDOW_LEFT - not displayed by default
gtk.TEXT_WINDOW_RIGHT - not displayed by default
gtk.TEXT_WINDOW_TOP - not displayed by default
gtk.TEXT_WINDOW_BOTTOM
gtk.TEXT_WINDOW_PRIVATE
For the drawing to appear on gtk.TextView We have to draw on gtk.TEXT_WINDOW_TEXT
An Example Code is as shown Below
if(viewer!=None):
viewer.connect("expose-event", expose_view)
self.drawable=viewer.get_window(gtk.TEXT_WINDOW_TEXT)
def expose_view(self,window,event):
if(self.drawable!=None):
self.drawable.draw_line(self.drawable.new_gc(),1,1,30,30)
# (1,1) and (30,30) are the coordinates and u can give the values accordingly
In a gtk.TextBuffer tags are used to set one or more pre-defined text attributes. Without subclassing, this is limited to the properties of a gtk.TextTag, and doesn't include anything akin to a border or outline property. There is no difference between PyGTK and plain GTK+ in this regard.
While somewhat hacky, the easiest way to do what you want to do is to connect to the expose-event of your gtk.TextView, get the coordinates of your string and draw on event.window, which is the gdk.Window of the event provided in the expose callback.
(Note that you don't have to get and store the gtk.TEXT_WINDOW_TEXT window, you just need to check what window the expose event is for in the callback, probably ignoring the expose if it's not for the text window.)
Instead, you could presumably subclass one or more of TextBuffer/TextView/TextTag to add a border tag, but whether it's reasonable to do so is another question.