When I use gnuplot I make a multiplot with 2x2 Pics. They got all the same lines with something different in there though. Thus I want them just one line title for all of them. When I scale on on below of there it resizes that special plot. Any Idea how to archieve it properly?
Thanks!
There is a patch recently added to the gnuplot sourceforge site (patch 611 here) which allows the addition of explicit margins around plots while keeping the plots the same size.
If you don't want to patch and build gnuplot yourself, you probably have to resort to setting margins manually or in a semiautomatic way, as I have done before.
Related
I'm using matplotlib in spyder. Size of plot is not good enough. I can only see it in the console on the bottom right. Is there any way to make it large?
Spyder images are supposed to be adjustable based on your setup. You can do this manually through the gui. I am guessing that you are not setting your figure size which is one way to increase the size of your figure.
fig = plt.figure(figsize=(16,16)) #Larger the numbers, the larger the figure
Another thing to consider when saving your figure. Use a vectorized format like a pdf and set your dpi so that you can zoom without degrading quality. This will make the file larger of course but it helps make publication quality figures.
I want to make the plot smaller, so it can save some space in print. However, when I make it smaller, the grid will be too tight:
Honestly, I don't get it. Why can't matplotlib auto-detect that this image is too small that the lable should be with a bigger interval?
So, How can I make the grid more sparse, so the lables won't overlap with each other?
Additionally, the title will also collapse with the labels. I can set it manually, by plt.suptitle(title, y=1.08). So it will look better
But I'm wondering if there is anyway to do it automatically?
Note: I'm using seaborn, but I tried with pure matplotlib, same problem.
I have this plot as part of a PySide program;
And there are two problems I have with it. The first is the ugly grey border. I know I can can get rid of it using the toolbar option, but I can't find a way to it programatically, or make it default to that when it plots...
The second issue, is that it is drawing the grid lines on top of the surface, which I would rather it didn't do... How do I get the grid lines to be drawn underneath the surface?
EDIT:
i'm using version 1.1.1;
this doesn't happen for all plot types - i.e.
that is fine.
If i try and plot multiple objects, then it can be a problem;
but i understand that's a limitation of mplot3d not being a try 3D engine, just a set of 3D images with a Z-Ordering, so the order of objects drawn becomes orientation dependant. (same graph - different angle: enter link description here).
The grid lines should surely always be at the bottom of the drawing though, no? Is there a way to force them to be?
Will.
I read here:
http://wiki.wxpython.org/Getting%20Started#Windows_or_Frames.3F
that there are advantages to arranging content within a frame using Sizers instead of panels; sizers are more flexible. However many of the matplotlib examples with wxpython use panels anyway. Typically they difine a panel for the plot. I have designed a GUI using Sizers, and wish to put my matplotlib canvas into one of the Sizers without the apparent restrictions of a panel. Does anyone know how this is done, or where I can find a very simple example?
Many thanks, Andrew.
I am not familiar with matplotlib but I happened to come across this previous SO question about embedding matplotlib canvases.
From what I can tell the canvas is actually inside a sizer but that sizer is then wrapped inside a panel. The advantage of this is that you encapsulate all the relevant variables and keep them together. I.e. the canvas and all the relevant variables are kept as a single item that can be called. This is good if you plan to have multiple canvases or if your canvas will be only one part of a more complex GUI.
That said, I see no reason you NEED to put it panel. If your application is very simple (i.e. it will consist of JUST the canvas and nothing else) you could place it in you frame's sizer (see that previous question's answer and change wx.Panel to wx.Frame).
I need to paint the line which links two points.
I am doing it, in Java. I receive two points as parameters and I have to calculate if the straight line between them, is inside the black figure.
I developed my own solution using the straight line equation, but my results are different than using the "professional" programs (such as GIMP or even MS Paint).
Here is a example of what I want:
alt text http://img411.imageshack.us/img411/788/img1q.png
But my algorithm does this:
alt text http://img267.imageshack.us/img267/1908/img2d.png
*The green point is out of the figure and this is not possible.
Any ideas? Anyone know which code is been using for this, in "professional" apps?
Thanks!
Daniel.
EDIT: Images
It looks like you are truncating instead of rounding to the nearest pixel. Difficult to see on those small black ink splotches. Could you post the code?
"Professional" programs most likely use Bresenham's line algorithm.
Look at Bresenham's line drawing algorithm
Straignt lines are drawn using Bresenham's algorithm usually. I didn't get your point about green point being out of the figure - there's clipping to not waste time drawing outside the visible area.