Echarts, way to have VisualMap on Emphasis mode only - echarts

I am using visualmap so i can have a line which is colored with a different color below y= 0 and above y =0. This works great, but ideally id only have the different colors appear on hover over, ie. in emphasis mode .. is there any way to achieve this?
thanks

Related

Draw a line and color it based on direction

Is it possible to draw a line similar to the example below and color it based on the previous value?
So to have the color red when the line is moving down and green when it goes up.
Can this be done with line type? Or does it need to be drawn with markLine or something else?
Any help is much appreciated!
https://echarts.apache.org/examples/en/editor.html?c=dynamic-data2
I don't think it is possible with the line chart, as the whole line uses the same color for all points. I suggest you use a scatter type chart where each point can have a different color. By setting symbol size to a small value and drawing values close together you can emulate visual line.
Here is an example based on the regression sample from echarts site:

matlab: bar, how to change the edge color?

I am having trouble to change the bar color, I want it to be white in the middle, and red at the edge. Looking at matlab's description
if I do:
bar(y,'FaceColor','w','EdgeColor','r','LineWidth',1)
It should give me the above. However, when I actually run it, it only give me white graph.
Update: my y is:
y=zeros(1,5000); y(3000)=1; y(4000)=1;
Using the above, I got....
With so many bars, Matlab probably has trouble differentiating edge ('EdgeColor') and fill ('FaceColor') of each. After all, each complete bar is less than a screen pixel.
I suggest you use white edge and colored fill. That works for me. It's as if 'FaceColor' had precedence over 'EdgeColor'.
bar(y,'FaceColor','r','EdgeColor','w','LineWidth',1)
Or better yet: replace each bar by a line, that is, use stem:
stem(y,'r','marker','none')

Change bar chart column structure

I change the column color in the bar chart but the problem that when i print the paper in black and white all columns look the same, so I am wondering if there is any way to change the column shape from inside (like cross or circles) so i can differentiate between columns in black and white ?
Thanks a lot
You may want to try, amongst others, this matlab exchange entry called Hatch fill patterns plus Color & Invert.

Sigmaplot: How to scale x-axis for correctly displaying boxplots

I want to display overlapping boxplots using Sigmaplot 12. When I choose the scale for the x-axis as linear then the boxes do indeed overlap but are much too thin. See figure below. Of course they should be much wider.
When I choose the scale of the x-axis to be "category", then the boxes have the right width, but are arranged along each single x-value.
I want the position as in figure 1 and the width as in figure 2. I tried to resize the box in figure 1 but when I choose 100% in "bar width" than it still looks like Figure 1.
many thanks!
okay, I found the answer myself. In Sigmaplot, there is often the need to prepare "style"-columns, for example if you want to color your barcharts, you need a column that holds the specific color names.
For my boxplot example I needed a column that has the values for "width". These had to be quite large (2000) in order to have an effect. Why ? I have no idea. First I thought it would be because of the latitude values and that the program interprets the point as "1.000"s, but when I changed to values without decimals, it didnĀ“t get better.
Well, here is the result in color.
Have fun !

how to make stacked bar graph readable in white and black only

I have a stacked bar graph to include in my paper, which is going to be printed by reviewers in black and white only. When I print it out, I cannot tell the difference between some parts of it, which would otherwise be clearly distinguishable in color. Is there any way to make it readable even in black and white? Thanks in advance.
Have a look at the function presented in this File Exchange Pick of the Week to create hatched patterns instead of (or in addition to) your colors.
Here's one example:
Here's one example of how to use applyhatch_pluscolor:
figure, bar(rand(3,4)
[im_hatch,colorlist] = applyhatch_pluscolor(1,'|-.x',1,[1 0 1 1]);