My flag data looks like this:
events = [{"x":1116885600000,"title":"","name":"flag"}, {"x":1116738600000,"title":"","name":"flag"} ...]
Is it possible to show every element of my array "events" in the legend?
My legend only shows the the flag name:
type : 'flags',
data: events,
name: 'flag on series',
cheers
In legends, each item is serie, not points. So you need to prepare each point in separate series, then you achieve all points in legend.
Related
So I have a figure consisting in 3 plots, something like this:
figure
plot(yid);hold on
plot(yid_hat_pred);
plot(yid_hat_sim);
legend('y_{id}','y_{id}pred','y_{id}sim');
and 2 variables related to the last 2 plots: MSEid_sim and MSEid_pred.
Is there any way to put these 2 values in the title? Something like
MSEid_sim=value, MSEid_pred=value ? Or not necessarily in the title, but somewhere in the figure.
Thanks in advance.
Try
title(['MSEid_sim=' num2str(value) ', MSEid_pred=' num2str(value)])
This will create a char array.
Another nice thing you can do is using the DispalyName attribute of a plot, e.g.:
plot(yid,'DisplayName','y_{id}')
and in the end of your figure code just insert legend show
I need help to skip lines in the legend of boxplots : I have a plot with two boxplots, and each of them has a legend to long to fit on a single line.
I tried this, X being my matrix of data (two colums) :
boxplot(X,'Labels',{'1stpartofthelegend\newline2ndpartofthelegend','1stpartofthelegend\newline2ndpartofthelegend})
This solution works in other types of plots, like a plotspread plot so I don't understand why it is not working here ?
I found this question, but the solutions are not working for me, maybe because I have a more recent version (R2018b).
I actually want to add my boxplots over a plotpsread plot, but when I do that the legends of the boxplots win over the legends of the plotspread (even if I add boxplots without legends, the previous legends of the plotspread are replaced by "1" and "2"). So preventing the boxplot to erase the previous legend would be a nice solution but as I failed to do that I tried to find another way.
Thank you for your help
You want to set the 'Labels' of the boxplot for multiple lines. So use a cell of cells:
Lbl = { {'1st entry (1st line)','2nd entry (1st line)'},...
{'1st entry (2nd line)','2nd entry (2nd line)'} };
boxplot(rand(100,2),'Labels',Lbl)
EDIT
LaTeX commands work in the title and labels but apparently there is no interpreter or TickLabelInterpreter property for boxplot-Labels:
Error using internal.stats.parseArgs (line 42)
Invalid parameter name: TickLabelInterpreter.
I am trying to get all my lines to overlap on a single graph. How would I go about doing this? Here is what I managed to get so far:
And when I say overlap, I mean something similar to this:
Here is more information about my data:
Each of the attributes (e.g. 'Intro', 'Flair') have the following integers in the data: 1,2,3,4 with an associated pcttip (tip percentage) as a decimal number.
I have manually right clicked on each of the measures in the columns area and changed them to "dimension".
The dataset can be found here if you would like to try: https://www.dropbox.com/s/je72hbso2tzby60/Tableau_data_2.xlsx?dl=0
You can do this in Tableau fairly easily. You need to pivot some of your data.
Click on the data source in the top-left and select Edit Data Source
In the bottom pane, where your data is previewed, select/highlight each of the fields that you want measured (Intro, Flair, etc.)
Right-Click with those fields selected and click Pivot
When you return to your sheet, you will see a new dimension field and measure field for your pivot.
Add [Pivot field values] to the Columns section - make sure this is set to 'Dimension' and 'Continuous'
Add [Pivot field names] to the Color card
Pivot
Output
Drag 'Repeat' pill to the X-axis on 'Intro' then drag the other pills into 'Intro'
Something similar to this: https://onlinehelp.tableau.com/current/pro/online/mac/en-us/buildexamples_line.html
I'm using clustergram in the Matlab bioinformatics toolbox. I want to add color markers to certain columns, similarly to this, but I want to mark specific ColumnLabels (IDs) rather than specific clusters.
Anyone know of a way to do that?
Found it. Based on Kevin's excellent suggestion, I passed a structure with colors for ColumnLabelsColor, then set LabelsWithMarkers as true:
clustergram(mat,'Colormap', redbluecmap,'ColumnLabelsColor',s,'LabelsWithMarkers',true)
mat is my DataMatrix. s is a structure of 2 cell arrays, each with length of the number of columns: first array is ColumnLabels, second array is my defined colors.
By default, setting ColumnLabelsColor changes the color of the text of the labels. Setting LabelsWithMarkers to true adds a color marker between the label and the clustergram:
Thank you for the suggestion. I have just figured out this problem.
First step: construct a structure with 'Labels' and 'Colors'. These two cell array should in the same length.
Second step: set the clustergram object, parameter 'ColumnLabelsColor' with this structure.
Also, set 'LabelsWithMarkers' as true.
[This is my original code for your reference ]
https://i.stack.imgur.com/ZTQ1h.png
I'm trying to create a bubble polar chart with Highcharts, is this possible? Documentation isn't clear about this, and my attempts so far haven't been successful.
It would something look like this:
What have you tried? It's just polar chart with series bubble, see: http://jsfiddle.net/ZYKQG/
series: [{
type: 'bubble',
name: 'bubble',
data: [[100,2,3.3],[45,5,3.2],[225,5,3.1]],
pointPlacement: 'between'
}]