Saving a plot in Octave with a transparent background - octave

I've plotted some GPS tracks and heading vectors using Octave.
I'd like to overlay the plot on a satellite image, but when I save the plot it has a white background. Is there a way to save it with a transparent background?

I think using print with the "pngalpha" device does what you want, e.g.:
print(gcf,'-dpngalpha', 'myplot.png');
This is poorly documented unfortunately. I browsed the source code extensively to find a way to hack/patch octave to do this, only to find out this was already possible.

Related

How to combine raster files (.img) into a mosaic and then clip around a boundary?

I'm new to QGIS and the tutorials I've tried don't seem to be working. Using QGIS 3.10
I downloaded a Lidar DTM package from Ontario GeoHub. I found about 60 files that cover my boundary outline shapefile.
I'd like to stitch the raster images together (not overlay) (since I believe you need one raster layer for the next step to clip?)
I'd like to clip the raster image to the shapefile outline of a selected area. Aka I want just the raster image to be inside of the boundary-outline shapefile.
I either get a large black square after I try to clip or nothing seems to happen...
https://geohub.lio.gov.on.ca/datasets/776819a7a0de42f3b75e40527cc36a0a?geometry=-82.063%2C43.286%2C-78.117%2C43.982
If I'm understanding your question properly, try:
Using the 'merge' tool by going to the top toolbar to Raster > Miscellaneous > Merge and putting in all your raster layers
Going to the top toolbar to Raster > Extraction > Clip Raster by Mask Layer
As for the large black square, it's hard to know without seeing a minimal example.
Also I just want to second Robert's comment that the GIS stackexchange is a better place for this question.

Circle shaped texture libGdx

I've been searching for answer for about 2 hours now and I haven't found my desired answer. My question is, Is it possible, and how, to draw a circle-shaped texture, so that outside the circle, texture would be transparent, is it even possible?
Thanks in advance! This site has been a great help so far!
The easiest way is to open a program like Photoshop and make an image with an alpha-channel. That means: Start with a completely transparent image and draw a circle on it. Then save it as .png
You can then just load it in your game and render it using a SpriteBatch. It (or better your graphics card) knows how to handle the alphachannel and will keep everything but the circle completely invisible.
This way you do not have to manipulate any pixmaps at runtime and you are not limited to simple shapes like circles.
If the portion of the texture you want to see in the circle is not meant to change during execution, the easiest way is to open Photoshop, make what you want, export it as an image and then load it in a Texture or a Sprite object in your code.
But this can also be done at runtime, via OpenGL using a Stencil test. This is the only solution if the portion displayed in the circle will have to be alterable during execution.
pixmap use this link if u are using other than .png format for your images
Apart form it if you are using png images then just draw the cirlce. Outside the circle will remain transparent.

Map opaque section of image

I was wondering how one would go about automatically making an image map based on just the opaque parts of a png image. You are normally able to click anywhere on the png image, even transparent areas, and it will register as clicking the image. Is there any way to exclude transparent areas and only have opaque areas register?
I assume there is some sort of javascript color detection feature, or something along those lines. I have access to jQuery on my website, as well.
Thank you for taking time to read and answer.
Trying to do this with images will be a major headache. It's possible that there is a javascript library out there to detect colors, but that's very complex stuff.
Maybe give svg a go if the graphics are simple.
This site (not mine) has a nice map using svg.

image map edge detection

if i have a map - say, of the united states, or an anatomy picture of the human body, or some sort of image with discrete sections, and i have a plain black and white outline of the image, what is the easiest way to determine the co-ordinates of the discrete sections, for use in an html image map?
I've used the coffee cup map maker, which is tedious (but also the best manual image-map maker i could find). Is there something - maybe free, maybe expensive - that can do this task automatically?
cheers!
I quite like iMapBuilder, I installed the Chrome app and find it very easy to create image maps there for both regular and irregular areas.
You can import your image, set the area and actions, then simply add the embed code to your site.
I don't create too many image maps so maybe this isn't quite what you're looking for but I hope it helps.

Best way to draw paths on web page

I have vector map of India and I need to draw the travelled path in an "Indiana Jones-esque" style, if you know what I mean.
The lines need extend from point to point.
At the moment, Im using Rapheal.js to draw it but it is proving laborious to find all of the pixel positions on photoshop and then write them in to the raphael drawing method.
I could use silverlight, but a lot of people do not have it installed and it doesnt seem widespread enough.
I could use flash, but then it wouldnt be compatible with iPhone.
What would be the best way to draw these lines on a web page?
Use Adobe Illustrator or Flash to produce an image file, then put that on your website.
For Illustrator, put the map on the background layer, and in the foreground layer(s), put the points for your map and the lines that connect them. Then export as a PNG or JPG, and put it on your website as an image.
For Flash, use the timeline and follow the same process, making separate layers for your points and lines. Then use File -> Export -> Export Image . . . and select the PNG or JPG file type, then put it on your website as an image.
For a free vector image program (the program you would use to draw and style the path), try using Inkscape.