I inherited a figure (as a .fig-file) and want to change the layout of the legend. I would like to stretch the legend, from taking up half of the right side of the plot to taking up all of the right side of the plot.
I was initially hoping that the "Align distribution" tool could help with this, but as it turns out, the "patches" (i.e., the color samples) refuse to move! I cannot move them with "Align distribution", or drag and drop them by hand. However, there is no problem moving the text corresponding to the patches.
Is there a way to move the color patches?
Is there a way to automate the spreading out of the legend?
Related
Here is my Current View
I'm wanting to add a legend to distinguish between members(yellow line) and casual riders (blue line) so viewers can see which line is which.
Seems like this should be simple, but I feel like I've tried everything. The closest I've come is by getting a legend to pop up by dragging measure values over to the color, but then it changes my colors that I have already established and syncs both lines as the same color or gradient of colors. All I need is a legend detailing which line is which.
Instead of individually changing each line's color, place Measure Names in the Color shelf of All marks card. This should make the legend appear on the right.
I'm styling a vector layer of roads and have noticed that a small subset of lines appear to be going 'rogue' and ignoring their line colour styling. They still obey the line stroke and width style however but insist on being yellow instead of the desired colour.
I've added a separate rule for one of them and it definitely 'catches' the correct line segment and restyles it in every way EXCEPT for the colour which stubbornly remains yellow.
Can anyone provide me with any clues as to what is going on here?
That line (or lines) are "selected" - You have one of the selection tools active and have clicked on the line. See the manual for more details, you need to click on the clear selection tool
to remove it.
When connecting lines in Dymola, how could I avoid the zig-zag line, is there any option that allows me to smooth the connection?
Right-clicking on the connection, an selecting "Smooth" will give you a smoothed version (blue) of the original connection (grey). I've added the grey one manually to show the difference, it will not be shown in the model. But I'm not sure this is what you want...
Besides that, it makes most sense to me to align models to enable straight lines. This can be a bit of a pain depending on the placement of the connectors within the icon. The shortcut CTRL+Shift+Arrow-Key can help as it moves the model half of the usual grid.
Another possibility is to add some auxiliary points by clicking when drawing the connection and selecting the interface with Dymola creating the last right angle to the connection. This will make sub-grid connections look less ugly...
When I create a surface plot and use view([0 90]), so that I get a nice top-down view of the plot, the datatips are empty, i.e. the text is not visible. See the attached picture. As soon as I move the view a little bit they become visible though. Why is this happening and is there any fix?(1)
I don't really like the workaround to use view([0 90.0001]) instead. I'd rather see a fix than a workaround.
Mind that this doesn't happen when you save the file as a picture.
(1) It has probably something to do with heights. I think that the text height is at the exact same height as the box, which makes it possible that the text is drawn before the box, overwriting the text. I noticed that the box in that view sometimes disappears behind a surface which has a positive z-axis value.
When I make a figure in Matlab, with a legend and a rectangle that touches the y axis (strange, I know) upon exporting the figure to eps (or pdf) I've noticed that the rectangle obtains the line-style of the last line drawn (rather than what the rectangle was drawn with)
This behaviour also occurs for rectangles drawn after the one that touches the axis...
This doesn't happen if the rectangle is drawn before the legend is created....
Needless to say, it took me half a day to create a minimal example:
clf
L=plot(X,sin(X),'--');
legend(L,'sin(x)')
rectangle('position',[0.001,.1,.7,.7])
rectangle('position',[0,.5,.6,.7])
rectangle('position',[0.001,.3,.5,.7])
%legend(L,'sin(x)')
On the screen the 3 rectangle have solid lines, as they should. but once they are exported, the result has the last two with dashed lines (like the sin(x)). If the legend command is done later (as in the commented out line), everything works as it should....
Is this a feature or a bug?
This is not a feature. I am submitting this to development.
You found a workaround that works with minimal code gymnastics. I would document it in your code so someone does not change it unknowingly and move on.
If you are open to other output formats, notice this is not an issue with formats that use an output filter of MATLAB.
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/print.html
(Graphic Format Files section, right column in table)
-Doug, Advanced Support at MathWorks dealing with graphical issues.